{ "openapi": "3.0.0", "info": { "title": "SponsorUnited API", "version": "v1" }, "paths": { "/api/ai-chatbot/access": { "get": { "tags": [ "AI Chatbot" ], "summary": "Get AI chatbot access token", "description": "Generates or retrieves an access token for the AI chatbot service. Requires the user to have AI chatbot access permissions", "operationId": "db297135cc617e1f4ea5407ef93e0343", "responses": { "200": { "description": "Generate or retrieve the AI Chatbot access token.", "content": { "application/json": { "schema": { "properties": { "access_token": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{userId}/surface/admin-context": { "get": { "tags": [ "Admin Surface Context" ], "summary": "Get a user's administrator-set Surface context", "description": "Returns the administrator-set Surface context for the given user. Separate from the user's own context, which is never returned here. Requires the edit-users permission.", "operationId": "e9df1a6f4ce6e021b4f3ff72262a5a67", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Administrator-set user context", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "Long-time client contact. Prefers NBA/MLS comps.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Missing the edit-users permission" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Admin Surface Context" ], "summary": "Update a user's administrator-set Surface context", "description": "Upserts the administrator-set Surface context for the given user, preserving formatting verbatim. Leaves the user's own context untouched. Requires the edit-users permission.", "operationId": "09be3d68eb05cce7eaf3d639adb3ec00", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminUserSurfaceContextUpdateRequest" } } } }, "responses": { "200": { "description": "Administrator-set user context updated", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "Long-time client contact. Prefers NBA/MLS comps.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Missing the edit-users permission" }, "404": { "description": "User not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/surface/admin-context": { "get": { "tags": [ "Admin Surface Context" ], "summary": "Get an organization's administrator-set Surface context", "description": "Returns the administrator-set Surface context for the given organization. Separate from the organization's own context, which is never returned here. Requires the edit-organization permission.", "operationId": "52df41e9cf877a06a1d0a91e3517e2d0", "parameters": [ { "name": "organizationId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Administrator-set organization context", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "Enterprise account, renewal Q3.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Missing the edit-organization permission" }, "404": { "description": "Organization not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Admin Surface Context" ], "summary": "Update an organization's administrator-set Surface context", "description": "Upserts the administrator-set Surface context for the given organization, preserving formatting verbatim. Leaves the organization's own context untouched. Requires the edit-organization permission.", "operationId": "57494f69be64682492a50cc084a7996f", "parameters": [ { "name": "organizationId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminOrganizationSurfaceContextUpdateRequest" } } } }, "responses": { "200": { "description": "Administrator-set organization context updated", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "Enterprise account, renewal Q3.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Missing the edit-organization permission" }, "404": { "description": "Organization not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency": { "post": { "tags": [ "Agency" ], "summary": "Create a new agency", "description": "Creates a new agency with the provided details including name, contact information, social media handles, and optional brand/property associations", "operationId": "1387e8e891a95fcc75a59818ab8ed345", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyStoreRequest" } } } }, "responses": { "200": { "description": "The new Agency.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency/{id}": { "get": { "tags": [ "Agency" ], "summary": "Get agency details", "description": "Retrieves detailed information about a specific agency including its companies, properties, organizations, social handles, and service groups. Use the slim parameter for reduced data", "operationId": "8f592b30c702d786206f4af44f62656d", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Agency to fetch.", "required": true, "schema": { "type": "string" } }, { "name": "slim", "in": "query", "description": "Fetch slimmed down Agency data.", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "An agency with the given id.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/AgencyLightResource" }, { "$ref": "#/components/schemas/AgencyShowStoreUpdateResource" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Agency" ], "summary": "Update an agency", "description": "Updates an existing agency's information including profile details, social handles, company/property associations, and organization memberships", "operationId": "2ada65983d8b161abd1b6df83fdd09ca", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Agency to update.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyUpdateRequest" } } } }, "responses": { "200": { "description": "The updated Agency.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Agency" ], "summary": "Delete an agency", "description": "Soft deletes an agency and cleans up associated data including contacts, social handles, and profile links. Requires delete administration agencies permission", "operationId": "444a655b9280f1ef01ed3e6da2710f55", "parameters": [ { "name": "id", "in": "path", "description": "Agency ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." }, "200": { "description": "Cannot remove Agency", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency/{id}/representation": { "get": { "tags": [ "Agency" ], "summary": "Get agency representation", "description": "Retrieves an agency's representation data including its associated properties and companies with their logos. Includes soft-deleted agencies", "operationId": "924e90a51d9fe2c213d2ef0ee6048db2", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Agency for which to fetch representation.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "An agency with the given id and its representation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency-services": { "get": { "tags": [ "AgencyServices" ], "summary": "List agency services", "description": "Returns a list of all agency services with their types and usage counts", "operationId": "85bce9769d63ca8dad86af3f42cb6150", "responses": { "200": { "description": "List of agency services", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgencyServicesIndexResource" } } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "AgencyServices" ], "summary": "Create agency service", "description": "Creates a new agency service with the specified name and service type", "operationId": "bfbab5f8ae68d4b5e57d2fd823eeae7d", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServiceCreateRequest" } } } }, "responses": { "200": { "description": "Service Type details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServicesResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency-services/{id}": { "get": { "tags": [ "AgencyServices" ], "summary": "Get agency service", "description": "Returns the details of a specific agency service by ID", "operationId": "b04e408d558c062de7bb82899f31b744", "parameters": [ { "name": "id", "in": "path", "description": "Service Type id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Service Type details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServicesResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "AgencyServices" ], "summary": "Update agency service", "description": "Updates an existing agency service's name or service type", "operationId": "142b17c11ca48d83b3e2ce56afdea2d5", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServiceUpdateRequest" } } } }, "responses": { "200": { "description": "Service Type details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServicesResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "AgencyServices" ], "summary": "Delete agency service", "description": "Permanently removes an agency service from the system", "operationId": "bb5672bb8cda537bd4fc59c8b5f658bd", "parameters": [ { "name": "id", "in": "path", "description": "AgencyServices Id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency-services-types": { "get": { "tags": [ "AgencyServicesType" ], "summary": "List agency service types", "description": "Returns all available agency service types with optional filtering by name and sorting options", "operationId": "e741361353dffb28f2d2360486ead685", "responses": { "200": { "description": "List of agency services types.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgencyServicesTypeIndexResource" } } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "AgencyServicesType" ], "summary": "Create agency service type", "description": "Creates a new agency service type with the provided data", "operationId": "4220a5c00d542910c4a18d46e9eb8f8e", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServiceTypeCreateRequest" } } } }, "responses": { "200": { "description": "Service Type details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServicesTypeResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/agency-services-types/{type_id}": { "get": { "tags": [ "AgencyServicesType" ], "summary": "Get agency service type", "description": "Returns the details of a specific agency service type by its ID", "operationId": "b4e4f49e59e0651f4de4ab71afb32d75", "parameters": [ { "name": "id", "in": "path", "description": "Service Type id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Service Type details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServicesTypeResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "AgencyServicesType" ], "summary": "Update agency service type", "description": "Updates an existing agency service type with the provided data", "operationId": "d44a64dbb51364ce2ddee8d04bfd2d8b", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServiceTypeUpdateRequest" } } } }, "responses": { "200": { "description": "Service Type details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgencyServicesTypeResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "AgencyServicesType" ], "summary": "Delete agency service type", "description": "Deletes an agency service type by its ID. Requires delete permission", "operationId": "75ed2ac36401e5549e10cc290d6e7c3e", "parameters": [ { "name": "id", "in": "path", "description": "AgencyServicesType Id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-grouping": { "get": { "tags": [ "Asset Groupings" ], "summary": "List all asset groupings", "description": "Returns a paginated list of asset groupings with their subgroupings", "operationId": "f08b79a015056c8d4bd68063aa05cb8e", "parameters": [ { "name": "AssetGroupingIndexRequest", "in": "query", "schema": { "$ref": "#/components/schemas/AssetGroupingIndexRequest" } } ], "responses": { "200": { "description": "List of asset groupings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Asset Groupings" ], "summary": "Create asset grouping", "description": "Creates a new asset grouping with optional media order", "operationId": "1390482d2e687fc2fd012794a51c7769", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingRequest" } } } }, "responses": { "200": { "description": "The new asset grouping.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-grouping/{id}": { "get": { "tags": [ "Asset Groupings" ], "summary": "Get asset grouping", "description": "Returns a specific asset grouping with its subgroupings", "operationId": "5b2f6ebcc14c9db79b7eead42722a3d3", "parameters": [ { "name": "id", "in": "path", "description": "The id of the asset grouping to update.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The updated asset grouping.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Asset Groupings" ], "summary": "Update asset grouping", "description": "Updates the name, icon, and media order of an existing asset grouping", "operationId": "8c2481c0f8bd2c903fe90e204089a587", "parameters": [ { "name": "id", "in": "path", "description": "The id of the asset grouping to update.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingRequest" } } } }, "responses": { "200": { "description": "The updated item grouping.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Asset Groupings" ], "summary": "Delete asset grouping", "description": "Removes an asset grouping and its associated subgroupings", "operationId": "fca80b6282fcf00122c60f4b336f308b", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-grouping/{old_grouping}/reassign": { "put": { "tags": [ "Asset Groupings" ], "summary": "Reassign asset grouping", "description": "Moves all items from one asset grouping to another", "operationId": "1838061788f7a8e5f4af39b182b6fc75", "parameters": [ { "name": "old_grouping", "in": "path", "description": "The id of the old grouping", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingReassignRequest" } } } }, "responses": { "200": { "description": "The reassign was successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetGroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-subgrouping/": { "get": { "tags": [ "Asset Subgroupings" ], "summary": "List all asset subgroupings", "description": "Returns all asset subgroupings with their parent groupings ordered by media order", "operationId": "ab50fb3a5295ae73d825ecb7c7543008", "responses": { "200": { "description": "List of asset subgroupings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-subgrouping": { "post": { "tags": [ "Asset Subgroupings" ], "summary": "Create asset subgrouping", "description": "Creates a new asset subgrouping under a specified grouping", "operationId": "10e2ffa916cfeaf6e4d8360511b64908", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingStoreRequest" } } } }, "responses": { "200": { "description": "The new asset subgrouping.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-subgrouping/{id}": { "get": { "tags": [ "Asset Subgroupings" ], "summary": "Get asset subgrouping", "description": "Returns a specific asset subgrouping with its parent grouping", "operationId": "5298a5dfd5179098c87173ff85b91f0e", "parameters": [ { "name": "id", "in": "path", "description": "The id of the asset grouping to update.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The updated asset grouping.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Asset Subgroupings" ], "summary": "Update asset subgrouping", "description": "Updates the name, grouping association, and icon of an existing subgrouping", "operationId": "02261538464d9b2e00ca4513c83ec0db", "parameters": [ { "name": "id", "in": "path", "description": "The id of the asset grouping to update.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingUpdateRequest" } } } }, "responses": { "200": { "description": "The updated asset grouping.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Asset Subgroupings" ], "summary": "Delete asset subgrouping", "description": "Removes an asset subgrouping from the system", "operationId": "4918ef38b51abd58cec25b79dcc6f41d", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-subgrouping/{id}/intent": { "get": { "tags": [ "Asset Subgroupings" ], "summary": "Get subgrouping intent data", "description": "Returns usage metrics for a subgrouping including item counts and audit references", "operationId": "40322c27f64945cb564c31f36ddb9557", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Asset subgrouping intent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingIntentResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-subgrouping/{oldGrouping}/reassign/{newGrouping}": { "put": { "tags": [ "Asset Subgroupings" ], "summary": "Reassign asset subgrouping", "description": "Moves all items from one subgrouping to another", "operationId": "f0158fb0e40bb7841ed8dbcf14e761ed", "parameters": [ { "name": "oldGrouping", "in": "path", "description": "The id of the old subgrouping", "required": true, "schema": { "type": "integer" } }, { "name": "newGrouping", "in": "path", "description": "The id of the new subgrouping", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The reassign was successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingIntentResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/asset-subgrouping/tag/{oldTag}": { "put": { "tags": [ "Asset Subgroupings" ], "summary": "Update subgrouping tag", "description": "Renames a tag across all subgroupings that have it", "operationId": "8d5112c31deb47ed1eea83a8e5e290af", "parameters": [ { "name": "oldTag", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingTagRequest" } } } }, "responses": { "200": { "description": "The update tag was changed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetSubgroupingIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/company/{brand_id}": { "get": { "tags": [ "Audits" ], "summary": "Get audit by brand for current user", "description": "Returns audit data for a specific event, team, and brand combination for the authenticated user", "operationId": "11f41b8d9f2333f1e9d669b8b620291b", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "brand_id", "in": "path", "description": "The ID of the brand/company", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Audit data with brand, event, team, user, and item values" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/review/{user_id}": { "get": { "tags": [ "Audits" ], "summary": "Get audits for review", "description": "Returns all audits for a specific event, team, and user for review purposes", "operationId": "a66f6d57d90708be64f31f82049c8ec0", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of audits for review" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Audits" ], "summary": "Update user events with audits and item values", "description": "Updates user event status, handles property/league changes, and manages audit approvals/rejections", "operationId": "5f74e3e99c601565edd0082beb9b22e4", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserEventsRequest" } } } }, "responses": { "200": { "description": "Updated user event(s)" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/user/{user_id}/user-event-media-data": { "get": { "tags": [ "Audits" ], "summary": "Get processed media data for user event", "description": "Retrieves processed JSON data from uploaded audio files for a specific user event. Returns processed audio transcription data or empty array if no audio media is found.", "operationId": "c2d679de4e9b5f5a66275c665a3d64fd", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Processed media data from audio files or empty array", "content": { "application/json": { "schema": { "description": "Processed JSON data from audio transcription files", "type": "array", "items": { "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/property/{property_id}/review/{user_id}/bulk-keyword": { "get": { "tags": [ "Audits" ], "summary": "Get audits for review with bulk keyword", "description": "Returns audits for review and appends a keyword to item value descriptions", "operationId": "8a6eda06ac278f55392a045e0daa61f5", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "description": "The ID of the property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } }, { "name": "keyword", "in": "query", "description": "Keyword to append to item value descriptions", "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of audits with updated descriptions" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/review/{user_id}/download": { "get": { "tags": [ "Audits" ], "summary": "Download scouting report as CSV", "description": "Downloads the scouting report for a specific event, team, and user as a CSV file", "operationId": "835aa69e78cfd97f28a3250ef9dd152f", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "CSV file download", "content": { "text/csv": {} } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - requires download scouting report permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/review/{user_id}/metadata": { "get": { "tags": [ "Audits" ], "summary": "Get metadata for audit review", "description": "Returns distinct values for brand, platform, subplatform, and asset for filtering audit review data", "operationId": "18e9b885369719fd5a75f7cd189967e2", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Distinct metadata values for filtering", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewMetadataResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/review/{user_id}/list": { "get": { "tags": [ "Audits" ], "summary": "Get paginated audit reviews with filters", "description": "Returns paginated audit reviews with optional filtering by brand, platform, subplatform, and asset", "operationId": "c9d456156a2d80efed9836b8037bdb99", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } }, { "name": "brand_ids", "in": "query", "description": "Comma-separated brand IDs", "schema": { "type": "string", "example": "1,2,3" } }, { "name": "platform_ids", "in": "query", "description": "Comma-separated platform IDs", "schema": { "type": "string", "example": "1,2" } }, { "name": "subplatform_ids", "in": "query", "description": "Comma-separated subplatform IDs", "schema": { "type": "string", "example": "1,2" } }, { "name": "asset_ids", "in": "query", "description": "Comma-separated asset IDs", "schema": { "type": "string", "example": "1,2,3" } }, { "name": "per_page", "in": "query", "description": "Items per page (default 10)", "schema": { "type": "integer", "example": 15 } }, { "name": "page", "in": "query", "description": "Page number", "schema": { "type": "integer", "example": 1 } }, { "name": "order_by", "in": "query", "description": "Field to order by", "schema": { "type": "string", "enum": [ "brand", "platform", "subplatform", "asset", "created_at" ], "example": "brand" } }, { "name": "order_direction", "in": "query", "description": "Sort direction", "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "asc" } } ], "responses": { "200": { "description": "Paginated audit reviews", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "type": "object" } }, "current_page": { "type": "integer", "example": 1 }, "last_page": { "type": "integer", "example": 5 }, "per_page": { "type": "integer", "example": 15 }, "total": { "type": "integer", "example": 73 }, "first_page_url": { "type": "string" }, "last_page_url": { "type": "string" }, "next_page_url": { "type": "string", "nullable": true }, "prev_page_url": { "type": "string", "nullable": true }, "filtered_item_values_ids": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/review/{user_id}/counts": { "get": { "tags": [ "Audits" ], "summary": "Get review counts for property or league", "description": "Returns the count of user events for review filtered by property or league changes", "operationId": "caf9e363d73ccca9b52e15e301a9feac", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } }, { "name": "property", "in": "query", "description": "Filter by property changes (true/false)", "schema": { "type": "string" } }, { "name": "league", "in": "query", "description": "Filter by league changes (true/false)", "schema": { "type": "string" } }, { "name": "brand_id", "in": "query", "description": "Filter by brand/company ID", "schema": { "type": "integer" } }, { "name": "event", "in": "query", "description": "Comma-separated list of event IDs", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Count of user events" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/scan/{event_id}": { "get": { "tags": [ "Audits" ], "summary": "Get social scan review data", "description": "Returns comprehensive data for reviewing a social media scan including event, audits, sponsor brands, and quick add items", "operationId": "0f04091bcfcc3578f8420eaff7eced9c", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Scan review data", "content": { "application/json": { "schema": { "properties": { "quickAddItems": { "description": "Quick add items grouped by social media value, brand, and item", "type": "object" }, "event": { "description": "Event details with social scraping sessions", "type": "object" }, "audits": { "description": "List of audits with brands and item values", "type": "array", "items": { "type": "object" } }, "sponsorBrandIds": { "description": "IDs of sponsor brands", "type": "array", "items": { "type": "integer" } }, "socialScrapingSession": { "description": "Social scraping session details", "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Event not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/item/{item_id}": { "get": { "tags": [ "Audits" ], "summary": "Get audit by item", "description": "Returns audit data for a specific event, team, and item combination for the authenticated user", "operationId": "20f7cc34b17295e7a51087a18e5ca466", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "item_id", "in": "path", "description": "The ID of the item", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Audit data filtered by item" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/bulk": { "post": { "tags": [ "Audits" ], "summary": "Bulk add audits with item values", "description": "Creates multiple audits with item values across companies, properties, and events in a single operation", "operationId": "b10728f6765ff75d8823617fb604ace8", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkAddAuditsRequest" } } } }, "responses": { "200": { "description": "Created item values" }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/company/{brand_id}/{season}": { "post": { "tags": [ "Audits" ], "summary": "Save audit with item values for a brand", "description": "Creates or updates an audit with item values for a specific event, team, and brand. Supports social media scouting and event-based scouting.", "operationId": "7dd5498c9b500f69b94469e9ab629819", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event or 'social' for social media scouting", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "brand_id", "in": "path", "description": "The ID of the brand/company", "required": true, "schema": { "type": "integer" } }, { "name": "season", "in": "path", "description": "Season year (required for social media scouting)", "required": false, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveUserEventRequest" } } } }, "responses": { "200": { "description": "Saved audit with item values" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Item or user event not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/team/{team_id}/review/{user_id}/move-company": { "put": { "tags": [ "Audits" ], "summary": "Move item values to a different company", "description": "Moves specified item values from one company to another within an audit review", "operationId": "0a354ddfd3c05e4a2eaf1397f6e1bd75", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "old_company_id", "new_company_id" ], "properties": { "old_company_id": { "description": "Source company ID", "type": "integer" }, "new_company_id": { "description": "Target company ID", "type": "integer" }, "item_values": { "description": "Item values to move", "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Updated audits after move" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/remove/{audit_id}": { "delete": { "tags": [ "Audits" ], "summary": "Delete an audit", "description": "Soft deletes an audit. Requires delete audits permission.", "operationId": "c19d7bf70a1a96519334dafffe93686c", "parameters": [ { "name": "audit_id", "in": "path", "description": "The ID of the audit to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Audit deleted successfully" }, "400": { "description": "Failed to delete audit" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - requires delete audits permission" }, "404": { "description": "Audit not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{audit_id}/item-value/{item_value_id}/copy": { "post": { "tags": [ "Audits" ], "summary": "Copy an audit with item value to a new brand", "description": "Creates a copy of an audit and its item value, assigning it to a different brand", "operationId": "0d13d137407bd238fa27162c338433ad", "parameters": [ { "name": "audit_id", "in": "path", "description": "The ID of the audit to copy", "required": true, "schema": { "type": "integer" } }, { "name": "item_value_id", "in": "path", "description": "The ID of the item value to copy", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditCopyRequest" } } } }, "responses": { "200": { "description": "Copied item value" }, "400": { "description": "Audit not found" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit-count/{league_id}": { "get": { "tags": [ "Audits" ], "summary": "Get audit counts for a league", "description": "Returns asset audit counts grouped by league for spend tracker analysis", "operationId": "f9180cac12467d118ff86fc38269e8c6", "parameters": [ { "name": "league_id", "in": "path", "description": "The ID of the league", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "League assets audit counts" }, "401": { "description": "Unauthenticated" }, "404": { "description": "League not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{eventId}/team/{propertyId}/review/{userId}/bulk-clone": { "post": { "tags": [ "Audit Review" ], "summary": "Bulk clone item values to a different asset within audit review. Omit item_value_ids to clone all.", "operationId": "88c7a43f29eb45595efe1c8449d8c18d", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditReviewBulkCloneRequest" } } } }, "responses": { "200": { "description": "Collection of cloned item values", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{eventId}/team/{propertyId}/review/{userId}/bulk-update": { "put": { "tags": [ "Audit Review" ], "summary": "Bulk update item values within audit review. Omit item_value_ids to update all.", "operationId": "9aa2de5802da6550bb9bfadc67cc8864", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditReviewBulkUpdateRequest" } } } }, "responses": { "200": { "description": "Collection of updated item values", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{eventId}/team/{propertyId}/review/{userId}/bulk-delete": { "delete": { "tags": [ "Audit Review" ], "summary": "Bulk delete item values within audit review. Omit item_value_ids to delete all.", "operationId": "adfa94558a981085a8c0da43a073249d", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditReviewBulkDeleteRequest" } } } }, "responses": { "204": { "description": "Successfully deleted" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{eventId}/team/{propertyId}/review/{userId}/bulk-reject": { "post": { "tags": [ "Audit Review" ], "summary": "Bulk reject item values within audit review. Omit item_value_ids to reject all.", "operationId": "80b7d75859134740e8a5133a37bd87ec", "parameters": [ { "name": "eventId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "propertyId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "userId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditReviewBulkRejectRequest" } } } }, "responses": { "204": { "description": "Successfully rejected" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{eventId}/team/{propertyId}/review/{userId}/bulk-clear-keyword-phrase": { "put": { "tags": [ "Audits" ], "summary": "Clear keywords from item value descriptions", "description": "Clears the description field from specified item values during audit review", "operationId": "712b63adadb83ca2bef9753fa889804d", "parameters": [ { "name": "eventId", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "propertyId", "in": "path", "description": "The ID of the property", "required": true, "schema": { "type": "integer" } }, { "name": "userId", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "item_value_ids": { "description": "Array of item value IDs to clear (optional, clears all if not provided)", "type": "array", "items": { "type": "integer" } }, "excluded_item_value_ids": { "description": "Item value IDs to exclude (used when item_value_ids is not provided)", "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Cleared keywords from item values" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/property/{property_id}/review/{user_id}/bulk-reassign-brand": { "post": { "tags": [ "Audits" ], "summary": "Bulk reassign brand for item values", "description": "Reassigns multiple item values to a different brand during audit review. Requires bulk reassign permission.", "operationId": "af3d7add39e7bcc43b983b0bf4568572", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "description": "The ID of the property", "required": true, "schema": { "type": "integer" } }, { "name": "user_id", "in": "path", "description": "The ID of the user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditBulkReassignBrandRequest" } } } }, "responses": { "200": { "description": "Updated audits after bulk reassignment" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - requires bulk reassign permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/synonyms": { "get": { "tags": [ "AuditSynonyms" ], "summary": "List audit synonyms", "description": "Returns all synonyms associated with a specific audit event, including their linked brand information", "operationId": "b581d853897a9b3ff9add213c501b345", "parameters": [ { "name": "event_id", "in": "path", "description": "The id of the event", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AuditSynonymCollection" } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/synonyms/{synonym_id}/accept": { "post": { "tags": [ "AuditSynonyms" ], "summary": "Accept audit synonym", "description": "Accepts a synonym from an audit and moves it to the permanent brand synonyms list. Deletes all temporary audit synonyms with the same brand_id and synonym value", "operationId": "63f94f886fbb7b6c867c1ab5a6940c84", "parameters": [ { "name": "event_id", "in": "path", "description": "The id of the event", "required": true, "schema": { "type": "integer" } }, { "name": "synonym_id", "in": "path", "description": "The id of the synonym to accept", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditSynonymResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/audit/{event_id}/synonyms/{synonym_id}": { "delete": { "tags": [ "AuditSynonyms" ], "summary": "Delete audit synonym", "description": "Removes a specific synonym from an audit event without adding it to the brand synonyms", "operationId": "2bed846d99e1b893ed8957e591ed76ff", "parameters": [ { "name": "event_id", "in": "path", "description": "The id of the event", "required": true, "schema": { "type": "integer" } }, { "name": "synonym_id", "in": "path", "description": "The id of the synonym to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful deletion", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditSynonymResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/auth/login": { "post": { "tags": [ "Authentication" ], "summary": "Authenticate user", "description": "Authenticates user credentials and generates an authentication token for further API calls. Returns MFA challenge if multi-factor authentication is enabled for the user.", "operationId": "535ffeda4b78916efd658b2844ea897a", "requestBody": { "description": "User credentials", "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } } }, "responses": { "200": { "description": "Authentication Token or mfa_enabled true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResource" } } } } } } }, "/api/auth/logout": { "get": { "tags": [ "Authentication" ], "summary": "Logout user", "description": "Invalidates the current authentication token and logs out the user from the system.", "operationId": "8e5dc3654b57a13f0272f04962926281", "responses": { "200": { "description": "Success message", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/auth/pin/send/{mfaOption}": { "get": { "tags": [ "Authentication" ], "summary": "Send MFA PIN", "description": "Generates and sends a login PIN via the specified method (email or SMS). Requires a valid JWT token from the initial login.", "operationId": "5c72ebefedf27de4e2552c970a09eeb9", "parameters": [ { "name": "mfaOption", "in": "path", "description": "Method to send the PIN: email (default) or sms", "required": false, "schema": { "type": "string", "default": "email", "enum": [ "email", "sms" ] } } ], "responses": { "200": { "description": "PIN sent successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendPinResponse" } } } }, "401": { "description": "User not authorized" }, "429": { "description": "Maximum attempts reached" }, "500": { "description": "Could not send PIN" }, "503": { "description": "Authentication gateway unavailable" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/auth/pin/verify": { "post": { "tags": [ "Authentication" ], "summary": "Verify MFA PIN", "description": "Verifies the MFA PIN and returns a full authentication token. Requires the temporary JWT token from the initial login.", "operationId": "5f4adbec6a6eedd8be6332f0b05cabb8", "requestBody": { "description": "PIN verification data", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyLoginRequest" } } } }, "responses": { "200": { "description": "Authentication successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResource" } } } }, "401": { "description": "User not authorized" }, "429": { "description": "Invalid or expired PIN / Maximum attempts reached" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/email-exists": { "get": { "tags": [ "Authentication" ], "summary": "Check if email exists", "description": "Checks if an email address is already registered in the system.", "operationId": "345afa474b4097d1f2b85998d47f77c8", "parameters": [ { "name": "email", "in": "query", "description": "Email address to check", "required": true, "schema": { "type": "string", "format": "email" } } ], "responses": { "200": { "description": "Email existence check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmailExistsResponse" } } } }, "422": { "description": "Validation error" } } } }, "/api/verify/{token}": { "get": { "tags": [ "Authentication" ], "summary": "Verify user email", "description": "Verifies a user's email address using the token sent via email.", "operationId": "42c9e8cadeae189ee4abcfb844d7f9ee", "parameters": [ { "name": "token", "in": "path", "description": "Email verification token", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Verification result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyUserResponse" } } } } } } }, "/api/enroll": { "post": { "tags": [ "Authentication" ], "summary": "Enroll new user", "description": "Enrolls a new user into SponsorUnited. The user's email domain must match a registered organization. Credentials will be sent via email.", "operationId": "1ed175346dbfc108bd5f7654afbcba0b", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnrollRequest" } } } }, "responses": { "200": { "description": "Enrollment result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnrollResponse" } } } }, "422": { "description": "Validation error" } } } }, "/api/auth/passwords/email": { "post": { "tags": [ "Authentication" ], "summary": "Send password reset email", "description": "Sends a password reset link to the specified email address. Returns success even if email doesn't exist for security reasons.", "operationId": "d35a865c89c7b6977ccbfffbf4dbf5a4", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordRequest" } } } }, "responses": { "200": { "description": "Password reset email sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordResponse" } } } }, "422": { "description": "Validation error" } } } }, "/api/auth/passwords/reset": { "post": { "tags": [ "Authentication" ], "summary": "Reset password", "description": "Resets the user's password using the token received via email. Password must be at least 8 characters with mixed case and symbols.", "operationId": "af7b3ac0f01be02abbf5b940f6c10e96", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } } } }, "responses": { "200": { "description": "Password reset result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordResponse" } } } }, "422": { "description": "Validation error" } } } }, "/api/admin/brand-competitors/review-items": { "get": { "tags": [ "Brand Competitors" ], "summary": "List brand competitor review items", "description": "Paginated list of review items produced by the brand-competitor matching pipeline. Requires approve-company permission.", "operationId": "ef33ce8f47232350778e28b7a8128da2", "parameters": [ { "name": "status", "in": "query", "description": "Filter by review status. Defaults to pending.", "required": false, "schema": { "type": "string", "default": "pending", "enum": [ "pending", "approved", "rejected", "superseded" ] } }, { "name": "source_brand_id", "in": "query", "description": "Filter by source brand id (companies.id).", "required": false, "schema": { "type": "integer", "minimum": 1, "example": 4711 } }, { "name": "q", "in": "query", "description": "Substring search over raw_competitor_name / normalized_name.", "required": false, "schema": { "type": "string", "maxLength": 255, "example": "coca" } }, { "name": "order_by", "in": "query", "description": "Sort column. Default: last_seen_at.", "required": false, "schema": { "type": "string", "default": "last_seen_at", "enum": [ "last_seen_at", "first_seen_at", "suggested_score" ] } }, { "name": "order_direction", "in": "query", "description": "Sort direction. Default: desc.", "required": false, "schema": { "type": "string", "default": "desc", "enum": [ "asc", "desc" ] } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "minimum": 1, "example": 1 } }, { "name": "per_page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "example": 25 } } ], "responses": { "200": { "description": "Paginated review items.", "content": { "application/json": { "schema": { "properties": { "current_page": { "type": "integer", "example": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/BrandCompetitorReviewItemResource" } }, "first_page_url": { "type": "string", "nullable": true }, "from": { "type": "integer", "example": 1, "nullable": true }, "last_page": { "type": "integer", "example": 12 }, "last_page_url": { "type": "string", "nullable": true }, "links": { "type": "array", "items": { "properties": { "url": { "type": "string", "nullable": true }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "type": "object" } }, "next_page_url": { "type": "string", "nullable": true }, "path": { "type": "string", "nullable": true }, "per_page": { "type": "integer", "example": 25 }, "prev_page_url": { "type": "string", "nullable": true }, "to": { "type": "integer", "example": 25, "nullable": true }, "total": { "type": "integer", "example": 287 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/admin/brand-competitors/review-items/summary": { "get": { "tags": [ "Brand Competitors" ], "summary": "Summary of the brand competitor review queue", "description": "Returns count by status and the top source brands ranked by pending items. Requires approve-company permission.", "operationId": "06edd57996f87e3cf16b3f38425bdd9d", "responses": { "200": { "description": "Summary payload.", "content": { "application/json": { "schema": { "properties": { "counts": { "properties": { "pending": { "type": "integer", "example": 37 }, "approved": { "type": "integer", "example": 240 }, "rejected": { "type": "integer", "example": 15 }, "superseded": { "type": "integer", "example": 4 } }, "type": "object" }, "top_source_brands": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 4711 }, "name": { "type": "string", "example": "Coca-Cola Company" }, "pending_count": { "type": "integer", "example": 6 } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/admin/brand-competitors/review-items/{id}": { "get": { "tags": [ "Brand Competitors" ], "summary": "Show a brand competitor review item", "description": "Full detail with re-hydrated candidates_payload. Requires approve-company permission.", "operationId": "5994068bc291fd6584835d19294042fb", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Single review item.", "content": { "application/json": { "schema": { "properties": { "data": { "$ref": "#/components/schemas/BrandCompetitorReviewItemResource" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Review item not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/admin/brand-competitors/review-items/{id}/approve": { "post": { "tags": [ "Brand Competitors" ], "summary": "Approve a brand competitor review item", "description": "Marks the review item as approved and persists the resulting pair in brand_competitors. Requires approve-company permission.", "operationId": "c550a86e80111c831db9d16b2f54cafb", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveBrandCompetitorReviewItemRequest" } } } }, "responses": { "200": { "description": "Item approved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandCompetitorReviewItemResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Review item or resolution brand not found" }, "422": { "description": "Validation error (already resolved or self-link)" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/admin/brand-competitors/review-items/{id}/reject": { "post": { "tags": [ "Brand Competitors" ], "summary": "Reject a brand competitor review item", "description": "Marks the review item as rejected with a reason and optional note. Requires approve-company permission.", "operationId": "dddca4d8e4a781afaa11c6fd38fa1d2c", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectBrandCompetitorReviewItemRequest" } } } }, "responses": { "200": { "description": "Item rejected", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandCompetitorReviewItemResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Review item not found" }, "422": { "description": "Validation error (already resolved)" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/brand/{brandId}": { "get": { "tags": [ "Brands Social Scraping" ], "summary": "Get the social scraping sessions for a given brand", "operationId": "40acc3bffc296a02eaa3e3ec5c192579", "parameters": [ { "name": "brandId", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "platforms", "in": "query", "description": "Platforms", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "twitter", "instagram", "facebook", "tiktok" ] } } }, { "name": "page_number", "in": "query", "description": "Page number", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSocialScrapingSessionsResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/brand/{brandId}/session/{brandScrapingSessionId}": { "get": { "tags": [ "Brands Social Scraping" ], "summary": "Get the social scraping session properties for a given brand", "operationId": "87515f2028d4b950852fc27d9c0ff37d", "parameters": [ { "name": "brandId", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "brandScrapingSessionId", "in": "path", "description": "Brand scraping session ID", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSocialScrapingSessionPropertiesResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/brand/{brandId}/latest/{platform}/{handle}": { "get": { "tags": [ "Brands Social Scraping" ], "summary": "Get the latest social scraping session for a given brand", "operationId": "6301657bd4e4adf96ec75471aa78a72b", "parameters": [ { "name": "brandId", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "platform", "in": "path", "description": "Platform", "required": true, "schema": { "type": "string", "enum": [ "twitter", "instagram", "facebook", "tiktok" ] } }, { "name": "handle", "in": "path", "description": "Handle", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandLatestSocialScrapingSessionResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/brand/{brandId}/session/{scrapingSessionId}/matched-entity/{matchedEtityId}": { "delete": { "tags": [ "Brands Social Scraping" ], "summary": "Delete the matched entity from the posts of a social scraping session for a given brand", "operationId": "7dffac202e45aa05cbe52b8f3bb25020", "parameters": [ { "name": "brandId", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "brandScrapingSessionId", "in": "path", "description": "Brand scraping session ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "matchedEntityId", "in": "path", "description": "Matched property ID", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "Empty on successful operation" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/brand/{brandId}/session/{brandScrapingSessionId}/export": { "get": { "tags": [ "Brands Social Scraping" ], "summary": "Export the social scraping session properties for a given brand", "operationId": "5dff488f5bfccba6970ed64979d13b2e", "parameters": [ { "name": "brandId", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "brandScrapingSessionId", "in": "path", "description": "Brand scraping session ID", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "A csv file with data of properties for the given entity id and scraping session." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/brand-synonyms": { "get": { "tags": [ "BrandSynonym" ], "summary": "List brand synonyms", "description": "Returns all synonyms associated with a specific brand for search matching", "operationId": "a99fbc64272789926939be282f5d875d", "responses": { "200": { "description": "List of brand synonyms", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BrandSynonymIndexResource" } } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "BrandSynonym" ], "summary": "Create brand synonym", "description": "Creates a new synonym for a brand to improve search matching", "operationId": "367b001ca47c3c0a7bc990e9f0776bc3", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSynonymStoreRequest" } } } }, "responses": { "200": { "description": "The new brand synonym.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSynonymResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/brand-synonyms/{id}": { "get": { "tags": [ "BrandSynonym" ], "summary": "Get brand synonym", "description": "Returns the details of a specific brand synonym by ID", "operationId": "11fddf6004cf2152ff5469d0f5a29d9f", "parameters": [ { "name": "id", "in": "path", "description": "The id of the brand synonym to fetch.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "A brand synonym with the given id.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSynonymResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "BrandSynonym" ], "summary": "Update brand synonym", "description": "Updates an existing brand synonym's text value", "operationId": "533cfd766b12e2a4265129866aa29b01", "parameters": [ { "name": "id", "in": "path", "description": "The id of the brand synonym to update.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSynonymUpdateRequest" } } } }, "responses": { "200": { "description": "The updated brand synonym.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrandSynonymResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "BrandSynonym" ], "summary": "Delete brand synonym", "description": "Permanently removes a brand synonym from the system", "operationId": "f3142a208a67ca04993529109cbc6769", "parameters": [ { "name": "id", "in": "path", "description": "Id of brand synonym to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when brand synonym has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/campaign": { "get": { "tags": [ "Campaign" ], "summary": "List all campaigns", "description": "Retrieves a list of all campaigns for the authenticated user.", "operationId": "ce69497e98cccfa18649dece699570fd", "responses": { "200": { "description": "List of campaigns.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Campaign" ], "summary": "Create a new campaign", "description": "Creates a new campaign for the authenticated user.", "operationId": "e8348bef63e3bb96a143ee46402cccab", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "entityId", "entityType" ], "properties": { "entityId": { "description": "The entity ID", "type": "integer" }, "entityType": { "description": "The entity type", "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Campaign creation result.", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/campaign/{id}/meta": { "post": { "tags": [ "Campaign" ], "summary": "Update campaign metadata", "description": "Creates or replaces metadata entries for a specific campaign.", "operationId": "4563fbc3450f25c86bd32aa0d811397f", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the campaign.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "type", "data" ], "properties": { "type": { "description": "The metadata type prefix", "type": "string" }, "data": { "description": "Key-value pairs of metadata", "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Campaign metadata updated.", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/campaign/draft": { "get": { "tags": [ "Campaign" ], "summary": "Get draft campaign", "description": "Retrieves the current user's draft campaign with its metadata.", "operationId": "710500032cf488a2308d634c724ebec0", "responses": { "200": { "description": "The draft campaign or null if none exists.", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category": { "get": { "tags": [ "Category" ], "summary": "List all categories", "description": "Returns a list of all categories with subcategory counts. Results are cached for 5 minutes.", "operationId": "327644f4d836240fa297b2822ab6ca92", "parameters": [ { "name": "name", "in": "query", "description": "Filter categories by name prefix", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of categories", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Automotive" }, "synopsis": { "type": "string", "nullable": true }, "subcategories_count": { "type": "integer", "example": 15 } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Category" ], "summary": "Create a new category", "description": "Creates a new category with the provided name and optional synopsis", "operationId": "de40ad04180a48262a05cf249f785ab3", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryStoreRequest" } } } }, "responses": { "200": { "description": "Category created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Automotive" }, "synopsis": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/{categoryId}/subcategories": { "get": { "tags": [ "Category" ], "summary": "Get category with its subcategories", "description": "Returns a category with all its associated subcategories", "operationId": "5ac8a30a0a3c05aac34caee11cee81f4", "parameters": [ { "name": "categoryId", "in": "path", "description": "ID of the category", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Category with subcategories", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "subcategories": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "category_id": { "type": "integer" } }, "type": "object" } } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/subcategories/{subcategoryId}/export/contacts": { "get": { "tags": [ "Category" ], "summary": "Export contacts for a subcategory", "description": "Exports all brand contacts for a given subcategory as a CSV file", "operationId": "c90e8190971834f196af3f29be981524", "parameters": [ { "name": "subcategoryId", "in": "path", "description": "ID of the subcategory", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "CSV file with contacts", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Subcategory not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/subcategories": { "get": { "tags": [ "Category" ], "summary": "Get extended list of categories with subcategories", "description": "Returns all categories with their subcategories including extended information like teams with deals, revenue per deal, rank, brands count, and contacts count", "operationId": "e5177fd1e6da08384c1a3ce8e12f0565", "responses": { "200": { "description": "Extended list of subcategories with category information", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "subcategory_id": { "type": "integer" }, "subcategory_name": { "type": "string" }, "teams_w_deal": { "type": "integer" }, "rev_per_deal": { "type": "number" }, "rank": { "type": "integer" }, "brands_count": { "type": "integer" }, "contacts_count": { "type": "integer" }, "category_id": { "type": "integer" }, "category_name": { "type": "string" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/brands/categories": { "get": { "tags": [ "Category" ], "summary": "Get all categories with subcategories", "description": "Returns cached list of all categories with their subcategories", "operationId": "dc4b547df11e479d1c62778cf173bcaa", "responses": { "200": { "description": "List of categories with subcategories", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "subcategories": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/with-teams/{categoryId}": { "get": { "tags": [ "Category" ], "summary": "Get category with audited properties", "description": "Returns categories that have audited properties (teams). If categoryId is provided, filters to that specific category.", "operationId": "8bc1ece7d7c47fc62daeacd3506a89a5", "parameters": [ { "name": "categoryId", "in": "path", "description": "ID of the category (optional)", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of categories with audited properties", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/{id}": { "get": { "tags": [ "Category" ], "summary": "Get a category by ID", "description": "Returns a single category by its ID", "operationId": "25690688339275caf7ded3e8702e7670", "parameters": [ { "name": "id", "in": "path", "description": "ID of the category", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Category details", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Automotive" }, "synopsis": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Category" ], "summary": "Update a category", "description": "Updates an existing category with the provided data", "operationId": "9be67b4880d28356ade2ebc0b425415e", "parameters": [ { "name": "id", "in": "path", "description": "ID of the category to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryUpdateRequest" } } } }, "responses": { "204": { "description": "Category updated successfully" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Category not found" }, "422": { "description": "Validation error" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Category" ], "summary": "Delete a category", "description": "Soft deletes a category by its ID", "operationId": "534a636fb456263f752f0983f8097fb5", "parameters": [ { "name": "id", "in": "path", "description": "ID of the category to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Category deleted successfully" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Category not found" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/{id}/intent": { "get": { "tags": [ "Category" ], "summary": "Get category intent data", "description": "Returns intent measurement data for a category including brands count and audits count", "operationId": "8e13bcbaa1070ba06f5e70505c69f87f", "parameters": [ { "name": "id", "in": "path", "description": "ID of the category", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Category intent data", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "brands_count": { "type": "integer" }, "audits_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/{oldId}/reassign/{newId}": { "put": { "tags": [ "Category" ], "summary": "Reassign subcategories to another category", "description": "Reassigns all subcategories from one category to another and returns intent data for the old category", "operationId": "938c724b855fe2503eb00c86d38ea942", "parameters": [ { "name": "oldId", "in": "path", "description": "ID of the source category", "required": true, "schema": { "type": "integer" } }, { "name": "newId", "in": "path", "description": "ID of the target category", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Reassignment successful, returns intent data for old category", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "brands_count": { "type": "integer" }, "audits_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Category not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/download": { "get": { "tags": [ "Category" ], "description": "The endpoint returns list of exported categories", "operationId": "8fe5c701866791d2605caa179ddea8cc", "responses": { "200": { "description": "A response with categories" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/category/subcategories/download": { "get": { "tags": [ "Category" ], "description": "The endpoint returns list of exported subcategories", "operationId": "67421d0d3de41e23c90b996497f01dcc", "responses": { "200": { "description": "A response with subcategories" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company": { "get": { "tags": [ "Brand" ], "summary": "List brands", "description": "Returns a paginated list of brands with optional filtering by categories, subcategories, markets, and name. Supports sorting and includes revenue counts when requested", "operationId": "3e0bffb951b3f31f83aadc004638122b", "parameters": [ { "name": "CompanyIndexRequest", "in": "query", "schema": { "$ref": "#/components/schemas/CompanyIndexRequest" } } ], "responses": { "200": { "description": "A list of companies with some relations.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Brand" ], "summary": "Create a new brand", "description": "Creates a new brand with the provided data. Auto-approves if user has the appropriate permission", "operationId": "faf1545d2af89079ca55c4f9ed6ea302", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "name", "logo", "category_id", "subcategory_id", "website", "locations" ], "properties": { "name": { "description": "Brand name", "type": "string" }, "logo": { "description": "Logo image URL or ID", "type": "string" }, "category_id": { "description": "Category ID", "type": "integer" }, "subcategory_id": { "description": "Subcategory ID", "type": "integer" }, "corporate_phone": { "type": "string", "nullable": true }, "website": { "description": "Brand website URL", "type": "string" }, "linkedin": { "description": "LinkedIn URL", "type": "string", "nullable": true }, "locations": { "type": "array", "items": { "type": "object" } }, "youtube": { "type": "string", "nullable": true }, "twitter": { "type": "string", "nullable": true }, "facebook": { "type": "string", "nullable": true }, "instagram": { "type": "string", "nullable": true }, "twitch": { "type": "string", "nullable": true }, "tiktok": { "type": "string", "nullable": true }, "synopsis": { "type": "string", "nullable": true }, "markets": { "type": "array", "items": { "type": "object" }, "nullable": true }, "organizations": { "type": "array", "items": { "type": "integer" }, "nullable": true }, "agencies": { "type": "array", "items": { "type": "object" }, "nullable": true }, "brands": { "type": "array", "items": { "type": "object" }, "nullable": true }, "parent_company_id": { "type": "integer", "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "Brand created successfully", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error or duplicate entry" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/download": { "get": { "tags": [ "Brand" ], "summary": "Export brands to CSV", "description": "Exports a list of brands matching the filter criteria as a downloadable CSV file. Supports the same filters as the list endpoint", "operationId": "b199230656befd10721e0df2d25bbd64", "responses": { "200": { "description": "A response with brands" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/{id}": { "get": { "tags": [ "Brand" ], "summary": "Get brand details", "description": "Returns detailed information about a specific brand including agencies, contacts, markets, organizations, social handles, financial data (single entry for the most recent fiscal year, with revenue tier), the list of available revenue tiers (financial_data_available_revenue_tiers), and related data", "operationId": "29b0f8f11c5e74b0c7a9f94f223c0abc", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } }, { "name": "with_audits", "in": "query", "description": "Include audit counts", "required": false, "schema": { "type": "boolean" } }, { "name": "with_revenues_count", "in": "query", "description": "Include revenue counts", "required": false, "schema": { "type": "boolean" } }, { "name": "with_has_spend_tracker_data", "in": "query", "description": "Include spend tracker data availability flag", "required": false, "schema": { "type": "boolean" } }, { "name": "with_trashed", "in": "query", "description": "Include soft-deleted brands", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Brand details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Brand not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Brand" ], "summary": "Update a brand", "description": "Updates an existing brand with the provided data including social handles, markets, organizations, and agencies", "operationId": "dba5691bd7818c368accfd785048ea90", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "name", "logo", "category_id", "subcategory_id", "website", "locations" ], "properties": { "name": { "type": "string" }, "logo": { "type": "string" }, "category_id": { "type": "integer" }, "subcategory_id": { "type": "integer" }, "corporate_phone": { "type": "string", "nullable": true }, "website": { "type": "string" }, "linkedin": { "type": "string", "nullable": true }, "locations": { "type": "array", "items": { "type": "object" } }, "youtube": { "type": "string", "nullable": true }, "twitter": { "type": "string", "nullable": true }, "facebook": { "type": "string", "nullable": true }, "instagram": { "type": "string", "nullable": true }, "twitch": { "type": "string", "nullable": true }, "tiktok": { "type": "string", "nullable": true }, "synopsis": { "type": "string", "nullable": true }, "markets": { "type": "array", "items": { "type": "object" }, "nullable": true }, "organizations": { "type": "array", "items": { "type": "integer" }, "nullable": true }, "agencies": { "type": "array", "items": { "type": "object" }, "nullable": true }, "brands": { "type": "array", "items": { "type": "object" }, "nullable": true }, "parent_company_id": { "type": "integer", "nullable": true }, "primary_profile": { "type": "object", "nullable": true }, "secondary_profiles": { "type": "array", "items": { "type": "object" }, "nullable": true }, "financial_data": { "description": "Manual correction of the brand's financial data, upserted by fiscal year and marked as a MANUAL estimate. A brand keeps a single manual row: sending a different fiscal year re-dates the brand's current financial data and any other manual rows (leftovers of previous fiscal-year edits) are removed, so the edit is what subsequent reads return. The revenue tier is not editable \u2014 it is derived on the backend from the revenue being saved (estimated figure for public companies, midpoint of the min/max range for private ones) and cleared when the revenue is cleared. Omit the key entirely when there is nothing to change", "required": [ "most_recent_fiscal_year" ], "properties": { "most_recent_fiscal_year": { "type": "integer", "example": 2025 }, "revenue_range_low_usd": { "description": "Lower bound of the revenue range in USD; the revenue is edited as this pair for public and private companies alike. Must be sent together with revenue_range_high_usd; both null clears the range", "type": "number", "example": 1900000000, "nullable": true }, "revenue_range_high_usd": { "description": "Upper bound of the revenue range in USD. Must be greater than or equal to revenue_range_low_usd; for public companies the bounds must be equal (the single reported figure)", "type": "number", "example": 2400000000, "nullable": true }, "is_public": { "description": "Public/private toggle. Switching to private is rejected while a ticker is set. Public companies store their single revenue figure as equal range bounds; private companies may carry a real spread", "type": "boolean" }, "ticker": { "description": "Stock ticker symbol; only editable for public companies", "type": "string", "maxLength": 10, "example": "KO", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Brand updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Brand not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Brand" ], "summary": "Delete a brand", "description": "Soft deletes a brand and cleans up associated data including contacts, social handles, and profile links. Prevents deletion of parent brands that have child brands. Requires delete administration companies permission", "operationId": "a073402836212623826fbe1e5a591454", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." }, "200": { "description": "Cannot remove Brand", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/{id}/approved": { "put": { "tags": [ "Brand" ], "summary": "Approve a brand", "description": "Approves a brand by setting its approved status. Requires approve company permission", "operationId": "d30b29c4f2531b7c2171e1a34a768789", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "approved": { "description": "Approval status", "type": "boolean" } }, "type": "object" } } } }, "responses": { "200": { "description": "Brand approved successfully", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Brand not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/{id}/social-handles": { "put": { "tags": [ "Brand" ], "summary": "Add social handle to brand", "description": "Assigns an unmatched social handle to a brand and triggers a rescan", "operationId": "a970398ff43ab364470641b8118cc660", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "handle", "type" ], "properties": { "handle": { "description": "Social media handle", "type": "string" }, "type": { "description": "Social platform type (twitter, facebook, instagram, tiktok)", "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Social handle added successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResource" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" }, "500": { "description": "Failed to add social handle", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/{id}/social-handles/multiple": { "put": { "tags": [ "Brand" ], "summary": "Add multiple social handles to brand", "description": "Assigns multiple unmatched social handles to a brand", "operationId": "b64f45988c333b73cc71385e3a099eeb", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "handles", "type" ], "properties": { "handles": { "description": "Array of social media handles", "type": "array", "items": { "type": "string" } }, "type": { "description": "Social platform type", "type": "string", "enum": [ "twitter", "facebook", "instagram", "tiktok" ] } }, "type": "object" } } } }, "responses": { "200": { "description": "Social handles added successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Social handles added successfully" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" }, "500": { "description": "Failed to add social handles", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/quick-edit/{id}": { "put": { "tags": [ "Brand" ], "summary": "Quick edit a brand", "description": "Performs a quick update on a brand with limited fields (category, subcategory, parent company, markets)", "operationId": "f5debdcf80b4e606bdc3320e60005fae", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "category_id", "subcategory_id" ], "properties": { "category_id": { "description": "Category ID", "type": "integer" }, "subcategory_id": { "description": "Subcategory ID", "type": "integer" }, "parent_company_id": { "description": "Parent company ID", "type": "integer", "nullable": true }, "markets": { "type": "array", "items": { "type": "object" }, "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "Brand updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Brand not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/exists": { "get": { "tags": [ "Brand" ], "summary": "Check if brand exists", "description": "Checks if a brand with the given name already exists in the database", "operationId": "e178f5a55a7e826c62dfa6e9d154e71f", "parameters": [ { "name": "name", "in": "query", "description": "Brand name to check", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Count of brands with the given name", "content": { "application/json": { "schema": { "type": "integer" }, "example": 0 } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/{old_id}/reassign/{new_id}": { "put": { "tags": [ "Brand" ], "summary": "Reassign brand data", "description": "Reassigns all data (audits, contacts, locations, etc.) from one brand to another. Adds the old brand's name as a synonym for the new brand", "operationId": "c2802e6e6b434a4ab6f91d92259e5736", "parameters": [ { "name": "old_id", "in": "path", "description": "Source brand ID to reassign from", "required": true, "schema": { "type": "integer" } }, { "name": "new_id", "in": "path", "description": "Target brand ID to reassign to", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Reassignment successful, returns intent measurement data", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "audits_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Brand not found" }, "500": { "description": "Operation not permitted or query failure" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/brand/{id}/properties/{year}": { "post": { "tags": [ "Brand" ], "summary": "Get brand deals by season", "description": "Returns paginated brand deals for a specific season with filtering options. Supports CSV download", "operationId": "a195f821ab9ad56096e70493cf181f51", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } }, { "name": "year", "in": "path", "description": "Season year. The segment may be omitted, in which case the current year is used", "required": true, "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "description": "Number of results per page", "required": false, "schema": { "type": "integer" } }, { "name": "page", "in": "query", "description": "Page number", "required": false, "schema": { "type": "integer" } }, { "name": "download", "in": "query", "description": "Download as CSV", "required": false, "schema": { "type": "boolean" } }, { "name": "with_brands", "in": "query", "description": "Include child brands", "required": false, "schema": { "type": "boolean" } }, { "name": "property_type", "in": "query", "description": "Filter by property type IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "market", "in": "query", "description": "Filter by market IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "item_type", "in": "query", "description": "Filter by asset types (comma-separated: sponsor, digital, tv, radio, vendor, other)", "required": false, "schema": { "type": "string" } }, { "name": "order_by", "in": "query", "description": "Sort field", "required": false, "schema": { "type": "string", "enum": [ "property", "property_type", "market", "total_assets_count", "deal_revenues" ] } }, { "name": "order_direction", "in": "query", "description": "Sort direction", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "Brand deals data with metadata", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/brand/{id}/properties/metadata/{year}": { "post": { "tags": [ "Brand" ], "summary": "Get brand deals metadata", "description": "Returns metadata for brand deals filtering including available properties, property types, markets, item types, and spend range", "operationId": "81ad3bfcad5cac9e389f292c5e33ef20", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } }, { "name": "year", "in": "path", "description": "Season year. The segment may be omitted, in which case the current year is used", "required": true, "schema": { "type": "string" } }, { "name": "with_brands", "in": "query", "description": "Include child brands", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Filter metadata", "content": { "application/json": { "schema": { "properties": { "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "text": { "type": "string" } }, "type": "object" } }, "property_types": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "text": { "type": "string" } }, "type": "object" } }, "markets": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "text": { "type": "string" } }, "type": "object" } }, "item_types": { "type": "array", "items": { "properties": { "name": { "type": "string" }, "text": { "type": "string" } }, "type": "object" } }, "spend_range": { "properties": { "min": { "type": "integer" }, "max": { "type": "integer" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/company/{id}/exclude-from-transcribe": { "put": { "tags": [ "Brand" ], "summary": "Exclude brand from transcribe", "description": "Sets the exclude_from_transcribe flag for a brand", "operationId": "adfac58a5a03047c729a5f88a48f7c7b", "parameters": [ { "name": "id", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "exclude": { "description": "Whether to exclude from transcribe", "type": "boolean" } }, "type": "object" } } } }, "responses": { "200": { "description": "Brand updated successfully", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Brand not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/bad-email-report": { "get": { "tags": [ "Contact" ], "summary": "List bad email reports for the authenticated user", "description": "Returns paginated bad email reports submitted by the current user", "operationId": "041a0c64cd5f3b1493ccfa9e73e6fab8", "parameters": [ { "name": "status", "in": "query", "description": "Filter by report status", "required": false, "schema": { "type": "string", "enum": [ "pending", "new_email_found", "new_company", "confirmed_valid", "scraping_failed", "deleted" ] } } ], "responses": { "200": { "description": "Paginated list of reports", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/BadEmailReportResource" } }, "links": { "properties": { "first": { "type": "string", "nullable": true }, "last": { "type": "string", "nullable": true }, "prev": { "type": "string", "nullable": true }, "next": { "type": "string", "nullable": true } }, "type": "object" }, "meta": { "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer", "nullable": true }, "last_page": { "type": "integer" }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "to": { "type": "integer", "nullable": true }, "total": { "type": "integer" } }, "type": "object" } }, "type": "object" } } } }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Contact" ], "summary": "Report a bad email for a contact", "description": "Creates a bad email report and queues the contact for priority scraping", "operationId": "2192a4af73ceff3ad02cb76ac09de32e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportBadEmailRequest" } } } }, "responses": { "201": { "description": "Report created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadEmailReportResource" } } } }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{contactableEntity}/{contactableId}/owner/{ownerId}": { "get": { "tags": [ "Contact" ], "summary": "List contacts for an entity", "description": "Returns all contacts associated with a specific entity (agency, property, brand, or sale) for a given owner. Optionally includes brand relationships and LinkedIn data", "operationId": "0306c0e4317485d19459722d711cffaa", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } }, { "name": "ownerId", "in": "path", "description": "Id of an owner for which to fetch contacts.", "required": true, "schema": { "type": "integer" } }, { "name": "ContactsIndexRequest", "in": "query", "schema": { "$ref": "#/components/schemas/ContactIndexRequest" } } ], "responses": { "200": { "description": "All the person profiles associated with the given entity type and id.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/AgencyContactIndexResource" }, { "$ref": "#/components/schemas/PropertyContactIndexResource" }, { "$ref": "#/components/schemas/BrandContactIndexResource" }, { "$ref": "#/components/schemas/SaleContactIndexResource" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{contactableEntity}/{contactableId}/export": { "get": { "tags": [ "Contact" ], "summary": "Export sale contacts", "description": "Exports sale contacts for a specific entity as a downloadable file. Returns contact information in CSV format", "operationId": "e8ec2765a7baa4d98a6676151b50ba45", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Export profile contact." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{contactableEntity}/{contactableId}": { "post": { "tags": [ "Contact" ], "summary": "Create a new contact", "description": "Creates a new person profile and links it to the specified entity (agency, property, brand, or sale). Handles profile picture upload and optional sale list assignment. Agency/property/brand contacts also accept service X-API-Key authentication", "operationId": "6490ccfff8d5d83d765e6e718cd8ffb8", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreContactRequest" } } } }, "responses": { "201": { "description": "A new person profile linked to the given entity.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/AgencyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/PropertyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/BrandContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/SaleContactShowStoreUpdateResource" } ] } } } } }, "security": [ { "bearerAuth": [] }, { "apiKeyAuth": [] } ] } }, "/api/contacts/{contactableEntity}/{contactableId}/sale-contact": { "post": { "tags": [ "Contact" ], "summary": "Create sale contacts from existing profiles", "description": "Creates sale contacts by linking existing person profiles to a brand entity. Automatically creates or retrieves a deal tracker entry and assigns contacts to a sale list", "operationId": "609cb760d7d7c591e132910cb7b72f09", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactCreateSaleRequest" } } } }, "responses": { "201": { "description": "A new person profile linked to the given entity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaleContactShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Contact" ], "summary": "Bulk-remove sale contacts from a sale list", "description": "Removes multiple person profiles from a single sale list in one request. Accepts explicit IDs, an exclude list, or empty body (remove all on the list).", "operationId": "3ee16edfaab3704bb1556faaa2777a1c", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactDeleteSaleRequest" } } } }, "responses": { "204": { "description": "All contacts removed." }, "207": { "description": "Partial success; some contacts were skipped.", "content": { "application/json": { "schema": { "properties": { "removed": { "type": "array", "items": { "type": "integer" } }, "skipped": { "type": "array", "items": { "properties": { "person_profile_id": { "type": "integer" }, "reason": { "type": "string", "enum": [ "not_found", "forbidden", "error" ] } }, "type": "object" } } }, "type": "object" } } } }, "403": { "description": "Forbidden" }, "404": { "description": "No sale found for the authenticated user on this list." }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{contactableEntity}/{contactableId}/{personProfileId}": { "get": { "tags": [ "Contact" ], "summary": "Get a specific contact", "description": "Retrieves detailed information about a specific contact associated with an entity, including tasks and sale information if applicable", "operationId": "14f7dc7de933883fdbdf260c9c663bdf", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } }, { "name": "personProfileId", "in": "path", "description": "Id of a person profile", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The person profile associated with the given entity id.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/AgencyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/PropertyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/BrandContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/SaleContactShowStoreUpdateResource" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Contact" ], "summary": "Update a contact", "description": "Updates an existing contact's information including profile details, contact information, and entity associations. Validates email and LinkedIn URL uniqueness within the context. Agency/property/brand contacts also accept service X-API-Key authentication", "operationId": "237249d98b1cd86f6ea34bfe6bd05d5d", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } }, { "name": "personProfileId", "in": "path", "description": "Id of a person profile", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateContactRequest" } } } }, "responses": { "201": { "description": "The updated Person Profile associated to the given agency.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/AgencyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/PropertyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/BrandContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/SaleContactShowStoreUpdateResource" } ] } } } } }, "security": [ { "bearerAuth": [] }, { "apiKeyAuth": [] } ] }, "delete": { "tags": [ "Contact" ], "summary": "Delete a contact", "description": "Removes a contact's association with an entity. For brand contacts with multiple entity links, only removes the specific brand association. Handles cleanup of related data including search indexes", "operationId": "fa53415c5f3eabb912756e673472f632", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } }, { "name": "personProfileId", "in": "path", "description": "Id of a person profile", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when person profile has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/by-email": { "post": { "tags": [ "Contact" ], "summary": "Search contacts by email", "description": "Searches for contacts matching the provided email address. Can optionally skip sale contacts in the results", "operationId": "49a5258635a63a87c1b3d8c12685c60d", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactSearchByEmailRequest" } } } }, "responses": { "201": { "description": "An array with contacts with the given email.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactSearchByEmailResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/by-school": { "post": { "tags": [ "Contact" ], "summary": "Search contacts by school", "description": "Initiates an asynchronous search for university contacts by school name and contact type. Results are sent via email to the requesting user", "operationId": "331f5a4226c46cf1e8711d8311e5bcc3", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactSearchBySchoolRequest" } } } }, "responses": { "200": { "description": "Status code 200" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{contactableEntity}/{contactableId}/{personProfileId}/email-status": { "put": { "tags": [ "Contact" ], "summary": "Update contact email status", "description": "Updates the email validation status for a contact. Used to mark emails as valid, invalid, or pending verification based on validation results", "operationId": "8f017d74ad937910f805f67b00a74108", "parameters": [ { "name": "contactableEntity", "in": "path", "description": "Type of an entity (agency, property, brand, sale)", "required": true, "schema": { "type": "string" } }, { "name": "contactableId", "in": "path", "description": "Id of an entity", "required": true, "schema": { "type": "integer" } }, { "name": "personProfileId", "in": "path", "description": "Id of a person profile", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateContactEmailStatusRequest" } } } }, "responses": { "201": { "description": "The updated Person Profile associated to the given entity.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/AgencyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/PropertyContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/BrandContactShowStoreUpdateResource" }, { "$ref": "#/components/schemas/SaleContactShowStoreUpdateResource" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/email/status/file": { "get": { "tags": [ "Contact" ], "summary": "List email status files", "description": "Returns a paginated list of all imported files used for contact email status updates, with filtering and sorting options", "operationId": "9fef12997efe24fad8637880403e5945", "parameters": [ { "$ref": "#/components/parameters/ContactEmailStatusFileIndexRequest-user-id" }, { "$ref": "#/components/parameters/ContactEmailStatusFileIndexRequest-order-by" }, { "$ref": "#/components/parameters/ContactEmailStatusFileIndexRequest-order-direction" }, { "$ref": "#/components/parameters/ContactEmailStatusFileIndexRequest-page" }, { "$ref": "#/components/parameters/ContactEmailStatusFileIndexRequest-per-page" } ], "responses": { "200": { "description": "All imported files for contact email status updates.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactEmailStatusFileIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Contact" ], "summary": "Upload email status file", "description": "Uploads a CSV file containing email addresses and their validation statuses. The file is stored in S3 and processed asynchronously to update contact email statuses", "operationId": "eae7aea8cf5fdbceb8e9b0fc8cb7e245", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/ContactEmailStatusFileRequest" } } } }, "responses": { "200": { "description": "All imported contact emails and their statuses.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactEmailStatusFileResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/email/status/file/metadata": { "get": { "tags": [ "Contact" ], "summary": "Get email status file metadata", "description": "Returns aggregated metadata for all imported email status files, including user information and file statistics", "operationId": "eed8babdac423ea49c65826c4e05c145", "responses": { "200": { "description": "Metadata for all imported files for contact email status updates.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactEmailStatusFileMetadataResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/email/status/file/{filename}": { "get": { "tags": [ "Contact" ], "summary": "Get email status file download URL", "description": "Generates a temporary AWS S3 presigned URL for downloading the specified email status file", "operationId": "6a96bffd311623076b41ffba48a488d3", "parameters": [ { "name": "filename", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The temporary AWS S3 download url." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/linkedin/scraping": { "post": { "tags": [ "Contact" ], "summary": "Scrape LinkedIn profiles", "description": "Scrape Linkedin profiles by given urls", "operationId": "ffeb5fd41ee874b74560bb189e824ad7", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactLinkedinScrapeShowRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactLinkedinScrapedDataResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{entityType}/{entityId}/employees/linkedin": { "post": { "tags": [ "Contact" ], "summary": "Search LinkedIn employees by entity", "description": "Search for LinkedIn employees by company (agency/brand/property) and job title", "operationId": "ee9e74b1d0463ba8d8caee61c130b715", "parameters": [ { "name": "entityType", "in": "path", "description": "Type of entity (agency, brand, or property)", "required": true, "schema": { "type": "string", "enum": [ "agency", "brand", "property" ] } }, { "name": "entityId", "in": "path", "description": "ID of the entity", "required": true, "schema": { "type": "integer" } }, { "name": "title", "in": "query", "description": "Job title to search for (optional; when omitted, all employees are returned without a title filter)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinkedinEmployeeSearchResource" } } } }, "202": { "description": "AI filtering is being processed asynchronously", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AsyncEmployeeFilteringResource" } } } }, "404": { "description": "Entity not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "422": { "description": "Validation error or missing LinkedIn URLs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "502": { "description": "Social platforms API error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/contacts/{entityType}/{entityId}/employees/linkedin/on-demand": { "post": { "tags": [ "Contact" ], "summary": "Request a user-triggered LinkedIn employee scrape", "description": "Initiates an async LinkedIn employee scrape for an entity. Returns 202 immediately; a notification is sent when complete.", "operationId": "4af969912d081bdf4a715b3371f65990", "parameters": [ { "name": "entityType", "in": "path", "description": "Type of entity (agency, brand, or property)", "required": true, "schema": { "type": "string", "enum": [ "agency", "brand", "property" ] } }, { "name": "entityId", "in": "path", "description": "ID of the entity", "required": true, "schema": { "type": "integer" } } ], "responses": { "202": { "description": "Scrape accepted; notification will be sent on completion", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "type": "object" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "409": { "description": "A scrape is already in progress for this entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "422": { "description": "Entity is missing LinkedIn URLs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "502": { "description": "Social platforms API error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/linkedin-profile-url/check": { "get": { "tags": [ "LinkedIn" ], "summary": "Check if a LinkedIn profile URL is linked to any contacts", "description": "Validates whether a given LinkedIn profile URL is already associated with existing contacts in the system to help prevent duplicate entries", "operationId": "75903c105d2415609f98aaa769991c2a", "parameters": [ { "name": "profile_url", "in": "query", "description": "The LinkedIn profile URL to check", "required": true, "schema": { "type": "string", "format": "uri" } } ], "responses": { "200": { "description": "LinkedIn profile URL check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactInformationCheckResource" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "required": [ "error" ], "properties": { "error": { "type": "string", "example": "The profile url field is required." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/webhooks/phantombuster/employee-search": { "post": { "tags": [ "Webhooks" ], "description": "Handle PhantomBuster employee search completion webhook", "operationId": "4b2ec455c53b650fb41ef1624e09ee23", "parameters": [ { "name": "token", "in": "query", "description": "Security token: hash('sha256', secret + agentId)", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhantombusterEmployeeSearchWebhookRequest" } } } }, "responses": { "200": { "description": "Webhook received successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Webhook received" } }, "type": "object" } } } }, "403": { "description": "Forbidden - Invalid token" } } } }, "/api/webhooks/phantombuster/on-demand-employee-search": { "post": { "tags": [ "Webhooks" ], "description": "Handle PhantomBuster on-demand employee search completion webhook", "operationId": "2bd6564486756b0447fb1ec917becb54", "parameters": [ { "name": "token", "in": "query", "description": "Security token: hash('sha256', secret + agentId)", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhantombusterEmployeeSearchWebhookRequest" } } } }, "responses": { "200": { "description": "Webhook received successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Webhook received" } }, "type": "object" } } } }, "403": { "description": "Forbidden - Invalid token" } } } }, "/api/contacts/primary-email/check": { "get": { "tags": [ "Contact" ], "summary": "Check if a primary email is linked to any contacts", "description": "Validates whether a given primary email address is already associated with existing contacts in the system to help prevent duplicate entries", "operationId": "50840c1a93f2e320ab5ffa64cd65f6ff", "parameters": [ { "name": "email", "in": "query", "description": "The primary email address to check", "required": true, "schema": { "type": "string", "format": "email" } } ], "responses": { "200": { "description": "Primary email check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactInformationCheckResource" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "required": [ "error" ], "properties": { "error": { "type": "string", "example": "The email field is required." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/active-articles": { "get": { "tags": [ "News" ], "summary": "List active news articles", "description": "Returns a paginated list of active curated news with optional filtering by tags, brands, properties, agencies, and markets", "operationId": "e4fa099a4fa10fee9854622f2fd726f7", "parameters": [ { "name": "ActiveCuratedNewsRequest", "in": "query", "schema": { "$ref": "#/components/schemas/ActiveCuratedNewsRequest" } } ], "responses": { "200": { "description": "A paginated list of active curated news.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveCuratedNewsResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/all-articles": { "get": { "tags": [ "News" ], "summary": "List all curated news articles", "description": "Returns a paginated list of all curated news articles with optional filtering by company, agency, team, category, subcategory, league, news tag, reporter, and date range. Requires view news permission.", "operationId": "getAllCuratedNews", "parameters": [ { "name": "perPage", "in": "query", "description": "Items per page", "schema": { "type": "integer" } }, { "name": "company", "in": "query", "description": "Comma-separated company IDs", "schema": { "type": "string" } }, { "name": "agency", "in": "query", "description": "Comma-separated agency IDs", "schema": { "type": "string" } }, { "name": "team", "in": "query", "description": "Comma-separated team IDs", "schema": { "type": "string" } }, { "name": "category", "in": "query", "description": "Comma-separated category IDs", "schema": { "type": "string" } }, { "name": "subcategory", "in": "query", "description": "Comma-separated subcategory IDs", "schema": { "type": "string" } }, { "name": "league", "in": "query", "description": "Comma-separated league IDs", "schema": { "type": "string" } }, { "name": "newsTag", "in": "query", "description": "Comma-separated news tag IDs", "schema": { "type": "string" } }, { "name": "reporter", "in": "query", "description": "Comma-separated reporter user IDs", "schema": { "type": "string" } }, { "name": "publishedAfter", "in": "query", "description": "Filter articles published after this date", "schema": { "type": "string", "format": "date-time" } }, { "name": "publishedBefore", "in": "query", "description": "Filter articles published before this date", "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Paginated list of curated news articles", "content": { "application/json": { "schema": { "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/CuratedNews" } }, "first_page_url": { "type": "string", "nullable": true }, "from": { "type": "integer", "nullable": true }, "last_page": { "type": "integer" }, "last_page_url": { "type": "string" }, "next_page_url": { "type": "string", "nullable": true }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "prev_page_url": { "type": "string", "nullable": true }, "to": { "type": "integer", "nullable": true }, "total": { "type": "integer" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing view news permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/export/all-articles": { "get": { "tags": [ "News" ], "summary": "Export curated news articles", "description": "Downloads curated news articles as a file export with optional filtering by company, agency, team, category, subcategory, league, news tag, reporter, and date range.", "operationId": "exportCuratedNews", "parameters": [ { "name": "company", "in": "query", "description": "Comma-separated company IDs", "schema": { "type": "string" } }, { "name": "agency", "in": "query", "description": "Comma-separated agency IDs", "schema": { "type": "string" } }, { "name": "team", "in": "query", "description": "Comma-separated team IDs", "schema": { "type": "string" } }, { "name": "category", "in": "query", "description": "Comma-separated category IDs", "schema": { "type": "string" } }, { "name": "subcategory", "in": "query", "description": "Comma-separated subcategory IDs", "schema": { "type": "string" } }, { "name": "league", "in": "query", "description": "Comma-separated league IDs", "schema": { "type": "string" } }, { "name": "newsTag", "in": "query", "description": "Comma-separated news tag IDs", "schema": { "type": "string" } }, { "name": "reporter", "in": "query", "description": "Comma-separated reporter user IDs", "schema": { "type": "string" } }, { "name": "publishedAfter", "in": "query", "description": "Filter articles published after this date", "schema": { "type": "string", "format": "date-time" } }, { "name": "publishedBefore", "in": "query", "description": "Filter articles published before this date", "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "File download of exported news articles" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/my-articles": { "get": { "tags": [ "News" ], "summary": "List current user's curated news articles", "description": "Returns a paginated list of curated news articles created by the authenticated user, with optional filtering by company, agency, team, category, subcategory, league, news tag, and date range.", "operationId": "getOwnCuratedNews", "parameters": [ { "name": "perPage", "in": "query", "description": "Items per page", "schema": { "type": "integer" } }, { "name": "company", "in": "query", "description": "Comma-separated company IDs", "schema": { "type": "string" } }, { "name": "agency", "in": "query", "description": "Comma-separated agency IDs", "schema": { "type": "string" } }, { "name": "team", "in": "query", "description": "Comma-separated team IDs", "schema": { "type": "string" } }, { "name": "category", "in": "query", "description": "Comma-separated category IDs", "schema": { "type": "string" } }, { "name": "subcategory", "in": "query", "description": "Comma-separated subcategory IDs", "schema": { "type": "string" } }, { "name": "league", "in": "query", "description": "Comma-separated league IDs", "schema": { "type": "string" } }, { "name": "newsTag", "in": "query", "description": "Comma-separated news tag IDs", "schema": { "type": "string" } }, { "name": "publishedAfter", "in": "query", "description": "Filter articles published after this date", "schema": { "type": "string", "format": "date-time" } }, { "name": "publishedBefore", "in": "query", "description": "Filter articles published before this date", "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Paginated list of the authenticated user's curated news articles", "content": { "application/json": { "schema": { "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/CuratedNews" } }, "first_page_url": { "type": "string", "nullable": true }, "from": { "type": "integer", "nullable": true }, "last_page": { "type": "integer" }, "last_page_url": { "type": "string" }, "next_page_url": { "type": "string", "nullable": true }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "prev_page_url": { "type": "string", "nullable": true }, "to": { "type": "integer", "nullable": true }, "total": { "type": "integer" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/submissions": { "get": { "tags": [ "News" ], "summary": "List the global news submissions queue (all submitters)", "description": "Returns submissions from every reporter by default. Pass reporter_id to scope to one submitter. Requires the view-news permission.", "operationId": "0fb580a718c731e722abe30c5b1ebcdf", "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } }, { "name": "status", "in": "query", "description": "Comma-separated list of statuses (e.g. pending,analysed,published,unpublished,declined). Passing 'declined' includes soft-deleted (recoverable) declined articles.", "schema": { "type": "string" } }, { "name": "order_by", "in": "query", "schema": { "type": "string", "enum": [ "created_at", "updated_at", "published_at", "title", "status", "url" ] } }, { "name": "order_direction", "in": "query", "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "reporter_id", "in": "query", "description": "Optional. Scope the queue to a single submitter's submissions.", "schema": { "type": "integer" } }, { "name": "from", "in": "query", "description": "Filter submissions created on or after this date (Y-m-d)", "schema": { "type": "string", "format": "date" } }, { "name": "to", "in": "query", "description": "Filter submissions created on or before this date (Y-m-d, inclusive)", "schema": { "type": "string", "format": "date" } }, { "name": "title", "in": "query", "description": "Filter by article title (case-insensitive substring). Combined with `url`, both must match (AND).", "schema": { "type": "string" } }, { "name": "url", "in": "query", "description": "Filter by article URL (case-insensitive substring). Combined with `title`, both must match (AND).", "schema": { "type": "string" } } ], "responses": { "403": { "description": "Forbidden \u2014 missing view news permission" }, "200": { "description": "Simple paginator JSON; `data` items are NewsSubmissionResource rows.", "content": { "application/json": { "schema": { "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/NewsSubmissionResource" } }, "first_page_url": { "type": "string", "nullable": true }, "from": { "type": "integer", "nullable": true }, "next_page_url": { "type": "string", "nullable": true }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "prev_page_url": { "type": "string", "nullable": true }, "to": { "type": "integer", "nullable": true } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/submissions/{id}": { "get": { "tags": [ "News" ], "summary": "Get one news submission by id (global \u2014 any submitter)", "description": "Returns any submission's detail so coordinators can open articles submitted by any user. Requires the view-news permission.", "operationId": "64e24c71ec4f499e6a74144a4c68dbeb", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Single submission row.", "content": { "application/json": { "schema": { "properties": { "data": { "$ref": "#/components/schemas/NewsSubmissionResource" } }, "type": "object" } } } }, "403": { "description": "Forbidden \u2014 missing view news permission" }, "404": { "description": "Not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article": { "post": { "tags": [ "News" ], "summary": "Create a curated news article", "description": "Creates a new curated news article with associated companies, agencies, teams, and tags. Requires news administration permission.", "operationId": "createCuratedNews", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "url", "title", "description" ], "properties": { "url": { "description": "Article URL. Must be unique among usable articles: a URL left behind by a failed article is accepted (that article is purged), while one belonging to a declined article is rejected until it is restored or deleted.", "type": "string", "format": "url" }, "title": { "description": "Article title", "type": "string" }, "description": { "description": "Article description", "type": "string" }, "image": { "description": "Image URL for the article", "type": "string" }, "published_at": { "description": "Publication date (defaults to now)", "type": "string", "format": "date-time" }, "is_sponsorship": { "type": "boolean" }, "companies": { "description": "Array of company objects to associate", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "agencies": { "description": "Array of agency objects to associate", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "teams": { "description": "Array of team/property objects to associate", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "tags": { "description": "Array of news tag IDs", "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Article created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CuratedNews" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing news administration permission" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/{id}": { "put": { "tags": [ "News" ], "summary": "Update a curated news article", "description": "Updates an existing curated news article. If a new URL is provided and differs from the current one, the article metadata is re-fetched from the URL. Requires edit news permission.", "operationId": "updateCuratedNews", "parameters": [ { "name": "id", "in": "path", "description": "Curated news article identifier", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "properties": { "url": { "description": "New article URL (must be unique if changed)", "type": "string", "format": "url" }, "title": { "description": "Article title", "type": "string" }, "description": { "description": "Article description", "type": "string" }, "image": { "description": "Image URL for the article", "type": "string" }, "published_at": { "description": "Publication date", "type": "string", "format": "date-time" }, "is_active": { "description": "Whether the article is active", "type": "boolean" }, "companies": { "description": "Array of company objects to sync", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "agencies": { "description": "Array of agency objects to sync", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "teams": { "description": "Array of team/property objects to sync", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "tags": { "description": "Array of news tag IDs to sync", "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Article updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CuratedNews" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing edit news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Validation error (e.g. duplicate URL)" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "News" ], "summary": "Delete a curated news article", "description": "Permanently deletes a curated news article. Requires edit news permission or reporter ownership.", "operationId": "deleteCuratedNews", "parameters": [ { "name": "id", "in": "path", "description": "Curated news article identifier", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Article deleted successfully; response body is the article snapshot before deletion", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CuratedNews" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing edit news permission and not article reporter" }, "404": { "description": "Article not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/analyse": { "post": { "tags": [ "News" ], "summary": "Bulk submit news article URLs for analysis", "description": "Accepts an array of news article URLs, creates CuratedNews records in pending status, syncs brand/property/agency relationships, and dispatches each to the data-ingestion service for content extraction. Re-submitting a URL whose article previously failed returns it to pending and dispatches a fresh analysis; a URL already in the queue is reported as already_exists without dispatching anything.", "operationId": "3b3d00be711cb398df132e0a2134086e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyseCuratedNewsRequest" } } } }, "responses": { "201": { "description": "URLs submitted for analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyseCuratedNewsResultsResource" } } } }, "422": { "description": "Validation error" }, "403": { "description": "Forbidden (missing news administration permission)" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/{id}/publish": { "put": { "tags": [ "News" ], "summary": "Publish a news article", "description": "Publishes an article (was 'approve'): status becomes published, it is made active and appears on linked brand/property profiles. Allowed from analysed or unpublished. Only the reporter who submitted the article can publish it.", "operationId": "23adff9f97c3a94e4aaffc552029477b", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Article published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsSubmissionResource" } } } }, "403": { "description": "Forbidden \u2014 missing view-news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Transition not allowed from the current status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/{id}/unpublish": { "put": { "tags": [ "News" ], "summary": "Unpublish a news article", "description": "Removes a published article from brand/property profiles and returns it to an editable draft (status unpublished), while keeping it in the queue and preserving its brand/property links so it can be republished. Allowed from published. Only the reporter who submitted the article can unpublish it.", "operationId": "12f229dfd29e8f99d1a3c0113f89df3c", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Article unpublished successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsSubmissionResource" } } } }, "403": { "description": "Forbidden \u2014 missing view-news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Transition not allowed from the current status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/{id}/decline": { "put": { "tags": [ "News" ], "summary": "Decline a news article", "description": "Declines an article (was 'reject'): a recoverable soft-delete that removes it from the active queue. It remains in the Declined list and can be restored. Allowed from analysed, unpublished or published. Only the reporter who submitted the article can decline it.", "operationId": "59fcc0bd30941e64cc924cb74494492b", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Article declined successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsSubmissionResource" } } } }, "403": { "description": "Forbidden \u2014 missing view-news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Transition not allowed from the current status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/{id}/restore": { "put": { "tags": [ "News" ], "summary": "Restore a declined news article", "description": "Restores a declined (soft-deleted) article back to an editable, in-queue state (status analysed). Allowed from declined. Only the reporter who submitted the article can restore it.", "operationId": "70198b0ef22aa7c8bbfd9ea52ea615c8", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Article restored successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsSubmissionResource" } } } }, "403": { "description": "Forbidden \u2014 missing view-news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Transition not allowed from the current status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/preview": { "get": { "tags": [ "News" ], "summary": "Preview news article", "description": "Returns preview information for a news article URL including title, description, and image", "operationId": "9aace22b4f6a3d27111fb4cfbcdf7a20", "parameters": [ { "name": "url", "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Preview news article.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CuratedNewsArticlePreviewResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/custom-reports": { "get": { "tags": [ "Custom Reports" ], "summary": "List custom reports", "description": "Retrieves a list of custom reports with optional filtering. Reports are filtered by user's organization membership.", "operationId": "b02ba06dc96b360112a2ceb8147ee2ac", "parameters": [ { "name": "user", "in": "query", "description": "Filter by user ID", "required": false, "schema": { "type": "string", "example": "1,2,3" } }, { "name": "agency", "in": "query", "description": "Filter by agency ID", "required": false, "schema": { "type": "string", "example": "1,2,3" } }, { "name": "brand", "in": "query", "description": "Filter by brand ID", "required": false, "schema": { "type": "string", "example": "1,2,3" } }, { "name": "property", "in": "query", "description": "Filter by property ID", "required": false, "schema": { "type": "string", "example": "1,2,3" } }, { "name": "tag", "in": "query", "description": "Filter by tag ID", "required": false, "schema": { "type": "string", "example": "1,2,3" } }, { "name": "organization", "in": "query", "description": "Filter by organization ID", "required": false, "schema": { "type": "string", "example": "1,2,3" } }, { "name": "publishedBefore", "in": "query", "description": "Filter by reports published before the given date", "required": false, "schema": { "type": "string", "format": "date-time" } }, { "name": "publishedAfter", "in": "query", "description": "Filter by reports published after the given date", "required": false, "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Custom reports list", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CustomReportResource" } } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Custom Reports" ], "summary": "Create a custom report", "description": "Creates a new custom report with associated entities and file uploads.", "operationId": "991700be4fd2c2764d531f50687b91a1", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportStoreRequest" } } } }, "responses": { "201": { "description": "Custom report created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportResource" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" }, "errors": { "type": "object" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/custom-reports/{id}": { "get": { "tags": [ "Custom Reports" ], "summary": "Retrieve a custom report", "description": "Fetches a custom report by its ID. User must have access through organization membership.", "operationId": "313428b3f95d2fffe877d7f01c3e1152", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the custom report to retrieve", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportResource" } } } }, "403": { "description": "Access denied - user does not have permission", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "You do not have permission to access this custom report." } }, "type": "object" } } } }, "404": { "description": "Custom report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Custom report not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Custom Reports" ], "summary": "Update a custom report", "description": "Updates an existing custom report by its ID with the provided data. User must have access through organization membership.", "operationId": "7d380803fd1bcc21e3cf81019e8c6d87", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the custom report to update", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Custom report data to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportStoreRequest" } } } }, "responses": { "200": { "description": "Custom report successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportResource" } } } }, "403": { "description": "Access denied - user does not have permission", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "You do not have permission to access this custom report." } }, "type": "object" } } } }, "404": { "description": "Custom report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Custom report not found" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" }, "errors": { "type": "object" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Custom Reports" ], "summary": "Delete a custom report", "description": "Soft deletes a custom report by its ID from the database and returns its data. User must be the owner of the report.", "operationId": "891c1947e8d4ee10de25d872c74e67bf", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the custom report to delete", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Custom report successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "You do not have permission to delete this custom report." } }, "type": "object" } } } }, "404": { "description": "Custom report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Custom report not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/custom-reports/{id}/duplicate": { "post": { "tags": [ "Custom Reports" ], "summary": "Duplicate a custom report", "description": "Creates a duplicate of a custom report for the authenticated user with all relationships copied. The new report will have '(1)' appended to the title if a conflict exists.", "operationId": "885efeb0dbb2fb3d78bb821d1d018477", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the custom report to duplicate", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "201": { "description": "Custom report duplicated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "You do not have permission to duplicate this custom report." } }, "type": "object" } } } }, "404": { "description": "Custom report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Custom report not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/custom-reports/{id}/rename": { "patch": { "tags": [ "Custom Reports" ], "summary": "Rename a custom report", "description": "Updates the title of a custom report. User must be the owner. If the new title conflicts with an existing report, it will be automatically adjusted with a numeric suffix.", "operationId": "9f17e88224a4efee50f56e3e6c88dad6", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the custom report to rename", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportRenameRequest" } } } }, "responses": { "200": { "description": "Custom report renamed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "You do not have permission to rename this custom report." } }, "type": "object" } } } }, "404": { "description": "Custom report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Custom report not found" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" }, "errors": { "type": "object" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/custom-reports/{customReport}/share": { "post": { "tags": [ "Custom Reports" ], "operationId": "342a800c570b4f60211fb2616996b4ad", "parameters": [ { "name": "customReport", "in": "path", "description": "The ID of the custom report to share", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomReportShareRequest" } } } }, "responses": { "200": { "description": "Report shared successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CustomReportResource" } } }, "type": "object" } } } }, "404": { "description": "Report not found" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/ingestion/submit": { "post": { "tags": [ "Data Ingestion" ], "summary": "Submit an ingestion request", "operationId": "1ac6b736a48f5cd0c473de8670b78e20", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitIngestionRequest" } } } }, "responses": { "201": { "description": "Ingestion request submitted successfully", "content": { "application/json": { "schema": { "properties": { "job_uuid": { "type": "string", "format": "uuid" }, "status": { "type": "string" }, "tasks": { "type": "array", "items": { "properties": { "uuid": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "status": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } }, "422": { "description": "Validation error" }, "500": { "description": "Ingestion API submission failed" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/ingestion/jobs": { "get": { "tags": [ "Data Ingestion" ], "summary": "List user's ingestion jobs", "operationId": "383852e686eab096f952fdd496508162", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "pending", "in_progress", "completed", "partially_completed", "failed" ] } }, { "name": "per_page", "in": "query", "required": false, "schema": { "type": "integer", "default": 15 } } ], "responses": { "200": { "description": "Paginated list of ingestion jobs", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/IngestionJobResource" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/ingestion/jobs/{uuid}": { "get": { "tags": [ "Data Ingestion" ], "summary": "Get ingestion job status with all tasks", "operationId": "e8f3415453f8570d2fc348781de24e40", "parameters": [ { "name": "uuid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Ingestion job details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionJobResource" } } } }, "404": { "description": "Job not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/ingestion/tasks/{uuid}": { "get": { "tags": [ "Data Ingestion" ], "summary": "Get ingestion task details", "operationId": "b754d0aeb0006297c4e08d5652f8e645", "parameters": [ { "name": "uuid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Ingestion task details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionTaskResource" } } } }, "404": { "description": "Task not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/ingestion/jobs/{uuid}/contacts": { "get": { "tags": [ "Data Ingestion" ], "summary": "Get contact extraction results for an ingestion job", "operationId": "b91feacf49b7e5b4627e48cdcab01a4f", "parameters": [ { "name": "uuid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Contact extraction results", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "enum": [ "pending", "processing", "completed", "failed" ] }, "result_payload": { "type": "object", "nullable": true }, "contacts": { "type": "array", "items": { "type": "object" } }, "quotes": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "404": { "description": "Job not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/webhooks/ingestion": { "post": { "tags": [ "Data Ingestion" ], "summary": "Handle Data Ingestion webhook callback", "operationId": "96c82d5fba07d678cc8472a8feb2dd90", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionWebhookRequest" } } } }, "responses": { "200": { "description": "Webhook received", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Webhook received" } }, "type": "object" } } } }, "422": { "description": "Validation error" } }, "security": [ { "apiKey": [] } ] } }, "/api/events": { "get": { "tags": [ "Events" ], "summary": "List all events", "description": "Returns a list of all events (placeholder - will be replaced by teamEvents method)", "operationId": "f03fc722854a9c744a79b16f6b27016c", "responses": { "200": { "description": "Successful operation" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Events" ], "summary": "Create a new event", "description": "Creates a new event with optional multiple events creation for consecutive seasons", "operationId": "74a3db86fa6f0a55e99bb5a3c9fd29a0", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "hometeam_id", "name" ], "properties": { "hometeam_id": { "description": "ID of the home team", "type": "integer" }, "awayteam_id": { "description": "ID of the away team (optional)", "type": "integer" }, "name": { "description": "Event name", "type": "string" }, "scheduled_date": { "description": "Scheduled date", "type": "string", "format": "date" }, "scheduled_time": { "description": "Scheduled time", "type": "string", "format": "time" }, "startDate": { "description": "Start date for multi-day events", "type": "string", "format": "date" }, "endDate": { "description": "End date for multi-day events", "type": "string", "format": "date" }, "venue": { "description": "Venue ID", "type": "integer" }, "event_type": { "description": "Type of event (e.g., social, single, multi, season)", "type": "string" }, "season": { "description": "Season year", "type": "integer" }, "status": { "description": "User event status", "type": "string", "enum": [ "assigned", "inprogress", "inreview", "rejected", "approved" ] }, "user_event_type": { "description": "User event type (defaults to Other if not specified)", "type": "string", "enum": [ "Other", "Venue", "Property", "TV", "Radio", "Digital", "Social", "Quick Add", "Print", "Steaming Audio", "Streaming Video", "Virtual Venue" ] }, "user_id": { "description": "User ID to assign the event to", "type": "integer" }, "eventsCount": { "description": "Number of events to create for consecutive seasons", "type": "integer" } }, "type": "object" } } } }, "responses": { "200": { "description": "Event(s) created successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/events/team/{team_id}": { "get": { "tags": [ "Events" ], "summary": "Get events for a specific property/team", "description": "Returns a paginated list of events for a specific property/team with optional filtering by date, season, event type, and name", "operationId": "4644cb6c07f9c2b9482ee452e2bb9966", "parameters": [ { "name": "team_id", "in": "path", "description": "The ID of the team/property", "required": true, "schema": { "type": "integer" } }, { "name": "skipSeasonal", "in": "query", "description": "Skip seasonal events (true/false)", "schema": { "type": "string", "enum": [ "true", "false" ] } }, { "name": "order_by", "in": "query", "description": "Field to order by", "schema": { "type": "string", "enum": [ "name", "created_at", "audits", "venue", "season" ] } }, { "name": "order", "in": "query", "description": "Order direction", "schema": { "type": "string", "enum": [ "ASC", "DESC" ] } }, { "name": "startDate", "in": "query", "description": "Filter events starting from this date", "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "description": "Filter events ending at this date", "schema": { "type": "string", "format": "date" } }, { "name": "name", "in": "query", "description": "Filter by event name (partial match)", "schema": { "type": "string" } }, { "name": "season", "in": "query", "description": "Filter by season(s) - JSON encoded array", "schema": { "type": "string" } }, { "name": "event_type", "in": "query", "description": "Filter by event type(s) - JSON encoded array", "schema": { "type": "string" } }, { "name": "eventId", "in": "query", "description": "Exclude a specific event by ID", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "description": "Number of results per page", "schema": { "type": "integer", "default": 25 } }, { "name": "page", "in": "query", "description": "Page number", "schema": { "type": "integer", "default": 1 } } ], "responses": { "200": { "description": "Paginated list of events" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/events/property/all": { "get": { "tags": [ "Events" ], "summary": "Get all events for a selected team", "description": "Returns all events for a selected team with optional filtering by type, season, and date range", "operationId": "e82f4dcfbf48d29b23c10433850410f9", "parameters": [ { "name": "selectedTeam", "in": "query", "description": "The ID of the selected team", "required": true, "schema": { "type": "integer" } }, { "name": "type", "in": "query", "description": "Event type filter (e.g., 'season')", "schema": { "type": "string" } }, { "name": "season", "in": "query", "description": "Filter by season", "schema": { "type": "integer" } }, { "name": "continuous", "in": "query", "description": "Include multi-type events (true/false)", "schema": { "type": "string", "enum": [ "true", "false" ] } }, { "name": "startDate", "in": "query", "description": "Filter events starting from this date", "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "description": "Filter events ending at this date", "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "List of teams with their events", "content": { "application/json": { "schema": { "properties": { "teams": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/event/{event_id}": { "get": { "tags": [ "Events" ], "summary": "Get a specific event", "description": "Returns details of a specific event including related teams, venue, sport, and user events", "operationId": "82f26619077a70eaccb304e3f69d483f", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Event details" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Event not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/events/{event_id}": { "put": { "tags": [ "Events" ], "summary": "Update an event", "description": "Updates an existing event including scheduled times, dates, and event type", "operationId": "d5605c8ea652015e39bba653eb03431e", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "event_type", "season" ], "properties": { "event_type": { "description": "Type of event", "type": "string", "enum": [ "season", "single", "multi", "social" ] }, "season": { "description": "Season year", "type": "integer" }, "scheduled_date": { "description": "Scheduled date (required for single events)", "type": "string", "format": "date" }, "scheduled_time": { "description": "Scheduled time (required for single events)", "type": "string", "format": "time" }, "startDate": { "description": "Start date (required for multi events)", "type": "string", "format": "date" }, "endDate": { "description": "End date (required for multi events)", "type": "string", "format": "date" }, "venue": { "description": "Venue ID", "type": "integer" }, "name": { "description": "Event name", "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Event updated successfully" }, "400": { "description": "Bad request - missing required fields for event type" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Event not found" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Events" ], "summary": "Delete an event", "description": "Soft deletes an existing event", "operationId": "721867a307d87f7146694fa170a095f9", "parameters": [ { "name": "event_id", "in": "path", "description": "The ID of the event to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Event deleted successfully", "content": { "application/json": { "schema": { "properties": { "status": { "type": "boolean", "example": true } }, "type": "object" } } } }, "400": { "description": "Failed to delete event" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Event not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/facebook/me": { "get": { "tags": [ "Facebook" ], "description": "Retrieve Facebook information about the user.", "operationId": "a76c183630ba0f5b9aa256df8938ec79", "parameters": [ { "name": "token", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "User object and picture of the facebook account", "content": { "application/json": { "schema": { "properties": { "user": { "type": "object" }, "picture": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/facebook/validate-token": { "get": { "tags": [ "Facebook" ], "description": "Validate token", "operationId": "6957675db782437e00ff23a275165404", "parameters": [ { "name": "token", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return if token is valid", "content": { "application/json": { "schema": { "properties": { "valid": { "type": "boolean" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/send-feedback": { "post": { "tags": [ "Feedback" ], "summary": "Send user feedback", "description": "Sends feedback from the authenticated user via email to the SponsorUnited support team", "operationId": "5ce25b7a9773b85e2ca31cc499eb5436", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedbackSendRequest" } } } }, "responses": { "200": { "description": "Feedback sent successfully" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/files": { "get": { "tags": [ "FileUploads" ], "summary": "Get list of file uploads", "description": "Returns a list of all file uploads along with associated user and thumbnail information.", "operationId": "27dd464763aad5e6651dbfa7fd432371", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FileUploadResource" } } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "FileUploads" ], "summary": "Upload a new file", "description": "Stores a file, generates a thumbnail if necessary, and returns its details.", "operationId": "2498ca43195246370e48eb355e0e4fed", "requestBody": { "description": "File details", "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FileUploadRequest" } } } }, "responses": { "200": { "description": "The uploaded file details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResource" } } } }, "400": { "description": "Invalid request" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/files/{id}": { "get": { "tags": [ "FileUploads" ], "summary": "Get file upload by ID", "description": "Returns a single file upload along with associated user and thumbnail information by ID.", "operationId": "13d2f487727ef239622c205a541f3905", "parameters": [ { "name": "id", "in": "path", "description": "ID of the file upload to return", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResource" } } } }, "404": { "description": "File upload not found" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "FileUploads" ], "summary": "Delete a file upload", "description": "Deletes a single file upload by ID and returns the deleted file's details.", "operationId": "ff9f36d679456b089d6834cd6978bafd", "parameters": [ { "name": "id", "in": "path", "description": "ID of the file upload to delete", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The deleted file upload details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileUploadResource" } } } }, "404": { "description": "File upload not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/brand/clip/timings": { "get": { "tags": [ "Brand Clip Timings" ], "summary": "Get brand clip timings", "description": "Retrieves brand clip timings for a scouting YouTube link. Can be queried by either user_event_id or scouting_youtube_link_id. At least one parameter must be provided.", "operationId": "bfa0671b2a21c2163c55d0654b90204d", "parameters": [ { "name": "user_event_id", "in": "query", "description": "User event ID to retrieve brand clip timings for. Returns the most recent link if multiple exist.", "required": false, "schema": { "type": "integer", "example": 123 } }, { "name": "scouting_youtube_link_id", "in": "query", "description": "Scouting YouTube link ID to retrieve brand clip timings for", "required": false, "schema": { "type": "integer", "example": 456 } } ], "responses": { "200": { "description": "Brand clip timings retrieved successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/BrandClipTimingResource" } } }, "type": "object" } } } }, "404": { "description": "Scouting YouTube link not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/hubspot/access": { "get": { "tags": [ "Hubspot" ], "summary": "Get Hubspot access token", "description": "Generates or retrieves an access token for the Hubspot service. Requires the user to have Hubspot access permissions", "operationId": "8a141cd9dae1acaeee99c4b49f9d1295", "responses": { "200": { "description": "Generate or retrieve the Hubspot access token.", "content": { "application/json": { "schema": { "properties": { "access_token": { "type": "string" } }, "type": "object" } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication token." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/hubspot/segments/{id}/contacts": { "get": { "tags": [ "Hubspot segments" ], "summary": "Get contacts from a HubSpot segment", "description": "Proxies HubSpot API to return contact emails for the given segment (list) ID. Requires authentication.", "operationId": "3e730210d6400fc956b388b75ebfdb1d", "parameters": [ { "name": "id", "in": "path", "description": "HubSpot list (segment) ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Contact emails in the segment", "content": { "application/json": { "schema": { "required": [ "success", "data" ], "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "type": "string", "example": "user@example.com" } } }, "type": "object" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "HubSpot API error or segment ID not set" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/logos": { "get": { "tags": [ "Images" ], "summary": "Detect logos in an image", "description": "Fetches an image from the provided URL and uses Google Cloud Vision to detect logos.", "operationId": "getLogosFromImage", "parameters": [ { "name": "img_url", "in": "query", "description": "The URL of the image to detect logos from", "required": true, "schema": { "type": "string", "format": "url" } } ], "responses": { "200": { "description": "Logo detection results", "content": { "application/json": { "schema": { "properties": { "total": { "description": "Total number of logos detected", "type": "integer" }, "threshold": { "description": "Confidence threshold used", "type": "number", "format": "float" }, "height": { "description": "Image height in pixels", "type": "integer" }, "width": { "description": "Image width in pixels", "type": "integer" }, "logos": { "description": "Logos above threshold", "type": "array", "items": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "score": { "type": "number", "format": "float" }, "vertices": { "type": "array", "items": { "properties": { "x": { "type": "integer" }, "y": { "type": "integer" } }, "type": "object" } }, "company": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object", "nullable": true } }, "type": "object" } }, "skippedLogos": { "description": "Logos below threshold", "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "422": { "description": "Validation error or failed to fetch the image", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The URL did not return an image." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/download-image": { "get": { "tags": [ "Images" ], "summary": "Download an image as base64", "description": "Fetches an image from the provided URL and returns it as a base64-encoded data URI.", "operationId": "downloadImageAsBase64", "parameters": [ { "name": "url", "in": "query", "description": "The URL of the image to download", "required": true, "schema": { "type": "string", "format": "url" } } ], "responses": { "200": { "description": "Base64-encoded image data URI", "content": { "application/json": { "schema": { "properties": { "image": { "description": "Base64-encoded data URI of the image", "type": "string" } }, "type": "object" } } } }, "422": { "description": "Validation error or failed to fetch the image", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The URL did not return an image." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/crop-image": { "post": { "tags": [ "Images" ], "summary": "Crop an image", "description": "Accepts a base64-encoded image, optionally duplicates it if shared across items, uploads the cropped version to S3, and updates the image record.", "operationId": "cropImage", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CropImageRequest" } } } }, "responses": { "200": { "description": "Updated image record", "content": { "application/json": { "schema": { "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/image/{id}/enhance": { "put": { "tags": [ "Image Enhancer" ], "summary": "Save enhanced image", "description": "Replaces image URL with enhanced image URL", "operationId": "14776c9602fcec3adfdf420a096c0bbe", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the image", "required": true, "schema": { "type": "integer" } } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "properties": { "error": { "description": "Error message", "type": "string" } }, "type": "object" } } } } } }, "post": { "tags": [ "Image Enhancer" ], "summary": "Enhance Image", "description": "Enhances an image by its ID using VanceAI and returns the transformation ID.", "operationId": "92f2efccbdac4fbf9f4b2c4a933b2594", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the image to enhance", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "trans_id": { "description": "The VanceAI ID of the transformed image", "type": "string" } }, "type": "object" } } } }, "404": { "description": "Image not found", "content": { "application/json": { "schema": { "properties": { "error": { "description": "Error message", "type": "string" } }, "type": "object" } } } }, "502": { "description": "VanceAI enhancement failed", "content": { "application/json": { "schema": { "properties": { "error": { "description": "Error message", "type": "string" } }, "type": "object" } } } } } } }, "/api/infographics": { "get": { "tags": [ "Infographics" ], "summary": "List all infographics", "description": "Returns infographics with optional filtering by category, subcategory, agency, league, tag, and publication date", "operationId": "550d8d43223800bdd568a27fc4d2e025", "responses": { "200": { "description": "Infographics list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfographicsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Infographics" ], "summary": "Create infographic", "description": "Creates a new infographic with associated tags, brands, properties, and agencies", "operationId": "69c4f07b12f460aae37dfc0a8c9c7b6e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfographicsStoreRequest" } } } }, "responses": { "200": { "description": "Infographic object", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfographicsResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/infographics/{id}": { "put": { "tags": [ "Infographics" ], "summary": "Update infographic", "description": "Updates an existing infographic's details and associations", "operationId": "d022993c17802629d923ad54a0119061", "parameters": [ { "name": "id", "in": "path", "description": "ID of infographic", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfographicsUpdateRequest" } } } }, "responses": { "200": { "description": "Infographic object", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfographicsResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Infographics" ], "summary": "Delete infographic", "description": "Removes an infographic from the system", "operationId": "39377116805b93dd376aa7545fb852a0", "parameters": [ { "name": "id", "in": "path", "description": "ID of a infographic", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when the infographic has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/intercom/me": { "get": { "tags": [ "Intercom" ], "summary": "Get current user Intercom info", "description": "Returns the authenticated user's Intercom contact ID, company, and messenger token", "operationId": "1ffbb501d505c809a281c5afc3f10060", "responses": { "200": { "description": "ID, Intercom Company, and messenger token for the authenticated user", "content": { "application/json": { "schema": { "properties": { "id": { "type": "string" }, "company": { "properties": { "id": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true } }, "type": "object" }, "intercom_token": { "type": "string", "nullable": true } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/internal/sync/brands": { "get": { "tags": [ "Internal Sync" ], "summary": "Paginated brand reference data for internal service sync", "description": "Returns a cursor-paginated list of brand id and name pairs. Brands map to the Company model internally. Intended for service-to-service consumption by vortex-api. Walk pages using the returned next_cursor as after_id until data is empty.", "operationId": "eb1be6c3c1a6ad6ceaeb2412572d9013", "parameters": [ { "name": "after_id", "in": "query", "description": "Cursor: return records with id greater than this value. Omit for the first page.", "required": false, "schema": { "type": "integer", "example": 500, "nullable": true } }, { "name": "per_page", "in": "query", "description": "Number of records per page (1\u201310000, default 500).", "required": false, "schema": { "type": "integer", "example": 500 } } ], "responses": { "200": { "description": "Paginated brand list", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/GenericEntity" } }, "next_cursor": { "description": "Id of the last record on this page. Pass as after_id on the next request. Null when data is empty.", "type": "integer", "example": 1500, "nullable": true } }, "type": "object" } } } }, "401": { "description": "Missing or invalid API key" }, "422": { "description": "Validation error" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/internal/sync/league-assets": { "get": { "tags": [ "Internal Sync" ], "summary": "Paginated per-league capture-scope assets for internal service sync", "description": "Returns a cursor-paginated list of the assets in capture scope for each league: every league_items row whose item captures something per brand (hasFrequency or hasAmount), sits on a VENUE or PROPERTY platform, and is not soft-deleted. MEDIA assets are excluded \u2014 a broadcast or streaming commercial cannot be observed by a scout walking a venue. Key-asset status is a ranking hint, not a filter. Each row carries capture_type so the consumer knows which input to render, and item_subplatform because item_name alone is ambiguous. Intended for service-to-service consumption by vortex-api. Walk pages using the returned next_cursor as after_id until data is empty.", "operationId": "09babef733ef121274ebf107361d7d97", "parameters": [ { "name": "after_id", "in": "query", "description": "Cursor: return records with id greater than this value. Omit for the first page.", "required": false, "schema": { "type": "integer", "example": 500, "nullable": true } }, { "name": "per_page", "in": "query", "description": "Number of records per page (1\u201310000, default 500).", "required": false, "schema": { "type": "integer", "example": 500 } } ], "responses": { "200": { "description": "Paginated per-league capture-scope assets", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/LeagueAssetEntity" } }, "next_cursor": { "description": "Id of the last record on this page. Pass as after_id on the next request. Null when data is empty.", "type": "integer", "example": 98716, "nullable": true } }, "type": "object" } } } }, "401": { "description": "Missing or invalid API key" }, "422": { "description": "Validation error" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/internal/sync/properties": { "get": { "tags": [ "Internal Sync" ], "summary": "Paginated property reference data for internal service sync", "description": "Returns a cursor-paginated list of properties as id, name and league_id. Properties map to the Team model internally. Intended for service-to-service consumption by vortex-api. Walk pages using the returned next_cursor as after_id until data is empty.", "operationId": "c7b0c346b6ba87c7709dfafee4201fc1", "parameters": [ { "name": "after_id", "in": "query", "description": "Cursor: return records with id greater than this value. Omit for the first page.", "required": false, "schema": { "type": "integer", "example": 500, "nullable": true } }, { "name": "per_page", "in": "query", "description": "Number of records per page (1\u201310000, default 500).", "required": false, "schema": { "type": "integer", "example": 500 } } ], "responses": { "200": { "description": "Paginated property list", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PropertySyncEntity" } }, "next_cursor": { "description": "Id of the last record on this page. Pass as after_id on the next request. Null when data is empty.", "type": "integer", "example": 1500, "nullable": true } }, "type": "object" } } } }, "401": { "description": "Missing or invalid API key" }, "422": { "description": "Validation error" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/internal/sync/property-known-brands": { "get": { "tags": [ "Internal Sync" ], "summary": "Paginated property/asset brand history for internal service sync", "description": "Returns a cursor-paginated list of (property, asset, brand) triples derived from approved audits in the current and prior season. Read straight from the property_asset_brand_history table, which is rebuilt nightly \u2014 no aggregation happens at request time. Intended for service-to-service consumption by vortex-api. Walk pages using the returned next_cursor as after_id until data is empty.", "operationId": "a6b51ca083fd0296c53223bd546c06e1", "parameters": [ { "name": "after_id", "in": "query", "description": "Cursor: return records with id greater than this value. Omit for the first page.", "required": false, "schema": { "type": "integer", "example": 500, "nullable": true } }, { "name": "per_page", "in": "query", "description": "Number of records per page (1\u201310000, default 500).", "required": false, "schema": { "type": "integer", "example": 500 } } ], "responses": { "200": { "description": "Paginated property/asset brand history", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PropertyKnownBrandEntity" } }, "next_cursor": { "description": "Id of the last record on this page. Pass as after_id on the next request. Null when data is empty.", "type": "integer", "example": 1500, "nullable": true } }, "type": "object" } } } }, "401": { "description": "Missing or invalid API key" }, "422": { "description": "Validation error" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/internal/sync/venues": { "get": { "tags": [ "Internal Sync" ], "summary": "Paginated venue reference data for internal service sync", "description": "Returns a cursor-paginated list of venue id and name pairs. Intended for service-to-service consumption by vortex-api. Walk pages using the returned next_cursor as after_id until data is empty.", "operationId": "f515866308595b255b8a5ec1029f563e", "parameters": [ { "name": "after_id", "in": "query", "description": "Cursor: return records with id greater than this value. Omit for the first page.", "required": false, "schema": { "type": "integer", "example": 500, "nullable": true } }, { "name": "per_page", "in": "query", "description": "Number of records per page (1\u201310000, default 500).", "required": false, "schema": { "type": "integer", "example": 500 } } ], "responses": { "200": { "description": "Paginated venue list", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/GenericEntity" } }, "next_cursor": { "description": "Id of the last record on this page. Pass as after_id on the next request. Null when data is empty.", "type": "integer", "example": 1500, "nullable": true } }, "type": "object" } } } }, "401": { "description": "Missing or invalid API key" }, "422": { "description": "Validation error" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/item": { "get": { "tags": [ "Item" ], "summary": "List all items (assets)", "description": "Returns a list of items with optional filtering by subplatform, league, property, subgenre, or season deals", "operationId": "b6b5f8ca55f3977ad2ce6777f035c40e", "parameters": [ { "name": "ItemIndexRequest", "in": "query", "schema": { "$ref": "#/components/schemas/AssetIndexRequest" } } ], "responses": { "200": { "description": "A list of assets.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Item" ], "summary": "Create a new item (asset)", "description": "Creates a new item with platform, subplatform, grouping, and feature flags. Associates item with all leagues.", "operationId": "5567f92eba0a6eaacf0124498e81dadf", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetStoreUpdateRequest" } } } }, "responses": { "200": { "description": "Item created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetResource" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item/{id}": { "get": { "tags": [ "Item" ], "summary": "Get an item by ID", "description": "Returns a single item with its definition and synonyms", "operationId": "c6650aff4f52c233e3fd6e521dfc2be4", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Item details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Item not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Item" ], "summary": "Update an item", "description": "Updates an existing item with new data including definition and synonyms", "operationId": "5a1c317476a9ece281b918a25ced7a63", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetStoreUpdateRequest" } } } }, "responses": { "200": { "description": "Item updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Item not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Item" ], "summary": "Delete an item", "description": "Deletes an item and all associated data", "operationId": "722d07df6daf6b4d3eaf8295b04bf942", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Item deleted successfully" }, "400": { "description": "Failed to delete item" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Item not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item/{id}/intent": { "get": { "tags": [ "Item" ], "summary": "Get item intent data", "description": "Returns intent measurement data for an item including audits count and item values count", "operationId": "28052170355afddfeddc33f76ab4a22e", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Item intent data", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "audits_count": { "type": "integer" }, "item_values_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/items-slim": { "get": { "tags": [ "Item" ], "summary": "Get slim items list with platforms and subplatforms", "description": "Returns a list of items with their platforms, subplatforms, and groupings.", "operationId": "1b581894ea4f1744b7e73cca5087f804", "responses": { "200": { "description": "Slim items list", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "platform_id": { "type": "integer" }, "platform_name": { "type": "string" }, "subplatform_id": { "type": "integer" }, "subplatform_name": { "type": "string" }, "grouping_id": { "type": "integer" }, "grouping_name": { "type": "string" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/items-slim-with-counts": { "get": { "tags": [ "Item" ], "summary": "Get slim items list with current-season audits and brands counts", "description": "Returns the slim items list plus current-season audits_count and brands_count per item, sourced from season_current_deals.", "operationId": "49b6e8dfc0fb660e4924608e6c78a8f6", "responses": { "200": { "description": "Slim items list with current-season counts", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "platform_id": { "type": "integer" }, "platform_name": { "type": "string" }, "subplatform_id": { "type": "integer" }, "subplatform_name": { "type": "string" }, "grouping_id": { "type": "integer" }, "grouping_name": { "type": "string" }, "audits_count": { "type": "integer" }, "brands_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/items/export": { "get": { "tags": [ "Item" ], "summary": "Export items to CSV", "description": "Exports all items with their platform, subplatform, grouping, type flags, and usage counts as a CSV file", "operationId": "984836ec54b623824658d3d0e6dde70d", "responses": { "200": { "description": "CSV file with items data", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-image/{id}": { "delete": { "tags": [ "Item Image" ], "summary": "Delete item image", "description": "Removes an image associated with an item", "operationId": "8a57af116b799c629a48bc4793809363", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when deleted successfully." }, "400": { "description": "Response with error.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Could not find creative to delete" } }, "type": "object" } } } }, "404": { "description": "Response with error.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Could not find creative to delete" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-platform": { "get": { "tags": [ "Item Platform" ], "summary": "List all item platforms", "description": "Returns a list of item platforms with optional filtering by platform ID, team ID, or with subplatforms", "operationId": "b2e49dcc485f0564767ecfb686b04cb8", "parameters": [ { "name": "platform_id", "in": "query", "description": "Filter by platform ID", "required": false, "schema": { "type": "integer" } }, { "name": "withSubplatformsAndItems", "in": "query", "description": "Include subplatforms and items", "required": false, "schema": { "type": "boolean" } }, { "name": "team_id", "in": "query", "description": "Filter by team ID", "required": false, "schema": { "type": "string" } }, { "name": "season", "in": "query", "description": "Season year the counts are requested for. When given, each team's assets are counted against the league it belonged to in that season instead of its current league.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of item platforms", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "items_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Item Platform" ], "summary": "Create a new item platform", "description": "Creates a new platform to categorize items", "operationId": "0d2685847bb7856e10871a329c2e8112", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "name": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Platform created", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-platform/{id}": { "get": { "tags": [ "Item Platform" ], "summary": "Get a platform by ID", "description": "Returns details of a specific item platform", "operationId": "411eb37df1ff7e72d0aad48b5c85ff49", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Platform details" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Item Platform" ], "summary": "Update a platform", "description": "Updates the name of an existing item platform", "operationId": "07294c66c34201034d70c4663a9cbada", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "name": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Platform updated" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Item Platform" ], "summary": "Delete a platform", "description": "Removes an item platform from the system", "operationId": "d8ad597abfad9c34d05c3407e45cb128", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Platform deleted" }, "400": { "description": "Failed to delete" }, "404": { "description": "Platform not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-platform/{id}/subplatform": { "get": { "tags": [ "Item Platform" ], "summary": "Get platform's subplatforms", "description": "Returns subplatforms for a platform with optional item count filtering by team", "operationId": "306d5d4ba7e724e1e6bed9a92821e4fc", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "season", "in": "query", "description": "Season year the counts are requested for. When given, the team's assets are counted against the league it belonged to in that season instead of its current league.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of subplatforms with item counts" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Platform not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-platform/{id}/intent": { "get": { "tags": [ "Item Platform" ], "summary": "Get platform intent data", "description": "Returns usage metrics for a platform including audits, items, item values, and subplatforms counts", "operationId": "f3395de70dee767dddb4e3d7cf8ffa32", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Platform intent data" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-platform/{oldId}/reassign/{newId}": { "put": { "tags": [ "Item Platform" ], "summary": "Reassign items and subplatforms to another platform", "description": "Reassigns all subplatforms and items from one platform to another", "operationId": "608b966f1337688fe6b2c3bf7face0d5", "parameters": [ { "name": "oldId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "newId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Reassignment successful, returns old platform intent data" }, "404": { "description": "Platform not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-subplatform": { "get": { "tags": [ "Item Subplatform" ], "summary": "List all item subplatforms", "description": "Returns a list of item subplatforms with optional filtering", "operationId": "455fc558b27ed533dc0094001f656ea5", "parameters": [ { "name": "subplatform_id", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "season", "in": "query", "description": "Season year the counts are requested for. When given, each team's assets are counted against the league it belonged to in that season instead of its current league.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of subplatforms", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "items_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Item Subplatform" ], "summary": "Create a new subplatform", "description": "Creates a new subplatform under a specified platform", "operationId": "629695bf670aa07bedae5c34a6b5feb5", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "item_platform_id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Subplatform created" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-subplatform/{id}": { "get": { "tags": [ "Item Subplatform" ], "summary": "Get a subplatform by ID", "description": "Returns details of a specific item subplatform", "operationId": "ef3631a90a8ddf80d08cc0c70f9b70e5", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Subplatform details" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Item Subplatform" ], "summary": "Update a subplatform", "description": "Updates the name and platform association of an existing subplatform", "operationId": "f43133abb49f7fe78b7587eae103b6b9", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "item_platform_id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Subplatform updated" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Item Subplatform" ], "summary": "Delete a subplatform", "description": "Removes an item subplatform from the system", "operationId": "8ab226ade6f19de06f013a7752566766", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Subplatform deleted" }, "400": { "description": "Failed to delete" }, "404": { "description": "Subplatform not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-subplatform/{id}/intent": { "get": { "tags": [ "Item Subplatform" ], "summary": "Get subplatform intent data", "description": "Returns usage metrics for a subplatform including audits, items, and item values counts", "operationId": "1dc1f8bdb6337b2ed8b33fe4b8107d26", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Subplatform intent data" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-subplatform/{oldId}/reassign/{newId}": { "put": { "tags": [ "Item Subplatform" ], "summary": "Reassign items to another subplatform", "description": "Reassigns all items from one subplatform to another", "operationId": "8cd9a58fd31c89021dfb2c2cc1bc09f0", "parameters": [ { "name": "oldId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "newId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Reassignment successful, returns old subplatform intent data" }, "404": { "description": "Subplatform not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-value": { "get": { "tags": [ "Item Value" ], "summary": "List all item values", "description": "Returns a paginated list of item values", "operationId": "a1cacd09e11415c7d071297063d0d033", "parameters": [ { "name": "page", "in": "query", "description": "Page number for pagination", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "per_page", "in": "query", "description": "Number of items per page (max 100)", "required": false, "schema": { "type": "integer", "default": 25 } } ], "responses": { "200": { "description": "Paginated list of item values", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Item Value" ], "summary": "Create a new item value", "description": "Creates a new item value record", "operationId": "cf00877fb308e11f8e5e06d5528a9c98", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "item_id": { "type": "integer" }, "audit_id": { "type": "integer" }, "description": { "type": "string", "nullable": true }, "frequency": { "type": "integer", "nullable": true }, "value": { "type": "number", "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "Item value created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-value/{id}": { "get": { "tags": [ "Item Value" ], "summary": "Get an item value by ID", "description": "Returns a single item value", "operationId": "58822892c581bd792b554f045016a9d8", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item value", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Item value details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Item value not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Item Value" ], "summary": "Update an item value", "description": "Updates an item value with new item association, description, frequency, value, images, and videos", "operationId": "a58e5a20a8120585dee5b6055d84b66b", "parameters": [ { "name": "id", "in": "path", "description": "ID of the entity that will be changed", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemValueUpdateRequest" } } } }, "responses": { "200": { "description": "Item Value that was changed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Item Value" ], "summary": "Delete item value(s)", "description": "Deletes one or more item values and their associated media (images, videos, audios)", "operationId": "84ccaee2daa18b7f563efeaf2732536e", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item value to delete", "required": true, "schema": { "type": "integer" } }, { "name": "item_value[]", "in": "query", "description": "Array of item value IDs to delete (optional, overrides path ID)", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "204": { "description": "Item value(s) deleted successfully" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-value/description": { "put": { "tags": [ "Item Value" ], "summary": "Update description for multiple item values", "description": "Updates the description field for multiple item values at once", "operationId": "75c4c328b800b6d8a2d6adbe0c5e5320", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "id", "description" ], "properties": { "id": { "type": "array", "items": { "type": "integer" } }, "description": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Number of updated records", "content": { "application/json": { "schema": { "type": "integer" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-value/description/clear": { "put": { "tags": [ "Item Value" ], "summary": "Clear description for multiple item values", "description": "Clears (sets to null) the description field for multiple item values", "operationId": "ebd52f3c4edbce7a4e08a8eba4db162f", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "id" ], "properties": { "id": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Number of updated records", "content": { "application/json": { "schema": { "type": "integer" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-value/{id}/copy": { "post": { "tags": [ "Item Value" ], "summary": "Copy an item value to another item", "description": "Creates a copy of an item value and associates it with a different item", "operationId": "29b24c7a62af9f15f6fb440756aff3e2", "parameters": [ { "name": "id", "in": "path", "description": "ID of the item value to copy", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "item_id" ], "properties": { "item_id": { "description": "Target item ID", "type": "integer" } }, "type": "object" } } } }, "responses": { "200": { "description": "Copied item value", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemValueUpdateResource" } } } }, "400": { "description": "Item value not found" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/item-video/{id}": { "delete": { "tags": [ "Item Video" ], "summary": "Delete item video", "description": "Removes a video associated with an item", "operationId": "6a79fbb3cab6f6c5a5ba52e17967011f", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when deleted successfully." }, "400": { "description": "Response with error.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Could not find creative to delete" } }, "type": "object" } } } }, "404": { "description": "Response with error.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Could not find creative to delete" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/keywords": { "get": { "tags": [ "Keyword" ], "operationId": "ff11c6bbebabf52b4e565bde4f8bca0c", "responses": { "200": { "description": "Keywords with their assets.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeywordIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Keyword" ], "operationId": "df36fd61d5ccd37fd06b051065a37327", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreKeywordRequest" } } } }, "responses": { "201": { "description": "A new keyword with its image.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeywordShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/keywords/{id}": { "get": { "tags": [ "Keyword" ], "operationId": "fbceb84328d1c895ce7972a724f11ca0", "parameters": [ { "name": "id", "in": "path", "description": "Id of a keyword", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "A keyword with its image.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeywordShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Keyword" ], "operationId": "dcf0c181115fdd532fdbf102e6b9069e", "parameters": [ { "name": "id", "in": "path", "description": "Id of a keyword", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateKeywordRequest" } } } }, "responses": { "201": { "description": "The updated keyword with its image.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeywordShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Keyword" ], "operationId": "de3314af464060f2c2a9fc3e74ae22de", "parameters": [ { "name": "id", "in": "path", "description": "Id of a keyword", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when the keyword has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/keywords/position": { "post": { "tags": [ "Keyword" ], "operationId": "95353e101c64d0c6f1f36a0642194638", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionKeywordRequest" } } } }, "responses": { "200": { "description": "Keywords with their assets.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeywordIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league": { "get": { "tags": [ "League" ], "summary": "List leagues.", "description": "Returns leagues with their related data. Supports filtering, ordering and pagination. When download is true a CSV file is streamed instead of JSON.", "operationId": "0c4c4242dae75f46c431035a2afc13ea", "parameters": [ { "name": "name", "in": "query", "description": "Filter leagues whose name contains this value.", "required": false, "schema": { "type": "string" } }, { "name": "genre", "in": "query", "description": "Genre IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "subgenre", "in": "query", "description": "Subgenre IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "owner", "in": "query", "description": "Owner user IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "withRelationships", "in": "query", "description": "Additional relationships to eager load (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "order_by", "in": "query", "description": "Column to order by (e.g. name, genre_name, subgenre_name, owner_name, divisions_count, properties_count, scouting_priority, platforms_scouted, times_scouted_per_year, release_date).", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "description": "Order direction (asc or desc).", "required": false, "schema": { "type": "string" } }, { "name": "paginated", "in": "query", "description": "When present, returns a paginated response instead of the full collection.", "required": false, "schema": { "type": "boolean" } }, { "name": "per_page", "in": "query", "description": "Items per page when paginated (default 25).", "required": false, "schema": { "type": "integer" } }, { "name": "page", "in": "query", "description": "Page number when paginated.", "required": false, "schema": { "type": "integer" } }, { "name": "download", "in": "query", "description": "When true, streams the result as a CSV file instead of returning JSON.", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "A list of leagues (array, or paginated object when paginated is set). When download is true, a text/csv file is returned instead." }, "403": { "description": "The user lacks the permission required to view leagues." } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "League" ], "summary": "Create a league.", "description": "Creates a league along with its seasons (when dates are provided), default per-platform social scraping settings, league items and assistants.", "operationId": "d59a99da2297073547ac6dcf6d70bf74", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueStoreRequest" } } } }, "responses": { "200": { "description": "The created league with its seasons and logo." }, "400": { "description": "Wrong parameters (e.g. too many assistants or invalid date order)." }, "403": { "description": "The user lacks the permission required to create leagues." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league}": { "get": { "tags": [ "League" ], "summary": "Get a single league.", "description": "Returns a single league with its seasons, owner, rejected companies, notes, assistants and division count.", "operationId": "36bbe02f129adbea6fcbb0feed3cf475", "parameters": [ { "name": "league", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The requested league." }, "404": { "description": "League not found." } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "League" ], "summary": "Update a league.", "description": "Updates a league and, when date fields are provided, batch-updates the dates across all of its seasons. Also syncs assistants, divisions and rejected companies, and reorders sibling leagues.", "operationId": "8b44cb2b08ef82098760d05ae8c59e81", "parameters": [ { "name": "league", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueUpdateRequest" } } } }, "responses": { "200": { "description": "The updated league with its seasons, rejected companies, notes and assistants." }, "400": { "description": "Wrong parameters (e.g. too many assistants, invalid date order, or seasons not set up)." }, "403": { "description": "The user lacks the permission required to edit leagues." } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "League" ], "summary": "Delete a league.", "description": "Deletes the league after validating it can be deleted, removing its notes and logo.", "operationId": "6517bdd725bb2ffc8c10bbc08c3bf631", "parameters": [ { "name": "league", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The league was deleted.", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "deleted" } }, "type": "object" } } } }, "400": { "description": "The league could not be deleted (deletion validation failed)." }, "403": { "description": "The user lacks the permission required to delete leagues." }, "404": { "description": "League not found." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/social-scraping-settings": { "get": { "tags": [ "League" ], "summary": "Get a league's social scraping settings.", "description": "Returns the league together with its Twitter, Facebook, Instagram and TikTok social scraping settings.", "operationId": "b782a5ead2399d407e9930811d1b7c42", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The league with its per-platform social scraping settings." }, "403": { "description": "The user lacks the social scraping settings permission." } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "League" ], "summary": "Update a league's social scraping settings.", "description": "Creates or updates the per-platform (Twitter, Facebook, Instagram, TikTok) social scraping settings for the league. Only the platforms present in the request body are modified.", "operationId": "5c60c9bbdbc44d39b7c43a3c0c37b827", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueUpdateSocialScrapingSettingsRequest" } } } }, "responses": { "200": { "description": "The league with its updated per-platform social scraping settings." }, "403": { "description": "The user lacks the social scraping settings permission." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/social-scraping-settings": { "get": { "tags": [ "League" ], "summary": "List social scraping settings for all leagues.", "description": "Returns one row per league/platform social scraping setting, including the handle count for the platform, with optional filtering and ordering.", "operationId": "ebda2e4221196cfd9d67672533d7bd4f", "parameters": [ { "name": "enabled_status", "in": "query", "description": "Filter by enabled status (enabled or disabled).", "required": true, "schema": { "type": "string", "enum": [ "enabled", "disabled" ] } }, { "name": "name", "in": "query", "description": "Filter leagues whose name contains this value.", "required": false, "schema": { "type": "string" } }, { "name": "genre_id", "in": "query", "description": "Genre IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "subgenre_id", "in": "query", "description": "Subgenre IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "platform", "in": "query", "description": "Platforms to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "week_day", "in": "query", "description": "Week days to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "order_by", "in": "query", "description": "Column to order by (e.g. handles_count or any returned column).", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "description": "Order direction (asc or desc).", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A list of league/platform social scraping settings with handle counts." }, "422": { "description": "Validation failed. The enabled_status parameter is required." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/seasons": { "get": { "tags": [ "League" ], "summary": "List a league's seasons.", "description": "Returns the league with its seasons sorted ascending. The latest released season is flagged as the default/current one. Returns null when the league does not exist.", "operationId": "f8c5002f468ca3e53f73b82736d30bdf", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The league with its seasons, or null when the league does not exist." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/season/{season_id}/properties-for-spend-tracker": { "get": { "tags": [ "League" ], "summary": "List league properties for the spend tracker.", "description": "Returns the league's properties bucketed for the spend tracker for the given season.", "operationId": "c75649948530590adcfff34ae80e00ac", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } }, { "name": "season_id", "in": "path", "description": "Season ID.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The league's properties bucketed for the spend tracker." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/owners": { "get": { "tags": [ "League" ], "summary": "List league owners.", "description": "Returns the distinct set of users that own at least one league, including their person profile and permissions.", "operationId": "44f79b733bee59b79eb73d263d6e46fd", "responses": { "200": { "description": "A list of distinct league owner users." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/organizations": { "get": { "tags": [ "League" ], "summary": "List a league's organizations.", "description": "Returns a simple-paginated list of organizations that have teams in the league, including each organization's type, product type, contract status and matching teams.", "operationId": "b6e22b90bdffa54f949cea34a8716745", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID.", "required": true, "schema": { "type": "integer" } }, { "name": "order_by", "in": "query", "description": "Column to order by.", "required": false, "schema": { "type": "string", "default": "organization", "enum": [ "organization", "types", "contract_statuses" ] } }, { "name": "order_direction", "in": "query", "description": "Order direction.", "required": false, "schema": { "type": "string", "default": "asc", "enum": [ "asc", "desc" ] } }, { "name": "types", "in": "query", "description": "Organization type IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "contract_statuses", "in": "query", "description": "Contract status IDs to filter by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "page", "in": "query", "description": "Page number.", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "per_page", "in": "query", "description": "Items per page.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "A simple-paginated list of organizations with their teams in the league." }, "422": { "description": "Validation failed due to invalid parameters." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league-items/item/{id}": { "get": { "tags": [ "LeagueItems" ], "summary": "Get leagues for item", "description": "Returns all leagues associated with a specific item/asset", "operationId": "a3980526f765b7e9ea63477bd49503b4", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Item for which to fetch leagues.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The leagues for the given Item.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueItemForItemResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league-items/league": { "get": { "tags": [ "LeagueItems" ], "summary": "Get items for league", "description": "Returns all items/assets associated with a specific league", "operationId": "07380ac867349e354cd33302608be077", "parameters": [ { "name": "league", "in": "query", "description": "The id of the League for which to fetch items.", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The items for the given League.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueItemForLeagueResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league-items/item/{id}/update-leagues": { "put": { "tags": [ "LeagueItems" ], "summary": "Update item leagues", "description": "Updates the league associations for a specific item/asset", "operationId": "24dd6cb793b6573dabd20ecbb46e539e", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Item for which to update leagues.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueItemsUpdateItemLeaguesRequest" } } } }, "responses": { "200": { "description": "The items for the given League.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueItemForItemResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league-items/league/{id}/update-items": { "put": { "tags": [ "LeagueItems" ], "summary": "Update league items", "description": "Updates the item/asset associations for a specific league", "operationId": "a0a8da5418c493bd0c9581883a3b9bd5", "parameters": [ { "name": "id", "in": "path", "description": "The id of the League for which to update items.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueItemsUpdateLeagueItemsRequest" } } } }, "responses": { "200": { "description": "The items for the given League.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueItemForLeagueResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/latest-scouting-dates": { "get": { "tags": [ "League" ], "summary": "List latest scouting dates per property for a league.", "description": "Returns the latest scouting dates for each property in the league, wrapped with pagination metadata.", "operationId": "c36410a0b71fea4ca36c7b574629130d", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID to list scouting dates for.", "required": true, "schema": { "type": "integer" } }, { "name": "division_id", "in": "query", "description": "Filter properties by division ID.", "required": false, "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "description": "Items per page (1-20). Defaults to 10.", "required": false, "schema": { "type": "integer", "maximum": 20, "minimum": 1, "example": 10 } }, { "name": "page", "in": "query", "description": "Page number. Defaults to 1.", "required": false, "schema": { "type": "integer", "minimum": 1, "example": 1 } }, { "name": "properties", "in": "query", "description": "Column filter: property (team) IDs to include (comma-separated). Applied across the full dataset.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "scouting_market_owners", "in": "query", "description": "Column filter: owner IDs of the property's representative (earliest-created) scouting market (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "sort_by", "in": "query", "description": "Column to sort the full dataset by. Date columns always sort NULLs last, in both directions.", "required": false, "schema": { "type": "string", "enum": [ "name", "scouting_market_owner", "latest_venue_user_event", "latest_tv_user_event", "latest_radio_user_event", "latest_website_audit", "latest_email_and_app_audit", "latest_linkedin_audit", "latest_facebook_social_scraping_session", "latest_twitter_social_scraping_session", "latest_instagram_social_scraping_session", "latest_audit" ] } }, { "name": "sort_order", "in": "query", "description": "Sort direction. Defaults to asc.", "required": false, "schema": { "type": "string", "default": "asc", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "Successful response. Returns latest scouting dates per property in a paginated envelope." }, "422": { "description": "Validation failed due to invalid parameters." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/latest-scouting-dates/filter-options": { "get": { "tags": [ "League" ], "summary": "Full-dataset filter options for the Audit Dates table.", "description": "Returns the available Property and Scouting Market Owner values for the column filters on GET /api/league/{league_id}/latest-scouting-dates. Values are computed across the full dataset defined by the league and the optional division scope, not just the current page.", "operationId": "317cbb22010e0365588a397a9e5c92d9", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID to list filter options for.", "required": true, "schema": { "type": "integer" } }, { "name": "division_id", "in": "query", "description": "Restrict the options to a division.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Available filter values.", "content": { "application/json": { "schema": { "properties": { "filterOptions": { "properties": { "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "scouting_market_owners": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string", "nullable": true } }, "type": "object" } } }, "type": "object" } }, "type": "object" } } } }, "422": { "description": "Validation failed due to invalid parameters." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/hubspot/segments": { "get": { "tags": [ "Hubspot segments" ], "summary": "List HubSpot segments", "description": "Proxies HubSpot API to return contact segments (lists). Requires authentication.", "operationId": "8976180bbcff4bb490dc16e320633fa6", "parameters": [ { "name": "offset", "in": "query", "description": "Pagination offset", "required": false, "schema": { "type": "integer", "default": 0 } }, { "name": "count", "in": "query", "description": "Number of segments to return (max 500)", "required": false, "schema": { "type": "integer", "default": 500 } }, { "name": "query", "in": "query", "description": "Filter segments by list name (HubSpot searches by list name)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "HubSpot segments (id, name) with pagination", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/HubspotSegmentResource" } }, "total": { "type": "integer" }, "offset": { "type": "integer" }, "hasMore": { "type": "boolean" } }, "type": "object" } } } }, "401": { "description": "Unauthorized" }, "500": { "description": "HubSpot API error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/locations": { "get": { "tags": [ "Location" ], "summary": "List locations", "description": "Returns locations filtered by entity type (agency, company, property) or city", "operationId": "24105decfb008b3fc7da567622381f14", "parameters": [ { "name": "entity_type", "in": "query", "description": "Entity type (agency, company, brand, team, property)", "schema": { "type": "string" } }, { "name": "entity_id", "in": "query", "description": "Entity ID", "schema": { "type": "integer" } }, { "name": "sub_brands", "in": "query", "description": "Include sub-brand locations (for company)", "schema": { "type": "boolean" } }, { "name": "exclude_digital", "in": "query", "description": "Exclude digital locations", "schema": { "type": "boolean" } }, { "name": "cityId", "in": "query", "description": "Filter by city ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of locations" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Location" ], "summary": "Create location", "description": "Creates a new location and optionally attaches it to an entity", "operationId": "1bd3b438bb713a5033a6acb9228b1ed9", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationStoreRequest" } } } }, "responses": { "200": { "description": "New Location.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/locations/{id}": { "get": { "tags": [ "Location" ], "summary": "Get location", "description": "Returns a single location by ID", "operationId": "aac0f1ac8b745f670b6d74e1a681b4f0", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Location.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Location not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Location" ], "summary": "Update a location", "description": "Updates an existing location's details. Rejects `is_us_hq = true` when the location is currently linked to an individual property.", "operationId": "306b86ac43db6579c15a4537e8a76edd", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationUpdateRequest" } } } }, "responses": { "200": { "description": "Updated location" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Location not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/search/smart/brands/locations": { "post": { "tags": [ "Search" ], "summary": "Search brand locations", "description": "Returns a paginated list of brand locations matching the search criteria. Deprecated: use the Reporting API /brands/locations endpoint instead.", "operationId": "6f77cd0dc54389927b6029003009d583", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationForSmartSearchOnBrandsShowRequest" } } } }, "responses": { "200": { "description": "A paginated list of brand locations.", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/LocationForSmartSearchOnBrandsShowResource" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated." }, "422": { "description": "Validation error." } }, "deprecated": true, "security": [ { "bearerAuth": [] } ] } }, "/api/search/smart/brands/locations/metadata": { "post": { "tags": [ "Search" ], "summary": "Get metadata for brand locations smart search", "description": "Returns aggregated metadata (counts, filters) for brand locations search. Deprecated: use the Reporting API POST /brands/locations/metadata endpoint instead.", "operationId": "0da01e381072ea7386ed981e13045004", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationForSmartSearchOnBrandsMetadataRequest" } } } }, "responses": { "200": { "description": "Location search metadata" } }, "deprecated": true, "security": [ { "bearerAuth": [] } ] } }, "/api/search/smart/brands/locations/download": { "post": { "tags": [ "Search" ], "summary": "Download brand locations as CSV", "description": "Downloads filtered brand locations as a CSV file. Deprecated: use the Reporting API POST /brands/locations/download endpoint instead.", "operationId": "24c1066d5edffa9b62deef7672933b23", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationForSmartSearchOnBrandsDownloadRequest" } } } }, "responses": { "200": { "description": "CSV file download" }, "500": { "description": "Download error" } }, "deprecated": true, "security": [ { "bearerAuth": [] } ] } }, "/api/locations/{location_id}": { "delete": { "tags": [ "Location" ], "summary": "Delete a location", "description": "Deletes a location and detaches it from the associated entity", "operationId": "aaa89dcda0660a30bbbbefec469d9e3b", "parameters": [ { "name": "location_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "entity_type", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "agency", "company", "property" ] } }, { "name": "entity_id", "in": "query", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Location deleted successfully" }, "400": { "description": "Failed to delete location" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Location not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/market": { "get": { "tags": [ "Market" ], "summary": "List all markets", "description": "Returns a list of all markets with optional filtering, relationships, and demographics", "operationId": "6f7fafdb80c3b6f089224524083ecc3c", "parameters": [ { "name": "search", "in": "query", "description": "Search markets by name", "required": false, "schema": { "type": "string" } }, { "name": "markets", "in": "query", "description": "Filter by specific market IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "with_demographics", "in": "query", "description": "Include demographics data", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "List of markets", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "country_id": { "type": "integer", "nullable": true }, "market_grouping_id": { "type": "integer", "nullable": true } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Market" ], "summary": "Create a new market", "description": "Creates a new market with the provided name and associated territories", "operationId": "e34e4e4872a06886d067ee46183fa34b", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketStoreUpdateRequest" } } } }, "responses": { "200": { "description": "Market created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "country_id": { "type": "integer", "nullable": true }, "market_grouping_id": { "type": "integer", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/market/{id}": { "get": { "tags": [ "Market" ], "summary": "Get a market by ID", "description": "Returns a single market with its associated territories (continents, countries, states, counties, cities)", "operationId": "ac49ba212650ab24ded3428a6f1cc0ce", "parameters": [ { "name": "id", "in": "path", "description": "ID of the market", "required": true, "schema": { "type": "integer" } }, { "name": "with", "in": "query", "description": "Additional relationships to include (comma-separated)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Market details with territories", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "continents": { "type": "array", "items": { "type": "object" } }, "countries": { "type": "array", "items": { "type": "object" } }, "states": { "type": "array", "items": { "type": "object" } }, "counties": { "type": "array", "items": { "type": "object" } }, "cities": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Market not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Market" ], "summary": "Update a market", "description": "Updates an existing market with the provided data and territories", "operationId": "6c93de12ef8bbc568421e9efdd2de006", "parameters": [ { "name": "id", "in": "path", "description": "ID of the market to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketStoreUpdateRequest" } } } }, "responses": { "200": { "description": "Market updated successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "market_grouping_id": { "type": "integer", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Market not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Market" ], "summary": "Delete a market", "description": "Deletes a market and detaches all associated territories", "operationId": "801b9d96e19297d5db4c45798a4b8790", "parameters": [ { "name": "id", "in": "path", "description": "ID of the market to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Market deleted successfully" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Market not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/market/aggregated": { "get": { "tags": [ "Market" ], "summary": "Get aggregated markets", "description": "Returns aggregated markets based on the provided market IDs. Can return as a comma-separated string if 'raw' parameter is set.", "operationId": "bb99ec6ff704a85f5e421dc97ddb72bc", "parameters": [ { "name": "market_id[]", "in": "query", "description": "Array of market IDs", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "columns[]", "in": "query", "description": "Specific columns to return", "required": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "raw", "in": "query", "description": "If set, returns comma-separated IDs instead of full objects", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Aggregated markets", "content": { "application/json": { "schema": { "oneOf": [ { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, { "description": "Comma-separated IDs when raw=true", "type": "string" } ] } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/market/grouping/{id}": { "get": { "tags": [ "Market Grouping" ], "summary": "Get a market grouping by ID", "description": "Returns a single market grouping with its configuration", "operationId": "74a99712b4795dd5ecf862506b275890", "parameters": [ { "name": "id", "in": "path", "description": "ID of the market grouping", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Market grouping details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketGroupingManagementResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Market grouping not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Market Grouping" ], "summary": "Update a market grouping", "description": "Updates an existing market grouping with new territory support configuration", "operationId": "89ede57c518924f57c153f0cf37f1930", "parameters": [ { "name": "id", "in": "path", "description": "ID of the market grouping to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManageMarketCategoryForCountryRequest" } } } }, "responses": { "200": { "description": "Market grouping updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketGroupingManagementResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Market grouping not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Market Grouping" ], "summary": "Delete a market grouping", "description": "Deletes an editable market grouping and all associated markets", "operationId": "0124464183b08a6a02beee5fa1a76019", "parameters": [ { "name": "id", "in": "path", "description": "ID of the market grouping to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Market grouping deleted successfully" }, "400": { "description": "Market grouping is not editable" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Market grouping not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/market/grouping": { "post": { "tags": [ "Market Grouping" ], "summary": "Create a new market grouping", "description": "Creates a new market grouping with territory support configuration", "operationId": "24771a930066066c112c95f0160fa8e9", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManageMarketCategoryForCountryRequest" } } } }, "responses": { "200": { "description": "Market grouping created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketGroupingManagementResource" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/market/grouping/types": { "get": { "tags": [ "Market Grouping" ], "summary": "Get market grouping types", "description": "Returns all generic market groupings grouped by their level/type", "operationId": "3106d52fa9d903d1e666c2c66fbcda14", "responses": { "200": { "description": "List of market grouping types", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "type": { "type": "string" }, "market_groupings": { "type": "array", "items": { "$ref": "#/components/schemas/MarketGroupingManagementResource" } } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/mobile-auth/token": { "post": { "tags": [ "Mobile Auth" ], "summary": "Mint a long-lived JWT token for the Vortex mobile app", "operationId": "17e4b6f67811a1fd3f8aecf2d3c41e99", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MintTokenRequest" } } } }, "responses": { "201": { "description": "Token minted successfully", "content": { "application/json": { "schema": { "properties": { "token": { "type": "string" }, "expires_in": { "description": "Token lifetime in seconds", "type": "integer" } }, "type": "object" } } } }, "404": { "description": "User not found" }, "401": { "description": "Unauthorized" }, "422": { "description": "Validation error" } }, "security": [ { "apiKey": [] } ] } }, "/api/news/article/{id}/assets": { "get": { "tags": [ "News" ], "summary": "List extracted assets for a curated news article", "operationId": "listNewsAssets", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Asset rows ordered by match_status then confidence desc", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/NewsAssetResource" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing view news permission" }, "404": { "description": "Article not found" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "News" ], "summary": "Manually add an asset to a curated news article (Quick Add)", "operationId": "storeNewsAsset", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreNewsAssetRequest" } } } }, "responses": { "201": { "description": "Asset row created (source=manual, match_status=confirmed)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsAssetResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing edit news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/article/{id}/assets/{assetId}": { "delete": { "tags": [ "News" ], "summary": "Dismiss a news asset row (soft \u2014 sets match_status=dismissed)", "description": "Soft-deletes via status change so subsequent re-imports won't resurrect the row (see NewsAssetImportService::PROTECTED_STATUSES).", "operationId": "dismissNewsAsset", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "assetId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Asset dismissed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsAssetResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing edit news permission" }, "404": { "description": "Article or asset not found" } }, "security": [ { "bearerAuth": [] } ] }, "patch": { "tags": [ "News" ], "summary": "Update a news asset row (pick a different item_id, flip to confirmed)", "operationId": "updateNewsAsset", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "assetId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateNewsAssetRequest" } } } }, "responses": { "200": { "description": "Asset row updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsAssetResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 missing edit news permission" }, "404": { "description": "Article or asset not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/submissions/{id}/contacts/add": { "post": { "tags": [ "News" ], "summary": "Add the extracted contacts a reviewer selected", "description": "Routes each selected row on whether its matched contact still resolves to a live platform contact. Matched rows are updated in place \u2014 the article quote is prepended to their notes and nothing else is touched. Every selected id is answered individually, so a partial failure stays visible.", "operationId": "addNewsContacts", "parameters": [ { "name": "id", "in": "path", "description": "Curated news article id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddNewsContactsRequest" } } } }, "responses": { "200": { "description": "Per-row outcome.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsContactAddResultsResource" } } } }, "403": { "description": "Forbidden \u2014 missing edit news permission" }, "404": { "description": "Article not found" }, "422": { "description": "Empty selection, or an id that belongs to another article", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/news/submissions/{id}/contacts/{newsContactId}/resolve": { "post": { "tags": [ "News" ], "summary": "Create a contact from the LinkedIn profile a reviewer chose", "description": "For a row the sourcing agent left as needs_review. The scrape is queued on the same paced batch a confident match uses, because it spends a real account's cookie, so the answer arrives on the article page rather than in this response.", "operationId": "resolveNewsContact", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "newsContactId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveNewsContactRequest" } } } }, "responses": { "202": { "description": "The row's outcome.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewsContactAddResultsResource" } } } }, "403": { "description": "Forbidden \u2014 missing edit news permission" }, "404": { "description": "Article or extracted contact not found" }, "409": { "description": "This contact is not awaiting a choice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } }, "422": { "description": "Not a LinkedIn member profile URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/note/{entity}/{entityId}": { "post": { "tags": [ "Notes" ], "summary": "Create a note", "description": "Creates a new note for a specific entity (user_event, sale, team, custom_droplet_league_asset, image). Notes on the image entity require the upload-image permission.", "operationId": "e44423737cc22476bf5437f7f4c19ce6", "parameters": [ { "name": "entity", "in": "path", "description": "Entity type", "required": true, "schema": { "type": "string", "enum": [ "user_event", "sale", "team", "custom_droplet_league_asset", "image" ] } }, { "name": "entityId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "content" ], "properties": { "content": { "description": "Note content", "type": "string" }, "sale_list_id": { "description": "Optional sale list ID", "type": "integer" } }, "type": "object" } } } }, "responses": { "204": { "description": "Note created successfully" }, "401": { "description": "Unauthenticated" }, "500": { "description": "Cannot create notable instance" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/note/{id}": { "put": { "tags": [ "Notes" ], "summary": "Update a note", "description": "Updates the content of an existing note", "operationId": "0eb96723a8876e210dee3250cc7e95a6", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "content": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Updated note" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Note not found" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Notes" ], "summary": "Delete a note", "description": "Deletes an existing note", "operationId": "712d33105a83d0a166bc76e6f55903d4", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Note deleted successfully" }, "400": { "description": "Cannot delete note" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Note not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/notes/{entity}/{entityId}": { "get": { "tags": [ "Notes" ], "summary": "List notes for an entity", "description": "Returns all notes for a specific entity with user and sale list information", "operationId": "115e8fe6e267111684c2ac99a817b5fe", "parameters": [ { "name": "entity", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "entityId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "sale_list_id", "in": "query", "description": "Filter by sale list", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of notes" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/notes/{leagueId}/internal-scouting": { "get": { "tags": [ "Notes" ], "summary": "[Deprecated] Get internal scouting notes for a league", "description": "Deprecated. Use GET /api/properties/{teamId}/internal-scouting. Returns internal scouting notes and owner information for a specific league", "operationId": "df19c4cb21646bf53cdb231a7b5d5207", "parameters": [ { "name": "leagueId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "season", "in": "query", "description": "Season id (defaults to current season)", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Internal scouting notes" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "League not found" } }, "deprecated": true, "security": [ { "bearerAuth": [] } ] } }, "/api/properties/{teamId}/internal-scouting": { "get": { "tags": [ "Notes" ], "summary": "Get internal scouting notes for a property", "description": "Returns the internal scouting popup payload for a property in a single round trip: the league name, per-season platforms scouted, social scan review cadence, the league owner and assistants, the scouting window derived from the season dates, the season scouting notes (frequency/duration, spend, athletes scouted and the names of the leagues whose athletes are scouted, additional notes), the last non-social scouting audit date, the property's customer organization(s), and the count of customer organizations across the rest of the league.", "operationId": "5e31c049d5f36405dc31ede7805ccf9e", "parameters": [ { "name": "teamId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "season", "in": "query", "description": "Season id belonging to the property's league (defaults to current season)", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Internal scouting notes" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Property not found, or the requested season does not belong to the property's league" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/admin/leagues/{leagueId}/scouting-notes/{seasonId}": { "get": { "tags": [ "Notes" ], "summary": "Get the internal scouting notes for a league season", "description": "Returns the stored season-scoped internal scouting notes for a (league, season) pair, so the Admin Edit League form can rehydrate the fields it wrote. A league and season that exist but have no saved notes yet return a 200 with null fields rather than a 404, so the form renders empty inputs.", "operationId": "7c0efd745c87c1750e36d439659bda0c", "parameters": [ { "name": "leagueId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "seasonId", "in": "path", "description": "Season id (seasons.id) belonging to the league", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The stored scouting note, or null fields when none has been saved" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "League or season not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Notes" ], "summary": "Upsert internal scouting notes for a league season", "description": "Creates or updates the season-scoped internal scouting notes for a (league, season) pair. Fields are validated independently and partial updates are allowed; omitted fields are left untouched.", "operationId": "0909d73e17461df9d85a4c04f6668bff", "parameters": [ { "name": "leagueId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "seasonId", "in": "path", "description": "Season id (seasons.id) belonging to the league", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "properties": { "frequency_duration": { "type": "boolean", "nullable": true }, "spend": { "type": "boolean", "nullable": true }, "athletes_scouted": { "type": "boolean", "nullable": true }, "athletes_scouted_league_ids": { "type": "array", "items": { "type": "integer" }, "nullable": true }, "additional_notes": { "type": "string", "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "The saved scouting note" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "League or season not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization": { "get": { "tags": [ "Organization" ], "summary": "List organizations", "description": "Returns a paginated or slim list of organizations with optional filtering by type, contract status, and more", "operationId": "d7e9f6249d9c3e47bfbe93d7443024d5", "parameters": [ { "name": "OrganizationIndexRequest", "in": "query", "schema": { "$ref": "#/components/schemas/OrganizationIndexRequest" } } ], "responses": { "200": { "description": "A list of organizations with some relations." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/limit-access-types": { "get": { "tags": [ "Organization" ], "summary": "List organization limit-access types", "description": "Returns all selectable access-limiting modes (e.g. su, spnd_agency) for the organization Profile & Access screen.", "operationId": "9fc24fe91dc4d6d90c95277245bf8a2c", "responses": { "200": { "description": "A list of organization limit-access types." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{id}": { "get": { "tags": [ "Organization" ], "summary": "Show organization", "description": "Returns a single organization by ID. Pass `?slim=1` for a lightweight response or omit for the full representation with relationships (excluding users).", "operationId": "c6eaed98be50125ab15f307335034733", "parameters": [ { "name": "id", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } }, { "name": "slim", "in": "query", "description": "When truthy, returns the organization via Organization::withTrashed()->findOrFail() without extra relationships", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Organization details" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 user does not have view-administration-organization permission" }, "404": { "description": "Organization not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Organization" ], "summary": "Update organization", "description": "Updates core organization attributes (name, product, type, MFA) and syncs representatives, users, markets, and property-type access. Does NOT update contract, subscription, account limits, or surface-usage limits \u2014 use `PUT /api/organization/{organizationId}/contract/update` for those.", "operationId": "c02b93d9c41f9b5b9b8500f4c7703194", "parameters": [ { "name": "id", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationUpdateRequest" } } } }, "responses": { "200": { "description": "Organization updated" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden \u2014 user does not have edit-organization permission" }, "404": { "description": "Organization not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/property-types": { "post": { "tags": [ "Organization" ], "summary": "Sync organization property types", "description": "Updates the property types access list for an organization", "operationId": "b2d204294987ec34fb221b6681ae5bdf", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationSyncPropertyTypeRequest" } } } }, "responses": { "200": { "description": "Property types.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSyncPropertyTypeResource" } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/markets": { "post": { "tags": [ "Organization" ], "summary": "Sync organization markets", "description": "Updates the markets access list for an organization", "operationId": "846eeb3e555479af60d87fecfbafe28d", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationSyncMarketsRequest" } } } }, "responses": { "200": { "description": "Markets.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSyncMarketsResource" } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organizations/{organizationId}/access": { "get": { "tags": [ "Organization" ], "summary": "Get access information for an organization", "operationId": "1ffa201c65ab4ada35f8eec1deb71274", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationAccessResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organizations/{organizationId}/users": { "get": { "tags": [ "Organization" ], "summary": "Get users from organization", "operationId": "a40971204aa0a52b1e45306a771666dc", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } }, { "name": "user_name", "in": "query", "description": "Filter users by name", "required": false, "schema": { "type": "string" } }, { "name": "page", "in": "query", "description": "Page number for pagination", "required": false, "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "description": "Number of results per page", "required": false, "schema": { "type": "integer" } }, { "name": "status", "in": "query", "description": "Filter users by status", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "active", "inactive" ] } } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationUsersResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Organization" ], "summary": "Delete users from organization", "operationId": "789d59a344ae67c564163fdfa5bff9e8", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when organization users has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/contract": { "get": { "tags": [ "Organization" ], "summary": "Get organization contract", "description": "Returns contract details for an organization including billing and subscription information", "operationId": "3e20227a3888c1e50aef1c0adc279650", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationContractResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/contract/update": { "put": { "tags": [ "Organization" ], "summary": "Update organization contract", "description": "Updates contract-related fields for an organization, including account limits, surface usage limits, subscription details, and Salesforce integration fields.", "operationId": "a43d85dce02b65cff44049c6527a8177", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationUpdateContractRequest" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationContractResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/users/download": { "get": { "tags": [ "Organization" ], "summary": "Export users from organization", "operationId": "086ce38682c5572d54633c9dace2302e", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "A csv file with users data." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/integration/salesforce": { "get": { "tags": [ "Organization" ], "summary": "Get Salesforce integration", "description": "Returns Salesforce integration settings and fields for an organization", "operationId": "3a2a66df0516c68e3bb2dfc35903ca28", "parameters": [ { "name": "organizationId", "in": "query", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "A list of salesforce integration for the organization.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialsSalesforceResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/integration/salesforce/save": { "post": { "tags": [ "Organization" ], "summary": "Save Salesforce integration", "description": "Creates or updates Salesforce integration settings for an organization", "operationId": "ef42519e63760645836c779bd0975bec", "parameters": [ { "name": "organizationId", "in": "path", "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveSalesforceRequest" } } } }, "responses": { "200": { "description": "The duplicate report.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialsSalesforceResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/eval-proposal/save": { "post": { "tags": [ "Organization" ], "summary": "Save evaluation proposal limit for an organization", "description": "Updates the evaluation deep mode limit for the specified organization", "operationId": "91fdfaa8436dd74e405049a7d3449f6e", "parameters": [ { "name": "organizationId", "in": "path", "description": "ID of the organization", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Evaluation proposal data", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationEvalProposalSaveRequest" } } } }, "responses": { "200": { "description": "Organization with updated evaluation proposal limit", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Example Organization" }, "eval_deep_mode_limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "404": { "description": "Organization not found" }, "500": { "description": "Failed to save evaluation proposal limit" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organizations/intercom-sync": { "post": { "tags": [ "Organization" ], "summary": "Sync organizations to Intercom", "description": "Triggers bulk synchronization of organizations to Intercom. Returns a job status ID for tracking progress.", "operationId": "204f5ff35e569f1f8cc07aa7110aa8e9", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationIntercomSyncRequest" } } } }, "responses": { "202": { "description": "Sync job has been queued", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Organizations sync to Intercom has been queued" }, "total_organizations": { "type": "integer", "example": 123 } }, "type": "object" } } } }, "403": { "description": "Forbidden - User does not have permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organizations/intercom-sync-status": { "get": { "tags": [ "Organization" ], "summary": "Get organizations Intercom sync status", "description": "Returns the Intercom sync status for specified organizations.", "operationId": "9be9abe37d425004b7e7357fc239b786", "parameters": [ { "name": "organization_ids", "in": "query", "description": "Array of organization IDs to check status for", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "Sync status for organizations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSyncStatusResource" } } } } }, "403": { "description": "Forbidden - User does not have permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/type": { "get": { "tags": [ "Organization" ], "operationId": "4ae2cd0d1306e86e66d789cce8771dac", "responses": { "200": { "description": "All Organization Types.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationTypeIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Organization" ], "operationId": "2d6ae3f163844a4e39f546f18c873d69", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreOrganizationTypeRequest" } } } }, "responses": { "201": { "description": "New Organization Type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationType" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/type/{id}": { "put": { "tags": [ "Organization" ], "operationId": "ab87760499bd9e415ca3bc7b7f471bee", "parameters": [ { "name": "id", "in": "path", "description": "Id of type", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOrganizationTypeRequest" } } } }, "responses": { "201": { "description": "Updated Organization Type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationType" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Organization" ], "operationId": "bc78288008cadd45f1391bd5cb7d9213", "parameters": [ { "name": "id", "in": "path", "description": "Id of Organization Type", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when deleted was successfully." }, "422": { "description": "Organization Type has Organization Assigned.", "content": { "application/json": { "schema": {}, "example": "Organization Type has organizations assigned." } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/reports/partnership": { "get": { "tags": [ "Partnership Reports" ], "summary": "List partnership reports", "description": "Retrieves a list of partnership reports, with optional filtering by category, subcategory, agency, league, tag, and publication date range.", "operationId": "24076faf5891747e250cc430862e5cfa", "parameters": [ { "name": "category", "in": "query", "description": "Filter by report category ID", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "subcategory", "in": "query", "description": "Filter by report subcategory ID", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "agency", "in": "query", "description": "Filter by agency ID", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "league", "in": "query", "description": "Filter by league ID", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "tag", "in": "query", "description": "Filter by tag ID", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "publishedBefore", "in": "query", "description": "Filter by reports published before the given date", "required": false, "schema": { "type": "string", "format": "date-time" } }, { "name": "publishedAfter", "in": "query", "description": "Filter by reports published after the given date", "required": false, "schema": { "type": "string", "format": "date-time" } } ], "responses": { "200": { "description": "Partnership reports list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportCollection" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Partnership Reports" ], "summary": "Create a partnership report", "description": "Creates a partnership report.", "operationId": "e349ad776b0a6f15a5e4f98171cd27a3", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportWriteRequest" } } } }, "responses": { "200": { "description": "Parnership report object", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/reports/partnership/{id}": { "get": { "tags": [ "Partnership Reports" ], "summary": "Retrieve a partnership report", "description": "Fetches a partnership report by its ID.", "operationId": "a1b7d5450a707f2651bec8c2a35e2d2a", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the partnership report to retrieve", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportResource" } } } }, "404": { "description": "Partnership report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Partnership report not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Partnership Reports" ], "summary": "Update a partnership report", "description": "Updates an existing partnership report by its ID with the provided data.", "operationId": "e6dab17823064b265f4fa50ce92da980", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the partnership report to update", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Partnership report data to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportWriteRequest" } } } }, "responses": { "200": { "description": "Partnership report successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportResource" } } } }, "404": { "description": "Partnership report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Partnership report not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Partnership Reports" ], "summary": "Delete a partnership report", "description": "Deletes a partnership report by its ID from the database and returns its data.", "operationId": "b48ee161356151da529ca8c52c1ac043", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the partnership report to delete", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Partnership report successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnershipReportResource" } } } }, "404": { "description": "Partnership report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Partnership report not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/permissions/{name}": { "get": { "tags": [ "Roles & Permissions" ], "summary": "Get permission by name", "description": "Retrieves a specific permission by its slug name, including display name and description", "operationId": "ffb1e2cd414e0f89f1a548525c7fb7b9", "parameters": [ { "name": "name", "in": "path", "description": "Name of the permission in slug format.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermissionShowResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Roles & Permissions" ], "summary": "Update permission", "description": "Updates the display name and/or description of a permission identified by its slug name", "operationId": "bdeadb094c4c3b0ec8851d065e6d390e", "parameters": [ { "name": "name", "in": "path", "description": "Name of the permission in slug format.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermissionUpdateRequest" } } } }, "responses": { "200": { "description": "No content when succesfully updating record." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/product": { "get": { "tags": [ "Product" ], "operationId": "5cc57bec35d0f2045983cc8dcd00eccd", "responses": { "200": { "description": "List of products.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProductResource" } } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Product" ], "operationId": "1d0b0d8724685b7b8f9d87f403bfc4df", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductCreateRequest" } } } }, "responses": { "200": { "description": "Products details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/product/{product_id}": { "get": { "tags": [ "Product" ], "operationId": "9d631e70d2683d5e29f944f988b99f8b", "parameters": [ { "name": "id", "in": "path", "description": "Product id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Products details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Product" ], "operationId": "e1fbefb0afb09c2ebaf2e04353dc83d7", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductUpdateRequest" } } } }, "responses": { "200": { "description": "Products details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Product" ], "operationId": "f72155e45b912db495b280c1967e9263", "parameters": [ { "name": "id", "in": "path", "description": "Product Id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/product-type": { "get": { "tags": [ "Product Type" ], "summary": "List all product types", "description": "Returns all available product types with their associated organization types. Product types define the categories of products available in the platform", "operationId": "d0119194a566221bfbbbd5ecd5caa5a1", "responses": { "200": { "description": "All Product Types.", "content": { "application/json": { "schema": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/ProductType" }, { "properties": { "organization_type": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationType" } } }, "type": "object" } ] } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/attendance/{propertyId}": { "get": { "tags": [ "Attendance" ], "summary": "Get attendance per property by property ID", "operationId": "getAttendancePropertiesByPropertyId", "parameters": [ { "name": "propertyId", "in": "path", "description": "ID of the property", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttendanceResource" } } } } } } }, "put": { "tags": [ "Attendance" ], "summary": "Update properties attendance", "operationId": "updatePropertiesAttendance", "parameters": [ { "name": "propertyId", "in": "path", "description": "ID of the property", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Property attendances to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttendanceUpdateRequest" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttendanceResource" } } } } } } } }, "/api/representation/{controllingPropertyId}": { "get": { "tags": [ "Representation" ], "summary": "Get controlled properties by controlling property ID", "operationId": "getControlPropertiesByControllingPropertyId", "parameters": [ { "name": "controllingPropertyId", "in": "path", "description": "ID of the controlling property", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RepresentationResource" } } } } } } }, "put": { "tags": [ "Representation" ], "summary": "Update controlled properties by controlling property ID", "operationId": "updateControlPropertiesByControllingPropertyId", "parameters": [ { "name": "controllingPropertyId", "in": "path", "description": "ID of the controlling property", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Properties to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RepresentationUpdateRequest" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RepresentationResource" } } } } } } } }, "/api/prepresentation/{controllingPropertyId}": { "post": { "tags": [ "Representation" ], "summary": "Store a new representation", "description": "Create and store a new representation based on the provided data.", "operationId": "storeRepresentation", "parameters": [ { "name": "controllingPropertyId", "in": "path", "description": "ID of the controlling property", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "description": "Properties to update", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RepresentationUpdateRequest" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RepresentationResource" } } } } } } } }, "/api/property/{id}/social": { "get": { "tags": [ "Property" ], "operationId": "8636b25bd2e3e0d823d1574071b2941a", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Property to fetch social handles for.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Social handles for the property with the given id.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyShowSocialResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Property" ], "operationId": "c6ddc1a1090419ee64cef5ec440988c1", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Property to update socials for.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A property with the given id.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/property/{id}/social-extra-handles": { "put": { "tags": [ "Property" ], "operationId": "9ed544373cd3b61746fb1aa400a3bb53", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Property to add social extra handles to.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A property with the given id.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/report-sharing/recipients": { "get": { "tags": [ "Report Sharing" ], "summary": "Get recipients of a shared report", "description": "Returns the list of users who received a specific report, with view status and dates.", "operationId": "reportSharingRecipients", "parameters": [ { "name": "report_type", "in": "query", "description": "Type of report: user_custom or saved", "required": true, "schema": { "type": "string", "enum": [ "user_custom", "saved" ] } }, { "name": "report_id", "in": "query", "description": "Report ID: the admin custom report id (custom_reports.id) for user_custom, or the source saved report id (saved_reports.id) for saved", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of recipients", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ReportSharingRecipientResource" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/report-sharing/reports": { "get": { "tags": [ "Report Sharing" ], "summary": "Get reports received by a user", "description": "Returns the list of reports a specific user has received, with view status and dates.", "operationId": "reportSharingReports", "parameters": [ { "name": "user_id", "in": "query", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of reports", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ReportSharingReportResource" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/report-sharing/saved-reports": { "get": { "tags": [ "Report Sharing" ], "summary": "Get all shared saved reports", "description": "Returns the list of saved reports that have been shared, with sharer info, recipients (users and organizations), sent count and open count.", "operationId": "reportSharingSavedReports", "responses": { "200": { "description": "List of shared saved reports", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ReportSharingSavedReportResource" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/report-sharing/representatives": { "get": { "tags": [ "Report Sharing" ], "summary": "Get representatives in use by active users", "description": "Returns the names and IDs of all entities (agencies, brands, properties) currently set as representatives of at least one active user. Intended as the option list for the representative filter in report sharing.", "operationId": "reportSharingRepresentatives", "responses": { "200": { "description": "List of representatives in use", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ReportSharingRepresentativeResource" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/deals": { "get": { "tags": [ "League" ], "summary": "List league deals per property with aggregated statistics.", "description": "Returns deal statistics for each property (team) matching the provided filters. When use_new_behavior is true the response is a paginated envelope; otherwise it returns all matching properties plus league-level statistics.", "operationId": "0345053225041f1a688be78ede2ee6ba", "parameters": [ { "name": "season", "in": "query", "description": "Season year to report on.", "required": true, "schema": { "type": "integer", "example": 2025 } }, { "name": "status", "in": "query", "description": "User-event statuses to filter deals by (comma-separated UserEventStatus values, e.g. 4,2,1,0). Only applied when use_new_behavior is true.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "platform_id", "in": "query", "description": "Platform ID to filter deals by.", "required": false, "schema": { "type": "integer" } }, { "name": "subplatform_id", "in": "query", "description": "Subplatform ID to filter deals by.", "required": false, "schema": { "type": "integer" } }, { "name": "item_id", "in": "query", "description": "Item ID to filter deals by.", "required": false, "schema": { "type": "integer" } }, { "name": "leagues", "in": "query", "description": "League IDs to filter properties by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "scouting_groups", "in": "query", "description": "Scouting group IDs to filter properties by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "scouting_markets", "in": "query", "description": "Scouting market IDs to filter properties by (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "properties", "in": "query", "description": "Column filter: property (team) IDs to include (comma-separated). Applied across the full dataset. Only used when use_new_behavior is true.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "scouting_market_owners", "in": "query", "description": "Column filter: owner IDs of the property's representative (earliest-created) scouting market (comma-separated). Only used when use_new_behavior is true.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "divisions", "in": "query", "description": "Column filter: division IDs to include (comma-separated). Only used when use_new_behavior is true.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "sort_by", "in": "query", "description": "Column to sort the full dataset by. Only used when use_new_behavior is true. Non-listed columns (assigned counts, brand lists, out_of_home/other companies) are not sortable.", "required": false, "schema": { "type": "string", "enum": [ "name", "owner", "division", "companies_total", "sponsor_companies", "sponsor_in_venue", "tv_companies", "radio_companies", "social_companies", "digital_companies", "vendor_companies", "sponsor_subcategories_count" ] } }, { "name": "sort_order", "in": "query", "description": "Sort direction. Defaults to asc.", "required": false, "schema": { "type": "string", "default": "asc", "enum": [ "asc", "desc" ] } }, { "name": "with_assets_count_by_audit_status", "in": "query", "description": "Include asset counts grouped by audit status in the statistics.", "required": false, "schema": { "type": "boolean" } }, { "name": "use_new_behavior", "in": "query", "description": "When true, returns a paginated response envelope instead of the full result set with league statistics.", "required": false, "schema": { "type": "boolean", "example": false } }, { "name": "per_page", "in": "query", "description": "Items per page (max 20). Only used when use_new_behavior is true.", "required": false, "schema": { "type": "integer", "maximum": 20 } }, { "name": "page", "in": "query", "description": "Page number. Only used when use_new_behavior is true.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Successful response. Returns deal statistics per property; shape depends on use_new_behavior." }, "422": { "description": "Validation failed. The season parameter is required." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/deals/filter-options": { "get": { "tags": [ "League" ], "summary": "Full-dataset filter options for the league-deals table.", "description": "Returns the available Property, Scouting Market Owner and Division values for the column filters on GET /api/league/deals. Values use the same scoped property set as the index endpoint (season, leagues, division_id, scouting_groups, scouting_markets). Deal-level filters (status, platform_id, subplatform_id, item_id) are accepted for request compatibility but do not restrict the option list.", "operationId": "159c70a8643366b1c625b2794ed8a1e4", "parameters": [ { "name": "season", "in": "query", "description": "Season year to report on.", "required": true, "schema": { "type": "integer", "example": 2025 } }, { "name": "status", "in": "query", "description": "Accepted for compatibility; does not restrict filter options.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "platform_id", "in": "query", "description": "Accepted for compatibility; does not restrict filter options.", "required": false, "schema": { "type": "integer" } }, { "name": "subplatform_id", "in": "query", "description": "Accepted for compatibility; does not restrict filter options.", "required": false, "schema": { "type": "integer" } }, { "name": "item_id", "in": "query", "description": "Accepted for compatibility; does not restrict filter options.", "required": false, "schema": { "type": "integer" } }, { "name": "leagues", "in": "query", "description": "League IDs (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "division_id", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "scouting_groups", "in": "query", "description": "Scouting group IDs (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "scouting_markets", "in": "query", "description": "Scouting market IDs (comma-separated).", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "Available filter values.", "content": { "application/json": { "schema": { "properties": { "filterOptions": { "properties": { "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "scouting_market_owners": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string", "nullable": true } }, "type": "object" } }, "divisions": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" } }, "type": "object" } } } }, "422": { "description": "Validation failed. The season parameter is required." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/{league_id}/deals/export": { "get": { "tags": [ "League" ], "summary": "Export year-over-year league deal reports.", "description": "Generates year-over-year deal reports for the league and streams them back as a ZIP archive. When split is true, a report is generated per property in the league.", "operationId": "679a14c74ed3d8ee068108392cfc39f0", "parameters": [ { "name": "league_id", "in": "path", "description": "League ID to export reports for.", "required": true, "schema": { "type": "integer" } }, { "name": "season", "in": "query", "description": "Season year to report on. The previous season is derived automatically for comparison.", "required": true, "schema": { "type": "integer", "example": 2025 } }, { "name": "split", "in": "query", "description": "When true, generates a separate report for every property in the league.", "required": false, "schema": { "type": "boolean" } }, { "name": "property_id", "in": "query", "description": "Restrict the export to a single property.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "ZIP archive containing the generated reports.", "content": { "application/zip": { "schema": { "type": "string", "format": "binary" } } } }, "422": { "description": "Validation failed. The season parameter is required." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/statistics": { "get": { "tags": [ "League" ], "summary": "Fetch aggregated statistics filtered by leagues and/or scouting markets.", "description": "Returns aggregated statistics for teams matching the provided leagues and/or scouting markets. At least one of league_ids or scouting_markets must be provided.", "operationId": "18454192a6ec88c59f14a3cdd8ee92a6", "parameters": [ { "name": "league_ids", "in": "query", "description": "League IDs to filter teams by. Required when scouting_markets is not provided.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" }, "example": [ 11, 12 ] } }, { "name": "scouting_markets", "in": "query", "description": "Scouting market IDs to filter teams by. Required when league_ids is not provided.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" }, "example": [ 42 ] } }, { "name": "season", "in": "query", "description": "Season year. Defaults to the current year when omitted.", "required": false, "schema": { "type": "integer", "example": 2025 } } ], "responses": { "200": { "description": "Successful response. Returns aggregated statistics." }, "422": { "description": "Validation failed. Neither league_ids nor scouting_markets provided, or invalid parameters." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/league/statistics/completion": { "get": { "tags": [ "League" ], "summary": "Fetch per-metric data-quality completion percentages for a league scope.", "description": "Returns, for each metric, the percentage of properties in the scope whose value is neither zero nor more than 25% below the league value. Computed over the full population server-side so it stays correct when the deals list is paginated. Scope matches /api/league/statistics; season is required; at least one of league_ids or scouting_markets must be provided.", "operationId": "41f4e25e1230259e57c4d74ff64b82ef", "parameters": [ { "name": "league_ids", "in": "query", "description": "League IDs to filter properties by. Required when scouting_markets is not provided.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" }, "example": [ 11, 12 ] } }, { "name": "scouting_markets", "in": "query", "description": "Scouting market IDs to filter properties by. Required when league_ids is not provided.", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "type": "integer" }, "example": [ 42 ] } }, { "name": "season", "in": "query", "description": "Season year.", "required": true, "schema": { "type": "integer", "example": 2025 } } ], "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "properties": { "completion": { "description": "Percentage (0-100) of properties that are healthy for each metric.", "properties": { "companies_total": { "type": "integer", "example": 87 }, "sponsor_companies": { "type": "integer", "example": 72 }, "sponsor_in_venue": { "type": "integer", "example": 64 }, "tv_companies": { "type": "integer", "example": 55 }, "radio_companies": { "type": "integer", "example": 40 }, "social_companies": { "type": "integer", "example": 68 }, "digital_companies": { "type": "integer", "example": 71 }, "vendor_companies": { "type": "integer", "example": 33 }, "sponsor_subcategories_count": { "type": "integer", "example": 59 } }, "type": "object" }, "total_properties": { "description": "Number of properties in the scope the percentages were computed over.", "type": "integer", "example": 32 } }, "type": "object" } } } }, "422": { "description": "Validation failed. Season missing, neither league_ids nor scouting_markets provided, or invalid parameters." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/roles": { "get": { "tags": [ "Roles & Permissions" ], "summary": "List all roles", "description": "Returns all roles with their permissions, filtered by the current user's role level", "operationId": "77e3636d8592997ce9d6d27b50857a69", "responses": { "200": { "description": "All Roles with their permissions.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Roles & Permissions" ], "summary": "Create a new role", "description": "Creates a new role with specified permissions and role level", "operationId": "4a563842fbfcad237f63da43065fca3d", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreRoleRequest" } } } }, "responses": { "201": { "description": "A new role with its permissions.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/roles/{id}": { "put": { "tags": [ "Roles & Permissions" ], "summary": "Update a role", "description": "Updates a role's display name, description, permissions, and role level", "operationId": "786d6990093a8eb3a56931f19a827e43", "parameters": [ { "name": "id", "in": "path", "description": "Id of Role to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoleRequest" } } } }, "responses": { "200": { "description": "The updated role with its permissions.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Roles & Permissions" ], "summary": "Delete a role", "description": "Deletes a role and its associated permissions. Fails if users are currently assigned to the role", "operationId": "8285c46981c60ad600aa4077307aec04", "parameters": [ { "name": "id", "in": "path", "description": "Id of Role to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when role has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/role-orientation": { "get": { "tags": [ "RoleOrientation" ], "summary": "List all role orientations", "description": "Returns a list of all role orientations", "operationId": "292d4f62d109dc4e646db1663a613a8d", "parameters": [ { "name": "name", "in": "query", "description": "Filter by name", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of role orientations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RoleOrientation" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "RoleOrientation" ], "summary": "Create a new role orientation", "description": "Creates a new role orientation", "operationId": "29611295373290831b5d974f9802f8f6", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleOrientationStoreRequest" } } } }, "responses": { "201": { "description": "Role orientation created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleOrientation" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/role-orientation/{id}": { "get": { "tags": [ "RoleOrientation" ], "summary": "Get a role orientation by ID", "description": "Returns a single role orientation", "operationId": "c3daf8320d973d283c6fa7291e95ec2e", "parameters": [ { "name": "id", "in": "path", "description": "ID of the role orientation", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Role orientation details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleOrientation" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "RoleOrientation" ], "summary": "Update a role orientation", "description": "Updates an existing role orientation", "operationId": "619f8e9c0df36d6d5e34779bf3b03b81", "parameters": [ { "name": "id", "in": "path", "description": "ID of the role orientation to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleOrientationUpdateRequest" } } } }, "responses": { "200": { "description": "Role orientation updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleOrientation" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "RoleOrientation" ], "summary": "Delete a role orientation", "description": "Deletes a role orientation", "operationId": "4fa1a73cd654513bfeef220f76136407", "parameters": [ { "name": "id", "in": "path", "description": "ID of the role orientation to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Role orientation deleted successfully" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/upload-image-from-url": { "post": { "tags": [ "Images" ], "summary": "Upload an image from a URL", "description": "Downloads an image from the provided URL, uploads it to S3, and returns the upload result. When type is \"asset\", creates an Image record in the database.", "operationId": "uploadImageFromUrl", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadImageFromUrlRequest" } } } }, "responses": { "200": { "description": "Upload result (S3 paths or Image asset record)", "content": { "application/json": { "schema": { "type": "object" } } } }, "422": { "description": "Validation error or invalid image", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Image is invalid. Please try again." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report": { "post": { "tags": [ "Saved Reports" ], "summary": "Create saved report", "description": "Creates a new saved report with the provided name, type, URL, and payload data", "operationId": "4b17aa49f0abf8949e4abc0977c76b7e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportStoreRequest" } } } }, "responses": { "200": { "description": "The new report.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report/{id}": { "put": { "tags": [ "Saved Reports" ], "summary": "Update saved report", "description": "Updates an existing saved report's name, type, URL, payload, or description", "operationId": "e4a65fb6c9ecaf55bcc616c4c574c2b5", "parameters": [ { "name": "id", "in": "path", "description": "The id of the saved report to update.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The updated report.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Saved Reports" ], "summary": "Delete saved report", "description": "Permanently removes a saved report from the system", "operationId": "ff2f1444c914623a22c0192e67dbc52c", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report/{id}/duplicate": { "post": { "tags": [ "Saved Reports" ], "summary": "Duplicate saved report", "description": "Creates a copy of an existing saved report with a new name", "operationId": "723516a6ca767d93c8130a900001cfe1", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportUpdateRequest" } } } }, "responses": { "200": { "description": "The duplicate report.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report-light/{id}/duplicate": { "post": { "tags": [ "Saved Reports" ], "summary": "Duplicate light report", "description": "Creates a copy of an existing light report without thumbnail data", "operationId": "6c0f74781e0fe168304ee8b993ec7c38", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportUpdateRequest" } } } }, "responses": { "200": { "description": "The duplicated light report.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportLightResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report-light": { "post": { "tags": [ "Saved Reports" ], "summary": "Create light report", "description": "Creates a new saved report without generating a thumbnail image", "operationId": "edd4a58f082fabf7ef3629d9a1f224e1", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportStoreRequest" } } } }, "responses": { "200": { "description": "The new report without thumbnail.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportLightResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report-light/{id}": { "put": { "tags": [ "Saved Reports" ], "summary": "Update light report", "description": "Updates an existing light report without regenerating thumbnail data", "operationId": "39b5adc9239e1dfbb1a3c003c9639bb0", "parameters": [ { "name": "id", "in": "path", "description": "The id of the saved report to update.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportStoreRequest" } } } }, "responses": { "200": { "description": "The updated report without thumbnail.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportLightResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report/{savedReport}/share": { "post": { "tags": [ "Saved Reports" ], "summary": "Share saved report", "description": "Shares a saved report with specified users or organizations by creating copies for each recipient", "operationId": "d5c66ff43c9179ea630704c0dcd3dadb", "parameters": [ { "name": "savedReport", "in": "path", "description": "The ID of the saved report to share", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportShareRequest" } } } }, "responses": { "200": { "description": "Report shared successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportLightCollection" } } } }, "404": { "description": "Report not found" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string" }, "message": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/saved-report/{id}/mark-viewed": { "post": { "tags": [ "Saved Reports" ], "summary": "Mark saved report as viewed", "description": "Marks a saved report as viewed by the authenticated user", "operationId": "c9223109f8bbfd438f21dbb3ed54c7b4", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the saved report to mark as viewed", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Report marked as viewed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "You do not have permission to mark this report as viewed." } }, "type": "object" } } } }, "404": { "description": "Report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/property/{property_id}/audio-download-links": { "get": { "tags": [ "Audio Download Links" ], "summary": "Get audio download link", "description": "Retrieves the audio download link associated with a user's scouting event for a specific property", "operationId": "c2e5f6c0fc67f2eda4da441931c1597c", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Audio download link retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AudioDownloadLinkResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Audio Download Links" ], "summary": "Create or update audio download link", "description": "Creates a new audio download link or updates an existing one for a user's scouting event for a specific property. If a link already exists for the user event, it will be updated with the new URL.", "operationId": "4bdbdb07e1b0858bb7bea28207af2c83", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreAudioDownloadLinkRequest" } } } }, "responses": { "201": { "description": "Audio download link created or updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AudioDownloadLinkResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/property/{property_id}/audio-download-links/{id}": { "delete": { "tags": [ "Audio Download Links" ], "summary": "Delete audio download link", "description": "Deletes an audio download link associated with a user's scouting event for a specific property", "operationId": "7904d623aeaa1d3108faf379b3b1a449", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Audio download link deleted successfully." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/logo-recognition/{logo_recognition_entity}/{logo_recognition_entity_id}/ignore-brands": { "post": { "tags": [ "LogoRecognition" ], "summary": "Ignore brands in logo recognition", "description": "Sets the list of brands to be ignored during logo recognition for a property or league", "operationId": "14c6aceb7082ad12958c9114e9ddf13a", "parameters": [ { "name": "logo_recognition_entity", "in": "path", "description": "Entity type (property or leagues)", "required": true, "schema": { "type": "string", "enum": [ "property", "leagues" ] } }, { "name": "logo_recognition_entity_id", "in": "path", "description": "The ID of the entity", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogoRecognitionIgnoreBrandsRequest" } } } }, "responses": { "200": { "description": "List of rejected brands for the entity" }, "401": { "description": "Unauthenticated" }, "404": { "description": "Entity not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/logo-recognition/image-process": { "post": { "tags": [ "LogoRecognition" ], "summary": "Process images for logo recognition", "description": "Marks images as processed or unprocessed for logo recognition training. Requires logo training permission.", "operationId": "6eebea24c204bb57d38b56ab5d8b266f", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogoRecognitionImageProcessRequest" } } } }, "responses": { "200": { "description": "Synced image data", "content": { "application/json": { "schema": { "properties": { "item_images": { "description": "Array of processed item images", "type": "array", "items": { "properties": { "item_value_id": { "type": "integer" }, "image_ids": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - requires logo training permission" }, "500": { "description": "Server error during processing" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/property/{property_id}/youtube-links": { "get": { "tags": [ "ScoutingYoutubeLink" ], "summary": "List scouting YouTube links", "description": "Returns all YouTube links associated with a user's scouting event for a specific property", "operationId": "f37e57ce3931072c428b34c3e1019ea4", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "An array of scouting YouTube links.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingYoutubeLinkResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "ScoutingYoutubeLink" ], "summary": "Create scouting YouTube link", "description": "Adds a new YouTube link to a user's scouting event for a specific property", "operationId": "fbf9d05c4a9df0c3785de2a173c2352a", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingYoutubeLinkStoreRequest" } } } }, "responses": { "201": { "description": "YouTube link created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingYoutubeLinkResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/property/{property_id}/youtube-links/{youtube_link_id}": { "put": { "tags": [ "ScoutingYoutubeLink" ], "summary": "Update scouting YouTube link", "description": "Updates an existing YouTube link URL for a user's scouting event", "operationId": "8ba473a8031b2e2b3861ef41461309ba", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "youtube_link_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingYoutubeLinkUpdateRequest" } } } }, "responses": { "200": { "description": "YouTube link updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingYoutubeLinkResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "ScoutingYoutubeLink" ], "summary": "Delete scouting YouTube link", "description": "Removes a YouTube link from a user's scouting event for a specific property", "operationId": "0cc8ce3838092a4c4edae7fdee1dbcfe", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "youtube_link_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "YouTube link deleted successfully." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/property/{property_id}/uploads": { "get": { "tags": [ "UserEventUploads" ], "summary": "List user event uploads", "description": "Returns all uploaded media files associated with a user's scouting event for a specific property", "operationId": "524f8e4fdc1679c416a7d77907e179b9", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "An array with user event uploads and their media.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserEventUploadsIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "UserEventUploads" ], "summary": "Create user event upload", "description": "Associates a media file with a user's scouting event for a specific property", "operationId": "771e646a60c2f5aa906c4bc4553604c4", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserEventUploadsStoreRequest" } } } }, "responses": { "200": { "description": "A new user event upload and its media.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserEventUploadsStoreResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/property/{property_id}/uploads/{id}": { "get": { "tags": [ "UserEventUploads" ], "summary": "Get user event upload", "description": "Returns a single uploaded media file associated with a user's scouting event for a specific property", "operationId": "980635bb54b0609011b71e03bc7b2c4c", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "property_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User event upload with media.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserEventUploadsStoreResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "UserEventUploads" ], "summary": "Delete user event upload", "description": "Removes an uploaded media file from a user's scouting event", "operationId": "24dc1887901dea7a932854a1f13a7a62", "parameters": [ { "name": "event_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when user event upload has been deleted successfully." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/scouting-groups": { "get": { "tags": [ "Scouting Groups" ], "summary": "List scouting groups", "description": "Returns all scouting groups with their owners, members, and member counts", "operationId": "c5781451f1f168b06373e1540fb1b1de", "responses": { "200": { "description": "All Scouting Groups", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingGroupsIndex" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Scouting Groups" ], "summary": "Create or update scouting group", "description": "Creates a new scouting group or updates an existing one if an ID is provided, and syncs the group members", "operationId": "a62afe6f35086bd538f28960530ea525", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingGroupsStoreRequest" } } } }, "responses": { "200": { "description": "The created Scouting Group", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoutingGroup" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/scouting-groups/{id}": { "delete": { "tags": [ "Scouting Groups" ], "summary": "Delete scouting group", "description": "Removes a scouting group and detaches all its members", "operationId": "6dc6853da67618952c1bc19a474813b4", "parameters": [ { "name": "id", "in": "path", "description": "ID of Scouting Group to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Scouting Group deleted" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/search/{entity}/by-id/list": { "post": { "tags": [ "Search" ], "summary": "Get entities by IDs as flat list", "description": "A dynamic endpoint that returns simple items for the given entity. Supports brand and property entities, returning ID, name, and logo for each item", "operationId": "b878b803278e85324c0e01ac4ccf1f66", "parameters": [ { "name": "entity", "in": "path", "description": "Entity used for retrieving the data", "required": true, "schema": { "type": "string" } }, { "name": "SearchEntityByIdRequest", "in": "query", "schema": { "$ref": "#/components/schemas/SearchEntityByIdRequest" } } ], "responses": { "200": { "description": "An array with simple items.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchEntityResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/search/{entity}/by-id/grouped": { "post": { "tags": [ "Search" ], "summary": "Get entities by IDs grouped by category/league", "description": "A dynamic endpoint that returns simple items for the given entity, grouped by their parent category (for brands) or league (for properties)", "operationId": "c54af0a74c2159945f8aee0028dd54ab", "parameters": [ { "name": "entity", "in": "path", "description": "Entity used for retrieving the data", "required": true, "schema": { "type": "string" } }, { "name": "SearchEntityByIdRequest", "in": "query", "schema": { "$ref": "#/components/schemas/SearchEntityByIdRequest" } } ], "responses": { "200": { "description": "An array of groups with simple items.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchByIdGroupedResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/search/entity/{entity}": { "get": { "tags": [ "Search" ], "summary": "Search entities by name", "description": "A dynamic endpoint that searches and returns simple items for the given entity type. Supports agency, company, league, market, organization, property, scouting_group, scouting_market, user, and role entities", "operationId": "c1112a58865f6722aed94b0a1a32c80a", "parameters": [ { "name": "entity", "in": "path", "description": "Entity used for retrieving the data", "required": true, "schema": { "type": "string" } }, { "name": "SearchEntityRequest", "in": "query", "schema": { "$ref": "#/components/schemas/SearchEntityRequest" } } ], "responses": { "200": { "description": "An array with simple items.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchEntityResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/search/{indexed_entity}": { "get": { "tags": [ "Search" ], "summary": "Global search over a Meilisearch-indexed entity", "description": "Searches the Meilisearch index for the given entity type and returns matching items (capped at 100), with entity-specific filtering, permission checks, and optional relationship loading applied.", "operationId": "82e1cade2feeb042d7132eb6df8da393", "parameters": [ { "name": "indexed_entity", "in": "path", "description": "Indexed entity to search", "required": true, "schema": { "type": "string", "enum": [ "agency", "brand", "property", "contact", "user", "league", "category", "market", "organization", "venue", "subcategory", "genre", "subgenre", "asset" ] } }, { "name": "SearchIndexedRequest", "in": "query", "schema": { "$ref": "#/components/schemas/SearchIndexedRequest" } } ], "responses": { "200": { "description": "The matching indexed items and a total count.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchIndexedResource" } } } }, "400": { "description": "Provided entity is not supported." }, "503": { "description": "Search service is temporarily unavailable." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/webhooks/brightdata/posts-ready": { "post": { "tags": [ "Webhooks" ], "description": "Handle BrightData direct post delivery webhook. BrightData POSTs the raw post collection as a JSON array. Session and gap IDs are encoded in the URL query params.", "operationId": "83172fa9ca4f092ade656999041ed287", "parameters": [ { "$ref": "#/components/schemas/BrightdataPostsDeliveryRequest/properties/session_id" }, { "$ref": "#/components/schemas/BrightdataPostsDeliveryRequest/properties/gap_id" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "responses": { "200": { "description": "Webhook received successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Webhook acknowledged" } }, "type": "object" } } } }, "403": { "description": "Forbidden - Invalid token" }, "422": { "description": "Validation error - Missing or invalid session_id / gap_id" }, "500": { "description": "Internal processing error - BrightData should retry delivery", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Internal processing error." } }, "type": "object" } } } } } } }, "/api/unmatched-handles/{type}": { "get": { "tags": [ "Social Scraping Sessions" ], "summary": "List matched suggestions for brand unmatched handles", "description": "Aggregates unmatched handles across the given scraping sessions and returns fuzzy-match brand suggestions for the given platform/source.", "operationId": "9a8a07bdffc544680cb891496521fbac", "parameters": [ { "name": "type", "in": "path", "description": "Social platform / source.", "required": true, "schema": { "type": "string", "example": "instagram" } }, { "name": "social_scraping_session", "in": "query", "description": "Comma-separated scraping session IDs.", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "matching_threshold", "in": "query", "description": "Minimum fuzzy-match score (0-100) for a suggestion to be returned.", "required": true, "schema": { "type": "integer", "example": 70 } }, { "name": "matching_max_count", "in": "query", "description": "Maximum number of suggestions per handle.", "required": true, "schema": { "type": "integer", "example": 5 } } ], "responses": { "200": { "description": "Unmatched handles with brand match suggestions.", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "name": { "type": "string", "example": "cocacola" }, "entity_name": { "type": "string", "example": "Coca-Cola", "nullable": true }, "social_media_values": { "type": "string", "example": "cocacola,coke", "nullable": true } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error (missing social_scraping_session, matching_threshold or matching_max_count)." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/unmatched-handles/property": { "get": { "tags": [ "Social Scraping Sessions" ], "summary": "List matched suggestions for property unmatched handles", "description": "Aggregates unmatched handles across the given scraping sessions and returns fuzzy-match property suggestions.", "operationId": "573c306d117d36e7f6c0728c8b310203", "parameters": [ { "name": "social_scraping_session", "in": "query", "description": "Comma-separated scraping session IDs.", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "matching_threshold", "in": "query", "description": "Minimum fuzzy-match score (0-100) for a suggestion to be returned.", "required": true, "schema": { "type": "integer", "example": 70 } }, { "name": "matching_max_count", "in": "query", "description": "Maximum number of suggestions per handle.", "required": true, "schema": { "type": "integer", "example": 5 } } ], "responses": { "200": { "description": "Unmatched handles with property match suggestions.", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "name": { "type": "string", "example": "lakers" }, "entity_name": { "type": "string", "example": "Los Angeles Lakers", "nullable": true }, "social_media_values": { "type": "string", "example": "lakers", "nullable": true } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error (missing social_scraping_session, matching_threshold or matching_max_count)." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions": { "get": { "tags": [ "Social Scraping Sessions" ], "summary": "List league social scraping sessions", "description": "Paginated listing of league social scraping sessions for a season, with brand/item counts and review status. Supports grouped rows and CSV download.", "operationId": "f617ecb88fca2271399be8bdfc587b8e", "parameters": [ { "name": "season", "in": "query", "description": "Season year.", "required": true, "schema": { "type": "integer", "example": 2024 } }, { "name": "review_status", "in": "query", "description": "Review status filter.", "required": true, "schema": { "type": "string", "enum": [ "pending", "reviewed" ] } }, { "name": "grouped", "in": "query", "description": "Group sessions by handle/type/user. When true, each row carries social_scraping_session_ids and the has_unmatched_handles / has_rejected_companies flags.", "required": false, "schema": { "type": "boolean", "default": false } }, { "name": "include_empty", "in": "query", "description": "Include sessions whose audits have no items.", "required": false, "schema": { "type": "boolean", "default": false } }, { "name": "download", "in": "query", "description": "When true, returns a CSV stream (text/csv) instead of JSON.", "required": false, "schema": { "type": "boolean", "default": false } }, { "name": "league_id", "in": "query", "description": "Comma-separated league IDs.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "division_id", "in": "query", "description": "Comma-separated division IDs.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "team_id", "in": "query", "description": "Comma-separated team IDs.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "user_id", "in": "query", "description": "Comma-separated scanner user IDs.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "reviewer", "in": "query", "description": "Comma-separated reviewer user IDs.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "type", "in": "query", "description": "Comma-separated social platforms.", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "twitter", "facebook", "instagram", "tiktok", "youtube", "twitch" ] } } }, { "name": "platform_handle", "in": "query", "description": "Comma-separated platform handles, each formatted as type@handle.", "required": false, "schema": { "type": "array", "items": { "type": "string", "example": "twitter@lakers" } } }, { "name": "status_value", "in": "query", "description": "Comma-separated user_event status values.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "scouting_markets", "in": "query", "description": "Comma-separated scouting market IDs.", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } }, { "name": "order_by", "in": "query", "description": "Sort column.", "required": false, "schema": { "type": "string", "enum": [ "division_name", "followers_count", "team_name", "user_name", "reviewer_name", "start", "end", "brands_count", "items_count", "handle" ] } }, { "name": "order_direction", "in": "query", "description": "Sort direction.", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "order", "in": "query", "description": "Deprecated alias of order_direction; still accepted and normalized to order_direction. Prefer order_direction.", "required": false, "deprecated": true, "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "schema": { "type": "integer", "default": 1, "minimum": 1, "example": 1 } }, { "name": "per_page", "in": "query", "description": "Page size (max 200).", "required": false, "schema": { "type": "integer", "default": 10, "maximum": 200, "example": 10 } }, { "name": "infinite_scroll", "in": "query", "description": "When true, returns simple pagination (next_page_url/prev_page_url, no total/last_page) for infinite scroll. Default false keeps length-aware pagination with total.", "required": false, "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "Paginated sessions. With infinite_scroll=true the payload uses simple pagination (next_page_url/prev_page_url, no total/last_page). download=true returns a text/csv stream.", "content": { "application/json": { "schema": { "properties": { "current_page": { "type": "integer", "example": 1 }, "per_page": { "type": "integer", "example": 10 }, "total": { "description": "Only present with length-aware pagination; omitted when infinite_scroll=true.", "type": "integer", "example": 128, "nullable": true }, "next_page_url": { "description": "URL of the next page; present when infinite_scroll=true.", "type": "string", "nullable": true }, "prev_page_url": { "description": "URL of the previous page.", "type": "string", "nullable": true }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 98765 }, "type": { "type": "string", "example": "instagram" }, "handle": { "type": "string", "example": "lakers" }, "team_id": { "type": "integer", "example": 321 }, "user_id": { "type": "integer", "example": 42, "nullable": true }, "brands_count": { "type": "integer", "example": 14 }, "items_count": { "type": "integer", "example": 37 }, "statuses": { "description": "GROUP_CONCAT of distinct user_event statuses.", "type": "string", "example": "1,2", "nullable": true }, "start_date": { "type": "string", "example": "2024-08-01 00:00:00", "nullable": true }, "end_date": { "type": "string", "example": "2024-08-31 23:59:59", "nullable": true }, "scan_group": { "type": "string", "example": "98765" }, "social_scraping_session_ids": { "description": "Only present when grouped=true: comma-separated session ids in the group.", "type": "string", "example": "98765,98766", "nullable": true }, "has_unmatched_handles": { "description": "Only present when grouped=true: group has at least one unmatched handle for its platform.", "type": "boolean", "example": true }, "has_rejected_companies": { "description": "Only present when grouped=true: group has at least one rejected company.", "type": "boolean", "example": false }, "total_followers": { "description": "Only present when league_id is provided.", "type": "integer", "example": 1500000, "nullable": true }, "platform_followers": { "description": "Only present when league_id is provided.", "type": "integer", "example": 900000, "nullable": true }, "latest_reviewed_at": { "description": "Only present when review_status=reviewed.", "type": "string", "example": "2024-09-02 10:15:00", "nullable": true } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error (missing season or review_status)." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/metadata": { "get": { "tags": [ "Social Scraping Sessions" ], "summary": "Get metadata for social scraping session filters", "description": "Returns filter metadata (divisions, teams, users, reviewers, platform handles) for the given season and review status. Exactly one of league_id or team_id must be provided.", "operationId": "1503975946cff04fc828c91fa78c13ea", "parameters": [ { "name": "season", "in": "query", "description": "Season year", "required": true, "schema": { "type": "integer" } }, { "name": "review_status", "in": "query", "description": "Review status filter", "required": true, "schema": { "type": "string" } }, { "name": "league_id", "in": "query", "description": "League ID. Exactly one of league_id or team_id is required; they are mutually exclusive.", "required": false, "schema": { "type": "integer" } }, { "name": "team_id", "in": "query", "description": "Team ID. Exactly one of league_id or team_id is required; they are mutually exclusive.", "required": false, "schema": { "type": "integer" } }, { "name": "include_empty", "in": "query", "description": "Whether to include sessions with no items", "required": false, "schema": { "type": "boolean" } }, { "name": "scouting_markets", "in": "query", "description": "Comma-separated list of scouting market IDs", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "Metadata for the given filters. For league_id: includes divisions, teams, users, reviewers, and platformHandles. For team_id: includes users, reviewers, and platformHandles.", "content": { "application/json": { "schema": { "properties": { "divisions": { "type": "array", "items": { "type": "object" } }, "teams": { "type": "array", "items": { "type": "object" } }, "users": { "type": "array", "items": { "type": "object" } }, "reviewers": { "type": "array", "items": { "type": "object" } }, "platformHandles": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "422": { "description": "Validation failure. Returned when neither or both of league_id/team_id are provided, or when season/review_status are missing." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-session/{id}": { "get": { "tags": [ "Social Scraping Sessions" ], "summary": "Get a single social scraping session", "description": "Returns one social scraping session with its team, scanner, reviews, and season events (including audits and item counts). Returns null when no session matches the id.", "operationId": "0417d333767f17f71ea890853caa2d00", "parameters": [ { "name": "id", "in": "path", "description": "Social scraping session id.", "required": true, "schema": { "type": "integer", "example": 98765 } } ], "responses": { "200": { "description": "The session, or null when not found.", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 98765 }, "type": { "type": "string", "example": "instagram" }, "handle": { "type": "string", "example": "lakers" }, "team_id": { "type": "integer", "example": 321, "nullable": true }, "user_id": { "type": "integer", "example": 42, "nullable": true }, "team": { "type": "object", "nullable": true }, "reviews": { "type": "array", "items": { "type": "object" } }, "user": { "type": "object", "nullable": true }, "events": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/social-scraping-sessions/league/{leagueId}/latest/download": { "get": { "tags": [ "Social Scraping Sessions" ], "summary": "Download latest league social scans", "description": "Downloads a CSV file of the latest social scraping sessions for a specific league and platform", "operationId": "a4020e700c894c877101ee48d63d226e", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "integer" } }, { "name": "platform", "in": "query", "description": "Platform", "required": true, "schema": { "type": "string", "enum": [ "twitter", "facebook", "instagram", "tiktok" ] } } ], "responses": { "200": { "description": "Success" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/accuracy-metrics/league/{leagueId}/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Get accuracy metrics for league in season", "operationId": "f500969136e1001e147bce6ef2156007", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "integer" }, "example": "3" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "integer" }, "example": "298" } ], "responses": { "200": { "description": "League accuracy metrics for Predicted Deal Revenues for league in season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccuracyMetricsResultResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/currency-rates": { "get": { "tags": [ "Spend tracker" ], "description": "Get currency exchange rates for a season", "operationId": "217cadb5e7e9edb860992e98b98f6b1c", "parameters": [ { "name": "season_id", "in": "query", "required": true, "schema": { "type": "integer", "example": 292 } } ], "responses": { "200": { "description": "Currency exchange rates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CurrencyExchangeRateResource" } } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Spend tracker" ], "description": "Update currency exchange rates for a season", "operationId": "63f9d62ecf90fce72c96064315f19417", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrencyExchangeRateUpdateRequest" } } } }, "responses": { "200": { "description": "Updated currency exchange rates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CurrencyExchangeRateResource" } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/bucket/assets": { "get": { "tags": [ "Spend tracker" ], "summary": "Get all asset buckets", "description": "Fetch asset buckets with droplets", "operationId": "3b21ebc75cf8f6e4ace00b5f4d79e670", "responses": { "200": { "description": "Asset Buckets with droplets", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetBucketsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Spend tracker" ], "summary": "Update asset buckets", "description": "Updates multiple asset buckets with their droplet configurations", "operationId": "39ee2b1280b1ae0e5cdd5ac37bed9ef6", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetsBucketsUpdateRequest" } } } }, "responses": { "201": { "description": "Asset Buckets with droplets", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetBucketsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/change-log/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch and format activity logs for spend tracker actions by season id", "operationId": "11336d3a0c7334f0513e31ba5703601f", "parameters": [ { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The formatted change log for the given season.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpendTrackerChangeLogShowResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/deal-bucket-assets": { "get": { "tags": [ "Spend tracker" ], "description": "Get deal with deal assets in buckets", "operationId": "cbfc753d982e3b42de8399fb18d7163a", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealBucketAssetsGetDealAssetsByBucketsRequest" } } } }, "responses": { "200": { "description": "Deal with deal assets in buckets", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealBucketAssetsGetDealAssetsByBucketsResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/league-assets/custom-bucket": { "post": { "tags": [ "Spend tracker" ], "description": "Assing an asset to a different bucket, only for a certain deal", "operationId": "065d70f66e9f126868752b47c57babff", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveCustomAssetBucketForDealRequest" } } } }, "responses": { "200": { "description": "League Asset Buckets", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DealBucketAssetsGetDealAssetsByBucketsResource" } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/deal-levels": { "put": { "tags": [ "Spend tracker" ], "summary": "Update deal level", "description": "Updates the deal level classification for a property-brand combination in a specific season", "operationId": "46c17ed57521c9c33da7328d0594cdf5", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealLevelsUpdateRequest" } } } }, "responses": { "200": { "description": "Deal level updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealLevelsResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/deal-levels/season/{seasonId}/property/{propertyId}/brand/{brandId}": { "delete": { "tags": [ "Spend tracker" ], "summary": "Delete deal level", "description": "Removes a deal level classification for a specific property-brand combination in a season", "operationId": "bdfcaa7c7f3e7ae7f6df042f6f4ba891", "parameters": [ { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "integer" } }, { "name": "propertyId", "in": "path", "description": "Property ID", "required": true, "schema": { "type": "integer" } }, { "name": "brandId", "in": "path", "description": "Brand ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when deal level has been deleted successfully." }, "404": { "description": "Response with error.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Could not find deal level to delete" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/deal-types": { "post": { "tags": [ "Spend tracker" ], "description": "Create deal type", "operationId": "36dcf579f48882ca602031cb409a1a7e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealTypesCreateUpdateRequest" } } } }, "responses": { "200": { "description": "Deal type created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealTypesResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/deal-types/{id}": { "put": { "tags": [ "Spend tracker" ], "description": "Update deal type", "operationId": "99072c0508aa97d8b2a7b84081ca51f4", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealTypesCreateUpdateRequest" } } } }, "responses": { "200": { "description": "Deal type updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealTypesResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Spend tracker" ], "description": "Delete deal type", "operationId": "5cabbabc832c5a326ee8f9ea0acb30c7", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealTypesDeleteRequest" } } } }, "responses": { "204": { "description": "Empty response when deal type has been deleted successfully." }, "404": { "description": "Response with error.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Could not find deal type to delete" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/dollar-off-metrics/accuracy-selection": { "get": { "tags": [ "Spend tracker" ], "description": "Get Dollar-Off Accuracy Selections for league and season", "operationId": "1898aa181391b5b09622098751c9de87", "responses": { "200": { "description": "Get Dollar-Off Accuracy Selections for league and season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccuracySelectionResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Spend tracker" ], "description": "Highlight a cell in Dollar-Off Metrics Accuracy Selection table", "operationId": "e3ff2251a8900ab3b69941bb25cecfe9", "responses": { "204": { "description": "Empty on success" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Spend tracker" ], "description": "Remove Highlight from a cell in Dollar-Off Metrics Accuracy Selection table", "operationId": "3920981fad7b05b15a721072177aad85", "responses": { "204": { "description": "Empty on success" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/dollar-off-metrics/league": { "get": { "tags": [ "Spend tracker" ], "description": "Get Dollar-Off metrics for league and season", "operationId": "3a87e017973166a460942b4ef18f24a4", "responses": { "200": { "description": "League Dollar-Off metrics for Predicted Deal Revenues for league and season", "content": { "application/json": { "schema": {} } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/metrics/dollar-off": { "get": { "tags": [ "Spend tracker" ], "summary": "Get dollar-off metrics", "description": "Get Dollar-Off metrics for league in season", "operationId": "35a2788882b0439863fc4e07be964795", "responses": { "200": { "description": "League Dollar-Off metrics for Predicted Deal Revenues for league and season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DollarOffMetricsResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Spend tracker" ], "summary": "Highlight metrics cell", "description": "Highlight a cell in Dollar-Off metrics table", "operationId": "9db709b9538d6ee05d797df13c23ef41", "responses": { "204": { "description": "Empty on success" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Spend tracker" ], "summary": "Remove metrics cell highlight", "description": "Remove Highlight from a cell in Dollar-Off metrics table", "operationId": "d4dcdbeeba7aa55370c1c0778c85adb1", "responses": { "204": { "description": "Empty on success" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/league-assets/{leagueId}/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch league asset buckets with droplets", "operationId": "177818034594465200b97f570662f837", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" }, "example": "3" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "298" } ], "responses": { "200": { "description": "League Asset Buckets with droplets", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueAssetBucketsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Spend tracker" ], "description": "Fetch league asset buckets with droplets", "operationId": "5fd5bbae0bb3c4c3f3e667142c14a060", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" }, "example": "3" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "298" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueAssetBucketsUpdateRequest" } } } }, "responses": { "200": { "description": "League Asset Buckets with droplets", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueAssetBucketsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/league/{leagueId}/season/{seasonId}/minimums/calculate": { "get": { "tags": [ "Spend tracker" ], "description": "Calculate League Minimums, save to database, return League Minimums", "operationId": "d3948bb1739920103da839f857669647", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" }, "example": "1" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "286" } ], "responses": { "200": { "description": "Minimums Predicted Deal Revenues per League and Season Property Bucket", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalculateLeagueMinimumsResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/league-properties/{leagueId}/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch league property buckets and revenues in season", "operationId": "8f3c0dbe61678adbaef1063932d87b3f", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" } }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "League data, revenue and buckets with revenues in season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaguePropertyBucketsShowResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/league-properties": { "post": { "tags": [ "Spend tracker" ], "description": "Creates/updates Buckets and Droplets in specific LeaguePropertyBuckets", "operationId": "56c4a4c1da5a07a5eadf43482eaa3dce", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaguePropertyBucketsUpdateRequest" } } } }, "responses": { "200": { "description": "League data, revenue and buckets with revenus in season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaguePropertyBucketsShowResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/league/{leagueId}/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch league revenue in season", "operationId": "7da04a734412dc545300d5b667bebfc1", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" } }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "League revenue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueLeagueResource" } } } }, "404": { "description": "League revenue not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/leagues": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch spendtracker leagues with buckets", "operationId": "9f09ef16ffc4e7558ffca3f983224776", "responses": { "200": { "description": "List of spendtracker leagues", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueStatusCollection" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/league/{leagueId}/season/{seasonId}/margin-of-error/calculate": { "get": { "tags": [ "Spend tracker" ], "description": "Calculate Margin of Error, save to database, return WIP Predicted Revenues with MOE", "operationId": "18b2eda354297e7ba2b6b9783c7c7010", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" }, "example": "1" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "286" } ], "responses": { "200": { "description": "WIP Predicted Deal Revenues with Margin of Error for whole league", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalculateMarginOfErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/property-deal-revenues/actual/season/{seasonId}/property/{propertyId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch property deals with actual revenues grouped by parent brand", "operationId": "eb23e3c13fff633587f3d27f326ad6f4", "parameters": [ { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "296" }, { "name": "propertyId", "in": "path", "description": "Property(Team) ID", "required": true, "schema": { "type": "string" }, "example": "2" } ], "responses": { "200": { "description": "League Asset Buckets, Property revenue and array of property deals with revenues", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyDealRevenuesGetActualResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/property-deal-revenues/predicted/season/{seasonId}/property/{propertyId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch property deals with predicted revenues grouped by parent brand", "operationId": "43710b2f5aa2248986bbfe24208909ea", "parameters": [ { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "296" }, { "name": "propertyId", "in": "path", "description": "Property(Team) ID", "required": true, "schema": { "type": "string" }, "example": "2" } ], "responses": { "200": { "description": "Predicted Deal Revenues response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyDealRevenuesGetPredictedResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/property-deal-revenues/predicted/league/{leagueId}/season/{seasonId}/download": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch league deals with predicted revenues grouped by parent brand", "operationId": "f65158e84467d3ba4b9026bc41937d9f", "parameters": [ { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "296" } ], "responses": { "200": { "description": "Predicted Deal Revenues response", "content": { "application/json": { "schema": { "type": "string" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/accept-wip-predicted-deal-revenues": { "post": { "tags": [ "Spend tracker" ], "operationId": "a74b2a2bbdc1bfb4371ca649861ba15a", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptWIPPredictedDealRevenuesRequest" } } } }, "responses": { "204": { "description": "Success response" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/property-deal-revenues/season/{seasonId}/property/{propertyId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch property deals with revenues grouped by parent brand", "operationId": "fe1e46e83488920c9c29b1da40dced1b", "parameters": [ { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" } }, { "name": "propertyId", "in": "path", "description": "Property(Team) ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Property revenue and array of property deals with revenues for Subcategory Deals page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyDealRevenuesGetResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/publish/season": { "put": { "tags": [ "Spend tracker" ], "description": "Publish SpendTracker data by League and Season", "operationId": "34fee405549f93f4d09d510829b40034", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishedSeasonUpdateRequest" } } } }, "responses": { "200": { "description": "SpendTracker data published successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishedSeasonResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/deals": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch deal, property and predicted revenues for property in season", "operationId": "e9840745f3112724811eb572c9f278a1", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetPropertyDealRevenuesRequest" } } } }, "responses": { "200": { "description": "Deals,property and predicted revenues for property in season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetPropertyDealRevenuesResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/deals/deal": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch brand revenues, types and levels for property across seasons", "operationId": "8a0e74abadaaa3a18f50c2fe43ffc97a", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetDealDataBySeasonsRequest" } } } }, "responses": { "200": { "description": "Brand revenues with deal levels and types grouped by season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetDealDataBySeasonsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Spend tracker" ], "description": "Update deal brand revenues across seasons", "operationId": "ef78556dff185a7e6a0bd4831b8240bc", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealUpdateDealRevenuesRequest" } } } }, "responses": { "200": { "description": "Brand revenues with deal levels and types grouped by season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetDealDataBySeasonsCollection" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/deals/deal/season": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch actual/estimated revenue and predicted revenue for deal in season", "operationId": "b80dfe9aeb9dac36e732c0a23b14215d", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetDealRevenueInSeasonRequest" } } } }, "responses": { "200": { "description": "Deal actual/estimated revenue and predicted revenue in season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueDealGetDealRevenueInSeasonResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/deal-revenues/duplicate": { "post": { "tags": [ "Spend tracker" ], "description": "Duplicate actual/estimated Deal Revenues from one season to another", "operationId": "af3b544d938853f5f0bf665495c4f360", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealRevenuesDuplicateRequest" } } } }, "responses": { "200": { "description": "Success message", "content": { "application/json": { "schema": { "properties": { "name": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/subcategory/factors": { "post": { "tags": [ "Spend tracker" ], "description": "Update subcategory revenue factors for league in season", "operationId": "19cbe81114ddb1f8f93f145818294cc9", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubcategoryRevenueFactorsUpdateRequest" } } } }, "responses": { "201": { "description": "Saved Subcategory Revenue Factors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubcategoryRevenueFactorsUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/subcategory/{subcategoryId}/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch subcategory revenues in season", "operationId": "87bcb93801ca3d4aa5d78f9615ac9904", "parameters": [ { "name": "subcategoryId", "in": "path", "description": "Subcategory ID", "required": true, "schema": { "type": "string" }, "example": "41" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "298" } ], "responses": { "200": { "description": "Total and average subcategory revenues in season", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubcategoryRevenuesShowResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/subcategory-revenues": { "post": { "tags": [ "Spend tracker" ], "operationId": "d107e572679297d0c9295b2f30d87792", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatedSubcategoryRevenuesRequest" } } } }, "responses": { "201": { "description": "Saved Total and average subcategory revenues", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSubcategoryRevenuesResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/spend-tracker/revenue/subcategories-deals/league/{leagueId}/season/{seasonId}": { "get": { "tags": [ "Spend tracker" ], "description": "Fetch league subcategories revenues report in season", "operationId": "18a937056b508c523abd38a822777184", "parameters": [ { "name": "leagueId", "in": "path", "description": "League ID", "required": true, "schema": { "type": "string" }, "example": "1" }, { "name": "seasonId", "in": "path", "description": "Season ID", "required": true, "schema": { "type": "string" }, "example": "286" } ], "responses": { "200": { "description": "Subcategories revenues league report", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubcategoryRevenuesDealsBySubcategoryResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/stats/mappings": { "get": { "tags": [ "Stats" ], "summary": "Get available SU/STATS mapping entries", "description": "Returns a list of stats perform mappings that can be filtered by property ID, sport, league ID, league abbreviation and/or team name", "operationId": "getStatsMappings", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsMappingsGetRequest" } } } }, "responses": { "200": { "description": "List of stats perform mappings", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StatsMappingDto" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated." } }, "type": "object" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "type": "object", "example": { "sport": [ "The sport field must be a string." ] } } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/stats/mappings/sports": { "get": { "tags": [ "Stats" ], "summary": "Get available sports from Stats Perform", "description": "Returns a list of sports available from the Stats Perform API, optionally filtered by API type", "operationId": "getStatsSports", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsMappingsSportsRequest" } } } }, "responses": { "200": { "description": "List of stats perform mappings with the sports fields filled", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StatsMappingDto" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated." } }, "type": "object" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "type": "object", "example": { "api": [ "The api field must be a string." ] } } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/stats/mappings/leagues": { "get": { "tags": [ "Stats" ], "summary": "Get available leagues from Stats Perform", "description": "Returns a list of leagues available from the Stats Perform API, optionally filtered by sport and API type", "operationId": "getStatsLeagues", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsMappingsLeaguesRequest" } } } }, "responses": { "200": { "description": "List of stats perform mappings with the sport and league fields filled", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StatsMappingDto" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated." } }, "type": "object" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "type": "object", "example": { "sport": [ "The sport field must be a string." ] } } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/stats/mappings/{id}": { "put": { "tags": [ "Stats" ], "summary": "Update a stats perform mapping", "description": "Updates a stats perform mapping by associating it with a SponsorUnited team/property", "operationId": "updateStatsMapping", "parameters": [ { "name": "id", "in": "path", "description": "The mapping ID to update", "required": true, "schema": { "type": "integer", "example": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsMappingUpdateRequest" } } } }, "responses": { "200": { "description": "Updated stats perform mapping", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsMappingDto" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated." } }, "type": "object" } } } }, "404": { "description": "Mapping not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "No query results for model [App\\Models\\StatsPerformMapping]." } }, "type": "object" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "type": "object", "example": { "su_team_id": [ "The su team id field is required." ] } } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/stats/unmap/{id}": { "put": { "tags": [ "Stats" ], "summary": "Unmap a stats perform mapping", "description": "Sets the su_team_id to null for the specified Stats Perform mapping, effectively unmapping it from a SponsorUnited team/property.", "operationId": "unmapStatsMapping", "parameters": [ { "name": "id", "in": "path", "description": "The mapping ID to unmap", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Unmapped mapping", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsMappingDto" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated." } }, "type": "object" } } } }, "404": { "description": "Mapping not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "No query results for model [App\\Models\\StatsPerformMapping]." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/stats/mappings-job-status/{propertyId}": { "get": { "tags": [ "Stats" ], "summary": "Get job status for a property", "description": "Returns the status of Stats Perform import jobs for a specific property (su_team_id). This includes counts of queued, executing, finished, and failed jobs.", "operationId": "getStatsPerformJobStatus", "parameters": [ { "name": "propertyId", "in": "path", "description": "The SponsorUnited property/team ID", "required": true, "schema": { "type": "integer", "example": 123 } } ], "responses": { "200": { "description": "Job status summary for the property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatsPerformJobStatusDto" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/language/{domain}": { "get": { "tags": [ "language" ], "description": "Fetch language fields", "operationId": "24e2d761909b96c578396a9f6ae302ee", "responses": { "200": { "description": "Language fields", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuLanguageCollection" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "language" ], "operationId": "b7539dd42890b9eff8362db9c7317bc9", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuLanguageRequest" } } } }, "responses": { "201": { "description": "Language fields updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuLanguageCollection" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/subcategory": { "get": { "tags": [ "Subcategory" ], "summary": "List all subcategories", "description": "Returns a list of all subcategories, optionally filtered by name", "operationId": "d0ef34a3d183131dac2ccc3fee2f3764", "parameters": [ { "name": "name", "in": "query", "description": "Filter subcategories by name prefix", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of subcategories", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Electric Vehicles" }, "category_id": { "type": "integer", "example": 5 }, "synopsis": { "type": "string", "nullable": true }, "rank": { "type": "integer", "nullable": true } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Subcategory" ], "summary": "Create a new subcategory", "description": "Creates a new subcategory with the provided data", "operationId": "0b77d9c7d1c76b7bd5fb6f6d94bdd94e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubcategoryStoreRequest" } } } }, "responses": { "200": { "description": "Subcategory created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Electric Vehicles" }, "category_id": { "type": "integer", "example": 5 }, "synopsis": { "type": "string", "nullable": true }, "always_in_social_review": { "type": "boolean" }, "leagues_in_social_review": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "always_in_social_reject": { "type": "boolean" }, "leagues_in_social_reject": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "422": { "description": "Validation error" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/subcategory/{id}": { "get": { "tags": [ "Subcategory" ], "summary": "Get a subcategory by ID", "description": "Returns a single subcategory by its ID with associated leagues in social review and social reject", "operationId": "06653546c6a25efefe7d2bdcfc813606", "parameters": [ { "name": "id", "in": "path", "description": "ID of the subcategory", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Subcategory details", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Electric Vehicles" }, "category_id": { "type": "integer", "example": 5 }, "synopsis": { "type": "string", "nullable": true }, "always_in_social_review": { "type": "boolean" }, "leagues_in_social_review": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "always_in_social_reject": { "type": "boolean" }, "leagues_in_social_reject": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Subcategory" ], "summary": "Update a subcategory", "description": "Updates an existing subcategory with the provided data", "operationId": "79b491fe0b903767f66257da636daa10", "parameters": [ { "name": "id", "in": "path", "description": "ID of the subcategory to update", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubcategoryUpdateRequest" } } } }, "responses": { "200": { "description": "Subcategory updated successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "category_id": { "type": "integer" }, "synopsis": { "type": "string", "nullable": true }, "always_in_social_review": { "type": "boolean" }, "leagues_in_social_review": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "always_in_social_reject": { "type": "boolean" }, "leagues_in_social_reject": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Subcategory not found" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Subcategory" ], "summary": "Delete a subcategory", "description": "Deletes a subcategory and its associated droplets and revenues", "operationId": "86e8237bae1ff5d55df21e12e496619c", "parameters": [ { "name": "id", "in": "path", "description": "ID of the subcategory to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Subcategory deleted successfully" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" }, "404": { "description": "Subcategory not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/subcategory/top-rank": { "get": { "tags": [ "Subcategory" ], "summary": "Get top ranked subcategory", "description": "Returns the subcategory with rank 1", "operationId": "76ad458de6f592a6b8eb0ce14b2ced78", "responses": { "200": { "description": "Top ranked subcategory", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "category_id": { "type": "integer" }, "rank": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/subcategory/{id}/intent": { "get": { "tags": [ "Subcategory" ], "summary": "Get subcategory intent data", "description": "Returns intent measurement data for a subcategory including brands count and audits count", "operationId": "120e6b1e4f171feb9e8d1b804b702f81", "parameters": [ { "name": "id", "in": "path", "description": "ID of the subcategory", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Subcategory intent data", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "brands_count": { "type": "integer" }, "audits_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/subcategory/{oldId}/reassign/{newId}": { "put": { "tags": [ "Subcategory" ], "summary": "Reassign brands to another subcategory", "description": "Reassigns all brands from one subcategory to another and returns intent data for the old subcategory", "operationId": "93b4b32dc9daebdd4d0a480c6aa0d522", "parameters": [ { "name": "oldId", "in": "path", "description": "ID of the source subcategory", "required": true, "schema": { "type": "integer" } }, { "name": "newId", "in": "path", "description": "ID of the target subcategory", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Reassignment successful, returns intent data for old subcategory", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "brands_count": { "type": "integer" }, "audits_count": { "type": "integer" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Subcategory not found" }, "500": { "description": "Server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/subscription/swap-plan": { "post": { "tags": [ "Subscription" ], "summary": "Swap the subscription plan of a billable entity.", "description": "Swaps the Stripe subscription of the billable named by `billable_id` onto another plan without prorating, and records the new contracted monthly spend against that billable's organization. The target is the billable in the request, not the one belonging to the acting user.", "operationId": "swapSubscriptionPlan", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwapPlanRequest" } } } }, "responses": { "200": { "description": "The swap was attempted. A successful swap returns the new plan; a billable that cannot be swapped (no Stripe customer, no Stripe subscription, or rejected by Stripe) returns an `error`.", "content": { "application/json": { "schema": { "properties": { "subscription_plan_id": { "description": "The plan now active on the subscription. Absent when `error` is present.", "type": "string", "example": "price_1PmxYxC7D8t3rP7mSia7osJP" }, "error": { "description": "Why the swap could not be completed. Absent on success.", "type": "string", "example": "This account does not have a Stripe subscription" } }, "type": "object" } } } }, "403": { "description": "The user lacks the permission required to swap subscription plans.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "You are not authorized to swap subscription plans." } }, "type": "object" } } } }, "422": { "description": "Validation failed \u2014 a missing or non-integer `billable_id`, one that matches no billable or a soft-deleted one, a missing plan, or a non-numeric monthly spend.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "The billable entity to swap the plan for could not be found." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/me/surface/context": { "get": { "tags": [ "Surface" ], "summary": "Get authenticated user's Surface context", "description": "Returns the authenticated user's organization, job role, role orientation, person profile, roles, and representatives for Surface prompt resolution.", "operationId": "698f1e9a17edaf0f846902ced2ef565d", "responses": { "200": { "description": "Surface context", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "organization_id": { "type": "integer", "example": 123, "nullable": true }, "job_role": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Marketing" } }, "type": "object", "nullable": true }, "role_orientation": { "properties": { "id": { "type": "integer", "example": 2 }, "name": { "type": "string", "example": "buy_side" } }, "type": "object", "nullable": true }, "is_external": { "type": "boolean", "example": false }, "person_profile": { "properties": { "info": { "type": "string", "example": "Experienced marketer", "nullable": true }, "job_title": { "type": "string", "example": "VP of Marketing", "nullable": true }, "location": { "type": "string", "example": "New York, NY", "nullable": true }, "person_profile_job_role": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Marketing" } }, "type": "object", "nullable": true } }, "type": "object", "nullable": true }, "organization": { "properties": { "id": { "type": "integer", "example": 123 }, "name": { "type": "string", "example": "Acme Corp" }, "organization_type": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Brand" } }, "type": "object", "nullable": true } }, "type": "object", "nullable": true }, "roles": { "type": "array", "items": { "properties": { "display_name": { "type": "string", "example": "Scout" } }, "type": "object" } }, "representative": { "properties": { "id": { "type": "integer", "example": 10 }, "type": { "type": "string", "example": "brand" }, "name": { "type": "string", "example": "Nike", "nullable": true }, "category_id": { "type": "integer", "example": 5, "nullable": true }, "category_name": { "type": "string", "example": "Apparel", "nullable": true }, "subcategory_id": { "type": "integer", "example": 12, "nullable": true }, "league_id": { "type": "integer", "nullable": true }, "league_name": { "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "representatives": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 10 }, "type": { "type": "string", "example": "brand" }, "name": { "type": "string", "example": "Nike", "nullable": true }, "is_main": { "type": "boolean", "example": true }, "category_id": { "type": "integer", "example": 5, "nullable": true }, "category_name": { "type": "string", "example": "Apparel", "nullable": true }, "subcategory_id": { "type": "integer", "example": 12, "nullable": true }, "league_id": { "type": "integer", "nullable": true }, "league_name": { "type": "string", "nullable": true } }, "type": "object" } }, "organization_surface_context": { "type": "string", "example": "We prioritize NBA and MLS partnerships.", "nullable": true }, "user_surface_context": { "type": "string", "example": "I focus on NBA sponsorship deals.", "nullable": true }, "admin_organization_surface_context": { "type": "string", "example": "Enterprise account, renewal Q3.", "nullable": true }, "admin_user_surface_context": { "type": "string", "example": "Long-time client contact. Prefers NBA/MLS comps.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/me/surface/usage/record": { "post": { "tags": [ "Surface" ], "summary": "Record a Surface prompt usage and check limit", "description": "Called by chat-api before processing each prompt. Records the prompt submission and returns whether the user is allowed to continue based on their organization's Surface monthly limit.", "operationId": "cf3ed601eaa2b22f2fe4af9d6e357fa0", "responses": { "200": { "description": "Usage recorded and limit check result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SurfaceUsageRecordResource" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/me/surface/usage": { "get": { "tags": [ "Surface" ], "summary": "Get current Surface usage status", "description": "Returns the authenticated user's current Surface prompt usage status including limit, used count, remaining count, and threshold warning state.", "operationId": "397f563e396f624f71835c69257ad7cb", "responses": { "200": { "description": "Current usage status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SurfaceUsageResource" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/me/surface/user-context": { "get": { "tags": [ "Surface" ], "summary": "Get the authenticated user's Surface user context", "description": "Returns the authenticated user's own freeform Surface user context. Owner-only: the value is always scoped to the authenticated user server-side.", "operationId": "1e3827335eb4adf1cafa2fc05eff5b55", "responses": { "200": { "description": "User context", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "I focus on NBA sponsorship deals.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Surface" ], "summary": "Update the authenticated user's Surface user context", "description": "Upserts the authenticated user's own freeform Surface user context, preserving formatting verbatim. Owner-only: the value is always scoped to the authenticated user server-side.", "operationId": "56d8da641d7ffcdfcbe63d8524aae715", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SurfaceUserContextUpdateRequest" } } } }, "responses": { "200": { "description": "User context updated", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "I focus on NBA sponsorship deals.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/organization/{organizationId}/surface/context": { "get": { "tags": [ "Surface" ], "summary": "Get an organization's Surface context", "description": "Returns the organization's freeform Surface context. Readable by any member of the organization; access is enforced server-side.", "operationId": "be005d21bbb7248dd352429fc6cc4af7", "parameters": [ { "name": "organizationId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Organization context", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "We prioritize NBA and MLS partnerships.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Not a member of the organization" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Surface" ], "summary": "Update an organization's Surface context", "description": "Upserts the organization's freeform Surface context, preserving formatting verbatim. Restricted to an account-administrator of that organization; access is enforced server-side.", "operationId": "898ee6c813a7eb13e587f19fedd71296", "parameters": [ { "name": "organizationId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationSurfaceContextUpdateRequest" } } } }, "responses": { "200": { "description": "Organization context updated", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "context": { "type": "string", "example": "We prioritize NBA and MLS partnerships.", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Not an account-administrator of the organization" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tags": { "get": { "tags": [ "Tags" ], "operationId": "3b8fd17c63dfdad4c49a9ce73fb0e066", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagIndexRequest" } } } }, "responses": { "200": { "description": "List of tags", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagIndexResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tag": { "put": { "tags": [ "Tags" ], "operationId": "c6e4cbd4c75b281bc0d18103137d8bc5", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagUpdateRequest" } } } }, "responses": { "200": { "description": "The rename was successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TagResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks/metadata": { "get": { "tags": [ "Tasks" ], "summary": "Get task metadata", "description": "Returns metadata for filtering tasks such as properties, leagues, and managers", "operationId": "444ba23093ea6f3cf8d23d92af8e6b31", "parameters": [ { "name": "entity_type", "in": "query", "description": "The type of the entity for which to display tasks.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The metadata for the tasks found for the given entity type.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskIndexMetadataResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks": { "get": { "tags": [ "Tasks" ], "summary": "List tasks", "description": "Returns a paginated list of tasks filtered by entity type and other criteria", "operationId": "471d938a3bfaeb6fbd981d7c3e2728b0", "parameters": [ { "name": "entity_type", "in": "query", "description": "The type of the entity for which to display tasks.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The tasks found for the given entity type.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/TaskIndexResource" }, { "$ref": "#/components/schemas/ContactTaskIndexResource" } ] } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks/export/invalid-emails": { "get": { "tags": [ "Tasks" ], "summary": "Export invalid email tasks", "description": "Downloads a CSV file of all invalid email tasks for contacts", "operationId": "fe4d5adeeb1b1e7cc12d5aeb05052c83", "parameters": [ { "name": "entity_type", "in": "query", "description": "The type of the entity for which to export tasks.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A csv file with invalid email tasks for contacts." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks/export/invalid-social-tasks": { "get": { "tags": [ "Tasks" ], "summary": "Export invalid social tasks", "description": "Downloads a CSV file of all invalid social tasks created for handles", "operationId": "5a000e24be009bfb116cc4ef5689c983", "parameters": [ { "name": "entity_type", "in": "query", "description": "The type of the entity for which to export tasks.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A csv file with invalid tasks for handles." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks/{id}": { "get": { "tags": [ "Tasks" ], "summary": "Get task by ID", "description": "Returns a specific task with its details", "operationId": "90b3cd4d2d4b416dc989d2055dbed06c", "parameters": [ { "name": "id", "in": "path", "description": "The id of the task to fetch.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The task with the given id.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Tasks" ], "summary": "Update task", "description": "Updates an existing task's details", "operationId": "1aaf37e74360ef4c10fadaee02ae77fb", "parameters": [ { "name": "id", "in": "path", "description": "The id of the task to update.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskUpdateRequest" } } } }, "responses": { "200": { "description": "The updated task.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Tasks" ], "summary": "Delete task", "description": "Removes a task from the system", "operationId": "ad582480cd57c2a4e3b6a426943eeca5", "parameters": [ { "name": "id", "in": "path", "description": "The id of the task to delete", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty response when task has been deleted successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks/": { "post": { "tags": [ "Tasks" ], "summary": "Create task", "description": "Creates a new task for a property or contact entity", "operationId": "b263247033817cfd225af5d2a51a93fb", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskStoreRequest" } } } }, "responses": { "200": { "description": "The newly created task.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskShowStoreUpdateResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/tasks/{taskId}/assign": { "put": { "tags": [ "Tasks" ], "summary": "Assign task to user", "description": "Assigns a task to the authenticated user", "operationId": "8e3bea883b14aa0aae0f3f808b0beac1", "parameters": [ { "name": "taskId", "in": "path", "description": "The id of the task to assign.", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Task assigned successfully.", "content": { "application/json": { "schema": {}, "example": "[]" } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team": { "get": { "tags": [ "Property" ], "summary": "List properties", "description": "Returns a paginated list of non-deleted properties. Supports filtering by name, league, genre, subgenre, division and market, plus ordering. When download=true, streams the list as a CSV file instead of JSON", "operationId": "8552dd0225e6b98cfd20200cff987939", "parameters": [ { "name": "name", "in": "query", "description": "Filter by property name (partial match).", "schema": { "type": "string" } }, { "name": "order_by", "in": "query", "description": "Column to order by.", "schema": { "type": "string", "enum": [ "name", "parent", "league", "genre", "subgenre", "division", "market", "created_at" ] } }, { "name": "order", "in": "query", "description": "Order direction.", "schema": { "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "market_id", "in": "query", "description": "JSON-encoded array of market ids to filter by (primary markets).", "schema": { "type": "string", "example": "[1,2,3]" } }, { "name": "league_id", "in": "query", "description": "JSON-encoded array of league ids to filter by.", "schema": { "type": "string", "example": "[1,2,3]" } }, { "name": "division_id", "in": "query", "description": "JSON-encoded array of division ids to filter by.", "schema": { "type": "string", "example": "[1,2,3]" } }, { "name": "genre_id", "in": "query", "description": "JSON-encoded array of genre ids to filter by.", "schema": { "type": "string", "example": "[1,2,3]" } }, { "name": "subgenre_id", "in": "query", "description": "JSON-encoded array of subgenre ids to filter by.", "schema": { "type": "string", "example": "[1,2,3]" } }, { "name": "page", "in": "query", "description": "Page number.", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "description": "Results per page (default 25).", "schema": { "type": "integer", "default": 25 } }, { "name": "download", "in": "query", "description": "When true, streams the full list as a CSV file instead of returning JSON.", "schema": { "type": "boolean" } }, { "name": "with_has_spend_tracker_data", "in": "query", "description": "Include a has_spend_tracker_data flag on each property.", "schema": { "type": "boolean" } }, { "name": "season_id", "in": "query", "description": "Season id used when evaluating spend-tracker data.", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Paginated list of properties as JSON, or a CSV file stream when download=true.", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Property" } }, "current_page": { "type": "integer" }, "per_page": { "type": "integer" }, "total": { "type": "integer" }, "last_page": { "type": "integer" }, "promotion_relegation_enabled": { "type": "boolean" } }, "type": "object" } }, "text/csv": { "schema": { "type": "string", "format": "binary" } } } } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "Property" ], "summary": "Create a property", "description": "Creates a new property (team/venue), uploads logo/cover images, creates property-seasons, syncs markets, organizations, agencies, locations, hashtags and rejected brands, sets social handles, and dispatches a LinkedIn scrape job. Requires create administration property permission", "operationId": "6b4e1174a273f5efad722dcf5f1b87a0", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "name", "sport_id", "league_id" ], "properties": { "name": { "description": "Unique property name.", "type": "string" }, "sport_id": { "type": "integer" }, "league_id": { "type": "integer" }, "type_id": { "description": "Property type. capacity is required when this is a venue.", "type": "integer" }, "parent_id": { "type": "integer", "nullable": true }, "division_id": { "type": "integer" }, "capacity": { "description": "Required when type_id is a venue.", "type": "integer", "nullable": true }, "alias": { "type": "string", "nullable": true }, "logo": { "description": "S3 key of the logo image.", "type": "string", "nullable": true }, "cover": { "description": "S3 key of the cover image.", "type": "string", "nullable": true }, "synopsis": { "type": "string" }, "email": { "type": "string", "format": "email", "nullable": true }, "inactive": { "type": "boolean" }, "exclude_from_social_scan": { "type": "boolean" }, "website_url": { "type": "string", "nullable": true }, "markets": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "pivot": { "properties": { "class": { "type": "string" } }, "type": "object" } }, "type": "object" }, "nullable": true }, "organizations": { "type": "array", "items": { "type": "integer" } }, "agencies": { "type": "array", "items": { "type": "object" } }, "hashtags": { "type": "array", "items": { "type": "object" } }, "rejected_brands": { "type": "array", "items": { "type": "object" } }, "locations": { "type": "array", "items": { "properties": { "location_id": { "type": "integer" }, "label_id": { "type": "integer" } }, "type": "object" } }, "twitter_handle": { "type": "string", "nullable": true }, "facebook_handle": { "type": "string", "nullable": true }, "instagram_handle": { "type": "string", "nullable": true }, "tiktok_handle": { "type": "string", "nullable": true }, "youtube_handle": { "type": "string", "nullable": true }, "twitch_handle": { "type": "string", "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "The created property.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Property" } } } }, "400": { "description": "Failed to store the property.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/download": { "get": { "tags": [ "Property" ], "summary": "Download properties list", "description": "Exports all properties as a CSV file including name, genre, sub-genre, association, division, primary market, inactive status, location status, creation date, and latest audit date", "operationId": "download", "responses": { "200": { "description": "Successful operation", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Bad Request" }, "500": { "description": "Internal Server Error" } } } }, "/api/team/{id}": { "get": { "tags": [ "Property" ], "summary": "Get property details", "description": "Retrieves detailed information about a specific property including league, markets, organizations, social handles, agencies, and attendance data. Use the slim parameter for reduced data", "operationId": "71327544c30baa9706be0707cfeb2459", "parameters": [ { "name": "id", "in": "path", "description": "The id of the Property to fetch.", "required": true, "schema": { "type": "string" } }, { "name": "slim", "in": "query", "description": "Fetch slimmed down Property data.", "schema": { "type": "boolean" } }, { "name": "with_revenues_count", "in": "query", "description": "Include counts of revenue deals and predicted deal revenues.", "schema": { "type": "boolean" } }, { "name": "with_has_spend_tracker_data", "in": "query", "description": "Include a has_spend_tracker_data flag on the property.", "schema": { "type": "boolean" } }, { "name": "season_id", "in": "query", "description": "Season id used when evaluating promotion/relegation and spend-tracker data.", "schema": { "type": "integer" } }, { "name": "is_spend_tracker_admin", "in": "query", "description": "Flag indicating the requester is a spend-tracker admin.", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "A property with the given id.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/PropertyLightResource" }, { "$ref": "#/components/schemas/PropertyResource" } ] } } } } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "Property" ], "summary": "Update a property", "description": "Updates a property, validating that primary markets share the same category, syncing markets, organizations, agencies, locations, hashtags, children and primary/secondary profiles, and handling league changes (including spend-moved messaging). Requires update administration property permission", "operationId": "34f1b0b7bcf7e6fa7bb79ef52c432cef", "parameters": [ { "name": "id", "in": "path", "description": "The id of the property to update.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "name" ], "properties": { "name": { "description": "Unique property name (ignoring the current property).", "type": "string" }, "parent_id": { "type": "integer", "nullable": true }, "children": { "type": "array", "items": { "type": "integer" } }, "type_id": { "type": "integer" }, "sport_id": { "type": "integer" }, "genre_id": { "type": "integer" }, "subgenre_id": { "type": "integer" }, "league_id": { "type": "integer" }, "league_seasons_scope": { "description": "LeagueSeasonsScope enum value.", "type": "string" }, "division_id": { "type": "integer", "nullable": true }, "capacity": { "description": "Required when type_id is a venue.", "type": "integer", "nullable": true }, "alias": { "type": "string", "nullable": true }, "logo": { "description": "S3 key of the logo image.", "type": "string", "nullable": true }, "cover": { "description": "S3 key of the cover image.", "type": "string", "nullable": true }, "synopsis": { "type": "string" }, "email": { "type": "string", "format": "email", "nullable": true }, "inactive": { "type": "boolean" }, "markets": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "pivot": { "properties": { "class": { "type": "string" } }, "type": "object" } }, "type": "object" }, "nullable": true }, "organizations": { "type": "array", "items": { "type": "integer" } }, "agencies": { "type": "array", "items": { "type": "object" } }, "property_attendances": { "type": "array", "items": { "type": "object" } }, "locations": { "type": "array", "items": { "properties": { "location_id": { "type": "integer" }, "label_id": { "type": "integer" } }, "type": "object" } }, "primary_profile": { "description": "Mutually exclusive with secondary_profiles.", "properties": { "id": { "type": "integer" }, "type": { "type": "string" } }, "type": "object", "nullable": true }, "secondary_profiles": { "description": "Mutually exclusive with primary_profile.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "type": { "type": "string" } }, "type": "object" }, "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "The updated property. Includes a message field when spend data was moved.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PropertyResource" } } } }, "422": { "description": "Primary markets are not in the same category.", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Primary markets should be in the same category." } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Property" ], "summary": "Delete a property", "description": "Soft deletes a property and cleans up associated data including contacts, social handles, profile links, and revenues. Prevents deletion of properties with existing audits. Requires delete administration properties permission", "operationId": "f43d1ce16fdadfe79ca89a68976ff1ab", "parameters": [ { "name": "id", "in": "path", "description": "Property ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Empty on success." }, "200": { "description": "Cannot remove Property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team/{id}/social-scans": { "get": { "tags": [ "Property" ], "summary": "Get property social scans", "description": "Returns social scraping session data for the property's social handles across Twitter, Facebook, Instagram and TikTok. Use the slim parameter for reduced data", "operationId": "6c74458730512e181795e5a0857db108", "parameters": [ { "name": "id", "in": "path", "description": "The id of the property.", "required": true, "schema": { "type": "integer" } }, { "name": "slim", "in": "query", "description": "Return reduced social scan data.", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Social scraping session data for the property's handles.", "content": { "application/json": { "schema": { "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team/{id}/related-counts": { "get": { "tags": [ "Property" ], "summary": "Get property related counts", "description": "Returns the property id together with counts of its related records: contacts, curated news, hashtags, locations, home/away/user events and audits", "operationId": "7db00c8f95501f664a15c7ff14600bbd", "parameters": [ { "name": "id", "in": "path", "description": "The id of the property.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The property with its related record counts.", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "contacts_count": { "type": "integer" }, "curated_news_count": { "type": "integer" }, "hashtags_count": { "type": "integer" }, "locations_count": { "type": "integer" }, "hometeam_events_count": { "type": "integer" }, "awayteam_events_count": { "type": "integer" }, "user_events_count": { "type": "integer" }, "audits_count": { "type": "integer" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team/{id}/social-feed/{source}": { "get": { "tags": [ "Property" ], "summary": "Get property social feed", "description": "Fetches the filtered social feed for the given platform and handle within a published date range. Facebook requests are rate-limit checked. Returns an error object when the platform request fails", "operationId": "50e7f8791f701651a3ab4aa1ddde4a90", "parameters": [ { "name": "id", "in": "path", "description": "The id of the property.", "required": true, "schema": { "type": "integer" } }, { "name": "source", "in": "path", "description": "Social platform source (e.g. twitter, facebook, instagram, tiktok).", "required": true, "schema": { "type": "string" } }, { "name": "handle", "in": "query", "description": "Social handle to fetch the feed for.", "required": true, "schema": { "type": "string" } }, { "name": "published_after", "in": "query", "description": "Only include posts published on or after this date. Must be before or equal to published_before.", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "published_before", "in": "query", "description": "Only include posts published on or before this date. Must be after or equal to published_after.", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "The filtered social feed data, or an error object when the platform request fails.", "content": { "application/json": { "schema": { "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team/{team_id}/scrape-social-feed/{source}": { "get": { "tags": [ "Property" ], "summary": "Scrape property social feed", "description": "Triggers a social feed scrape for the property on the given platform and handle. Returns the scraper service result.", "operationId": "4c31ff339a9cb71b0d7a4a00d6e45b65", "parameters": [ { "name": "team_id", "in": "path", "description": "The id of the property.", "required": true, "schema": { "type": "integer" } }, { "name": "source", "in": "path", "description": "Social platform source (e.g. twitter, facebook, instagram, tiktok).", "required": true, "schema": { "type": "string" } }, { "name": "handle", "in": "query", "description": "Social handle to scrape.", "required": true, "schema": { "type": "string" } }, { "name": "socialScrapingSessionId", "in": "query", "description": "Existing social scraping session id to attach the scrape to.", "schema": { "type": "number" } }, { "name": "published_after", "in": "query", "description": "Only include posts published on or after this date.", "schema": { "type": "string" } }, { "name": "published_before", "in": "query", "description": "Only include posts published on or before this date.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The scraper service result.", "content": { "application/json": { "schema": { "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team-exists": { "get": { "tags": [ "Property" ], "summary": "Check whether a property name exists", "description": "Returns the number of non-deleted properties whose name matches the given name (case-insensitive). A value greater than 0 means the name already exists", "operationId": "e509c08783ce47ff06f3e4dff279eaa8", "parameters": [ { "name": "name", "in": "query", "description": "Property name to check.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Count of properties with the given name.", "content": { "application/json": { "schema": { "type": "integer" }, "example": 0 } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team/types": { "get": { "tags": [ "Property" ], "summary": "List property types", "description": "Returns all available property (team) types", "operationId": "05b12663fc8cb255160d1b18b180a367", "responses": { "200": { "description": "List of property types.", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/team/{old_id}/reassign/{new_id}": { "put": { "tags": [ "Property" ], "summary": "Reassign a property's related records", "description": "Moves audits, contacts, curated news, locations, hashtags, events and agency links from the old property to the new property within a single transaction", "operationId": "fb14bb76b43f3368f34d1a6e6c9f537d", "parameters": [ { "name": "old_id", "in": "path", "description": "The id of the source property to reassign from.", "required": true, "schema": { "type": "integer" } }, { "name": "new_id", "in": "path", "description": "The id of the destination property to reassign to.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Reassignment completed.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "reassign completed" } }, "type": "object" } } } }, "404": { "description": "One of the properties was not found." }, "500": { "description": "Reassignment failed and the transaction was rolled back." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/webhooks/transcription": { "post": { "tags": [ "Transcription" ], "summary": "Handle the data-ingestion transcription completion webhook", "operationId": "71a8e5d7c2178ab12352a85ca897fa72", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionWebhookRequest" } } } }, "responses": { "200": { "description": "Webhook received", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Webhook received" } }, "type": "object" } } } }, "422": { "description": "Validation error" } }, "security": [ { "apiKey": [] } ] } }, "/api/follows": { "post": { "tags": [ "Follows" ], "summary": "Follow one or more entities", "description": "Upserts follow relationships for the authenticated user. Duplicate or already-followed entries are silently ignored. Validates that every ULID exists in its entity table; returns 422 with a list of unknown ULIDs otherwise.", "operationId": "b51b60ea8fc7dec0803ae92a4530c977", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "follows" ], "properties": { "follows": { "type": "array", "items": { "required": [ "entity_type", "entity_ulid" ], "properties": { "entity_type": { "type": "string", "enum": [ "brand", "property", "agency" ], "example": "brand" }, "entity_ulid": { "description": "26-character ULID of the entity", "type": "string", "maxLength": 26, "minLength": 26, "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV" } }, "type": "object" }, "maxItems": 100, "minItems": 1 } }, "type": "object" } } } }, "responses": { "200": { "description": "Follows created (or silently de-duplicated)." }, "401": { "description": "Unauthenticated." }, "422": { "description": "Validation error \u2014 unknown entity_type, malformed ULID, or ULID not found in the entity table." } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "Follows" ], "summary": "Unfollow one or more entities", "description": "Removes follow relationships for the authenticated user. Entries that were never followed are silently ignored (idempotent).", "operationId": "69ef442f3509964dd78fead1e3ec3a2e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "follows" ], "properties": { "follows": { "type": "array", "items": { "required": [ "entity_type", "entity_ulid" ], "properties": { "entity_type": { "type": "string", "enum": [ "brand", "property", "agency" ], "example": "brand" }, "entity_ulid": { "type": "string", "maxLength": 26, "minLength": 26, "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV" } }, "type": "object" }, "maxItems": 100, "minItems": 1 } }, "type": "object" } } } }, "responses": { "204": { "description": "Unfollowed successfully (no content)." }, "401": { "description": "Unauthenticated." }, "422": { "description": "Validation error \u2014 unknown entity_type or malformed ULID." } }, "security": [ { "bearerAuth": [] } ] } }, "/api/integration/salesforce/access-token": { "post": { "tags": [ "User" ], "operationId": "f9e23006d272a3c9bd73317396ea0cf0", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SalesforceAccessTokenRequest" } } } }, "responses": { "200": { "description": "Get salesforce access token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SalesforceAccessTokenResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/me": { "get": { "tags": [ "User Management" ], "summary": "Get current user", "description": "Retrieves the authenticated user's profile, permissions, access, entities, and settings.", "operationId": "31b0d32acb524c1d5a56453eb860d66d", "responses": { "200": { "description": "Current user profile with permissions, access, entities, and settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMeResponse" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/me/access/{entityType}": { "get": { "tags": [ "User Management" ], "summary": "Get user access permissions", "description": "Retrieves the authenticated user's access permissions for a specific entity type.", "operationId": "ce3191316a8b980d74a4df910febbb5d", "parameters": [ { "name": "entityType", "in": "path", "description": "Entity type to get access for (teams, brands, agencies, markets, property-types)", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "User access permissions for the entity type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserAccessResource" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/entities": { "get": { "tags": [ "User Management" ], "summary": "Get user entities", "description": "Retrieves the entities (teams, brands, agencies) available to the authenticated user.", "operationId": "13cd6aa88ab21979affb330d56c503b6", "responses": { "200": { "description": "User entities data", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}": { "get": { "tags": [ "User Management" ], "summary": "Get user by ID", "description": "Retrieves a specific user by their ID with profile and relationships.", "operationId": "a06a40effd210ef49367ada55a928970", "parameters": [ { "name": "user_id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to view this user" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/users": { "post": { "tags": [ "User Management" ], "summary": "List all users", "description": "Retrieves a paginated list of users with optional filtering.", "operationId": "9428a8001e09068bab0dc2a6fcd34054", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserAllRequest" } } } }, "responses": { "200": { "description": "Paginated list of users", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/UserResource" } }, "current_page": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "total": { "type": "integer" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to view users" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/users/search": { "get": { "tags": [ "Users" ], "summary": "Search users by name", "description": "Search for a specific user by name. Usually used on typeaheads.", "operationId": "870e0c5e700bcc087b5ca3cfe0049939", "parameters": [ { "name": "UserSearchRequest", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/UserSearchRequest" } } ], "responses": { "200": { "description": "An array with simple items.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSearchResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user": { "post": { "tags": [ "User Management" ], "summary": "Create new user", "description": "Creates a new user with the provided information.", "operationId": "f180c4943527271251a17160f5602a89", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreateRequest" } } } }, "responses": { "200": { "description": "User created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to create users" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}": { "put": { "tags": [ "User" ], "summary": "Update a user", "description": "Updates a user's profile information, roles, and organization details. Syncs changes to Intercom and Meilisearch", "operationId": "ec1a3effa21ec04f5b2bd8865806a89a", "parameters": [ { "name": "id", "in": "path", "description": "Id of a user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdateRequest" } } } }, "responses": { "200": { "description": "The updated user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResource" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "User Management" ], "summary": "Delete user", "description": "Soft deletes a user and their associated data.", "operationId": "156d66de1b244d16b2daa335a30ffefb", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResource" } } } }, "400": { "description": "Cannot delete user" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to delete users" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/representative": { "get": { "tags": [ "User Management" ], "summary": "Get user representative", "description": "Retrieves the representative(s) for a user based on their organization.", "operationId": "e6764d61307532449b0aedb7c79a4232", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } }, { "name": "search_term", "in": "query", "description": "Filter representatives by name", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of representatives", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserRepresentativeResource" } } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] }, "put": { "tags": [ "User Management" ], "summary": "Update user representative", "description": "Updates the representative(s) for a user.", "operationId": "5973cac744f8def9246a667b80d5566f", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "representatives": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "is_main": { "type": "boolean" }, "representative_type": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Updated representatives", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserRepresentativeResource" } } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "User Management" ], "summary": "Delete user representative", "description": "Removes the user's custom representative, reverting to organization default.", "operationId": "3bc9d96939d74dc51210159ee97cc6f8", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Representative deleted, showing organization default", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRepresentativeResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/profile": { "put": { "tags": [ "User" ], "summary": "Update user profile", "description": "Updates a user's personal profile information including name, avatar, job details, and contact preferences", "operationId": "b24fa748295efa27b8b9c706ae54b0d8", "parameters": [ { "name": "id", "in": "path", "description": "Id of a user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProfileUpdateRequest" } } } }, "responses": { "200": { "description": "The updated user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProfileResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/profile/phone/check": { "post": { "tags": [ "User Management" ], "summary": "Check phone number validity", "description": "Validates a phone number format without sending verification.", "operationId": "c1762c95ea1a53b3b14206aadc746dd9", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateUserPhoneNumberRequest" } } } }, "responses": { "200": { "description": "Phone number validation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfilePhoneCheckResource" } } } }, "400": { "description": "Invalid phone number format" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/profile/email/validate": { "post": { "tags": [ "User Management" ], "summary": "Initiate email validation", "description": "Initiates email validation by sending a verification PIN to the new email address.", "operationId": "47409117d1235835a9cabe9cbb7d2c87", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateUserEmailRequest" } } } }, "responses": { "200": { "description": "Validation initiated, PIN sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileFieldMfaResource" } } } }, "400": { "description": "Validation error" }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/profile/{id}/phone/validate": { "post": { "tags": [ "User" ], "summary": "Validate and send phone verification PIN", "description": "Validates a phone number format using Twilio and sends a verification PIN via SMS for MFA setup", "operationId": "0e48f7966790f7ab8a78f032a889162b", "parameters": [ { "name": "id", "in": "path", "description": "Id of a user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateUserPhoneNumberRequest" } } } }, "responses": { "200": { "description": "The updated user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProfileResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/profile/{id}/phone/verify": { "post": { "tags": [ "User" ], "summary": "Verify phone number PIN", "description": "Verifies the PIN sent via SMS or email to complete phone number or email validation for user profile updates", "operationId": "ef9cc65df5368525b3def92de7d39c73", "parameters": [ { "name": "id", "in": "path", "description": "Id of a user", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyUserPhoneNumberRequest" } } } }, "responses": { "200": { "description": "The updated user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProfileResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/profile/mfa": { "put": { "tags": [ "User Management" ], "summary": "Update MFA preference", "description": "Updates the user's multi-factor authentication preference.", "operationId": "af2a4d9e2915e62eda3ba1e0ea5f6c86", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdateMfaPreferenceRequest" } } } }, "responses": { "200": { "description": "MFA preference updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileMfaUpdateResource" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/password": { "put": { "tags": [ "User Management" ], "summary": "Change user password", "description": "Changes the password for a user. Users can change their own password with current password verification, or admins can change any user's password.", "operationId": "6269f58e997d88ec71e1791e7d03ba33", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "password": { "description": "Current password (required for self-change)", "type": "string" }, "newPasswordGroup": { "properties": { "password": { "description": "New password", "type": "string" }, "password_confirmation": { "description": "New password confirmation", "type": "string" } }, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Password change result", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "refresh_token": { "type": "string", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/credentials": { "post": { "tags": [ "User Management" ], "summary": "Send user credentials", "description": "Generates a new password and sends credentials email to the user.", "operationId": "f036656c76cab76ec0c2580a240c6e93", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "template" ], "properties": { "template": { "description": "Email template slug to use", "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Credentials sent successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to send credentials" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{fromUserId}/dm-reassign": { "post": { "tags": [ "User Management" ], "summary": "Bulk-reassign Deal Manager profiles and contacts", "description": "Reassigns every Deal Manager profile and contact owned by the source user to the target user, within a single organization and database transaction. Used before deactivating a user.", "operationId": "10130677567c18866edd30ae2ef900c6", "parameters": [ { "name": "fromUserId", "in": "path", "description": "Id of the user whose Deal Manager profiles and contacts are reassigned.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DealManagerReassignRequest" } } } }, "responses": { "200": { "description": "Reassignment completed", "content": { "application/json": { "schema": { "properties": { "profiles_reassigned": { "type": "integer", "example": 12 }, "contacts_reassigned": { "type": "integer", "example": 34 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to reassign Deal Manager records" }, "404": { "description": "User not found" }, "422": { "description": "Validation error - cross-organization or self-target reassignment" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{userId}/dm-assignments/count": { "get": { "tags": [ "User Management" ], "summary": "Count a user's Deal Manager assignments", "description": "Returns the number of Deal Manager profiles and contacts owned by the user. Used as a cheap precheck before deactivation to decide whether the reassignment modal must be shown.", "operationId": "e51f7b0dfba6af8d14d397ede3c8194c", "parameters": [ { "name": "userId", "in": "path", "description": "Id of the user whose Deal Manager assignments are counted.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Assignment counts", "content": { "application/json": { "schema": { "properties": { "profiles": { "type": "integer", "example": 12 }, "contacts": { "type": "integer", "example": 34 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to view this user's Deal Manager assignments" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/restore": { "post": { "tags": [ "User Management" ], "summary": "Restore deleted user", "description": "Restores a soft-deleted user and their associated data.", "operationId": "392df502a617d3cb0bf5ca193553dc86", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User restored successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResource" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to restore users" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/by-email": { "get": { "tags": [ "User" ], "summary": "Get user by email", "description": "Retrieves a user by their email address. Includes soft-deleted users in the search", "operationId": "fbfdd986024cbb953166810bf850d816", "parameters": [ { "name": "email", "in": "query", "description": "Email of user to fetch.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "A user with the given email", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserLightResource" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/users/export": { "get": { "tags": [ "User Management" ], "summary": "Export users", "description": "Exports users to a CSV file with optional filtering.", "operationId": "aff36670925ec67b69499b1f73c0b112", "parameters": [ { "name": "active", "in": "query", "description": "Filter by active status (0 or 1)", "required": false, "schema": { "type": "integer", "enum": [ 0, 1 ] } }, { "name": "order_by", "in": "query", "description": "Field to order by", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "description": "Sort direction", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "CSV file download", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{id}/profile/phone/countries": { "get": { "tags": [ "User Management" ], "summary": "Get countries list", "description": "Retrieves a list of countries with phone codes for phone number validation.", "operationId": "72e97ad7438e8f4863022a18e1e02f05", "responses": { "200": { "description": "List of countries with phone codes", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "name": { "type": "string" }, "code": { "type": "string" }, "dial_code": { "type": "string" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user-social-cookies": { "post": { "tags": [ "Cookies" ], "summary": "Update user cookies", "description": "Update Facebook and LinkedIn cookies for the authenticated user", "operationId": "userCookies", "requestBody": { "content": { "application/json": { "schema": { "properties": { "user_facebook_cookie": { "type": "array", "items": { "properties": { "user_id": { "type": "integer" }, "user_cookie": { "type": "string" }, "session_cookie": { "type": "string" } }, "type": "object" } }, "user_linkedin_cookie": { "properties": { "user_id": { "type": "integer" }, "cookie": { "type": "string" }, "user_agent": { "type": "string" }, "is_sales_navigator": { "type": "boolean" } }, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Cookies updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Cookies updated successfully" } }, "type": "object" } } } }, "401": { "description": "Unauthorized - User not authenticated", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "User not authenticated" } }, "type": "object" } } } } } } }, "/api/users/{id}/invalidate": { "get": { "tags": [ "User Authentication" ], "summary": "Invalidate User Tokens", "operationId": "invalidateUserTokens", "parameters": [ { "name": "id", "in": "path", "description": "The user id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User token invalidated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "User token invalidated successfully" } }, "type": "object" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResource" } } } } } } }, "/api/user/{id}/integration/salesforce": { "get": { "tags": [ "User Management" ], "summary": "Get Salesforce integration status", "description": "Retrieves the Salesforce integration status and configuration for a user.", "operationId": "d619c947f2abd8328e8e10cd75e9e29a", "parameters": [ { "name": "id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Salesforce integration status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSalesforceIntegrationResource" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/users/intercom-sync": { "post": { "tags": [ "User Management" ], "summary": "Sync users to Intercom", "description": "Triggers bulk synchronization of users to Intercom. Returns the total number of users queued for sync.", "operationId": "01abe88ed275b660cadbe0464da5d806", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserIntercomSyncRequest" } } } }, "responses": { "202": { "description": "Sync job has been queued", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Users sync to Intercom has been queued" }, "total_users": { "type": "integer", "example": 123 } }, "type": "object" } } } }, "403": { "description": "Forbidden - User does not have permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/users/intercom-sync-status": { "get": { "tags": [ "User Management" ], "summary": "Get users Intercom sync status", "description": "Returns the Intercom sync status for specified users.", "operationId": "af628fcb5305272cb6fd1e3ce3ce0af0", "parameters": [ { "name": "user_ids", "in": "query", "description": "Array of user IDs to check status for", "required": false, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "Sync status for users", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/UserSyncStatusResource" } } }, "type": "object" } } } }, "403": { "description": "Forbidden - User does not have permission" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/users/for-report-sharing": { "post": { "tags": [ "User Management" ], "summary": "List users for report sharing", "description": "Returns a paginated list of users filtered by role orientation, job role, user role, organization, organization type, product, account manager, representative, league, subcategory, genre, subgenre, category, user name, job title, last activity dates, and report received/opened counts and dates. Used to select recipients when sharing custom reports.", "operationId": "forReportSharing", "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserForReportSharingRequest" } } } }, "responses": { "200": { "description": "Paginated list of users for report sharing", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/UserForReportSharingResource" } }, "current_page": { "type": "integer", "example": 1 }, "last_page": { "type": "integer", "example": 1 }, "per_page": { "type": "integer", "example": 50 }, "total": { "type": "integer", "example": 0 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to view users" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/events": { "get": { "tags": [ "User Management" ], "summary": "List user events", "description": "Retrieves a paginated list of user events with optional filtering.", "operationId": "c0a5bdc0b689d60bb5cdd0d12329a890", "parameters": [ { "name": "page", "in": "query", "description": "Page number for pagination", "required": true, "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "description": "Number of items per page", "required": false, "schema": { "type": "integer" } }, { "name": "status", "in": "query", "description": "Filter by event status codes (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "user", "in": "query", "description": "Filter by user IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "scouting_groups", "in": "query", "description": "Filter by scouting group IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "season", "in": "query", "description": "Filter by season IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "type", "in": "query", "description": "Filter by event type codes (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "property_id", "in": "query", "description": "Filter by property ID", "required": false, "schema": { "type": "integer" } }, { "name": "property_name", "in": "query", "description": "Filter by property name", "required": false, "schema": { "type": "string" } }, { "name": "order_by", "in": "query", "description": "Field to order results by", "required": false, "schema": { "type": "string" } }, { "name": "order", "in": "query", "description": "Sort order (asc or desc)", "required": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "Paginated list of user events", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "type": "object" } }, "current_page": { "type": "integer" }, "last_page": { "type": "integer" }, "per_page": { "type": "integer" }, "total": { "type": "integer" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/{user_id}/event/{event_id}/team/{team_id}": { "get": { "tags": [ "User Management" ], "summary": "Get single user event", "description": "Retrieves a specific user event by user, event, and team IDs.", "operationId": "7bbb03c61b3c5af244d4c639cbaeb45d", "parameters": [ { "name": "user_id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "description": "Event ID", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "User event details", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User event not found" } }, "security": [ { "bearerAuth": [] } ] }, "post": { "tags": [ "User Management" ], "summary": "Create or update user event", "description": "Creates a new user event or updates an existing one.", "operationId": "6307350b8b21cdf4dcac4a4a3955f4b8", "parameters": [ { "name": "user_id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "description": "Event ID", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserEventCreateOrUpdateRequest" } } } }, "responses": { "200": { "description": "User event created or updated", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "description": "Cannot reassign event with audits" }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "User Management" ], "summary": "Delete user event", "description": "Deletes a user event. Cannot delete events that have audits.", "operationId": "b73c3ac932c400bf4c1d7be4ee040237", "parameters": [ { "name": "user_id", "in": "path", "description": "User ID", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "path", "description": "Event ID", "required": true, "schema": { "type": "integer" } }, { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "User event deleted successfully" }, "400": { "description": "Cannot delete user events with audits" }, "401": { "description": "Unauthenticated" }, "404": { "description": "User event not found" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/events/download": { "get": { "tags": [ "User Management" ], "summary": "Export user events", "description": "Exports user events to a CSV file with optional filtering.", "operationId": "a97da5668fccb315a5e42734a466026b", "parameters": [ { "name": "page", "in": "query", "description": "Page number (required for validation)", "required": true, "schema": { "type": "integer" } }, { "name": "status", "in": "query", "description": "Filter by status codes (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "user", "in": "query", "description": "Filter by user IDs (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "leagues", "in": "query", "description": "Filter by league IDs (comma-separated)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "CSV file download", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/settings": { "post": { "tags": [ "User Management" ], "summary": "Create user setting", "description": "Creates a new user setting with the provided type and payload.", "operationId": "4a09ccf8120071be7948ae3b6dfcc859", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSettingCreateRequest" }, "example": { "type": "company_revenue", "payload": "100000000" } } } }, "responses": { "200": { "description": "Setting created successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "payload": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/settings/{id}": { "put": { "tags": [ "User Management" ], "summary": "Update user setting", "description": "Updates an existing user setting's payload.", "operationId": "fbb8a4cd8a6dfba5b2546051ab8a0dd1", "parameters": [ { "name": "id", "in": "path", "description": "Setting ID", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSettingUpdateRequest" } } } }, "responses": { "200": { "description": "Setting updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "payload": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to update this setting" }, "404": { "description": "Setting not found" } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "User Management" ], "summary": "Delete user setting", "description": "Deletes a user setting and associated cookies if applicable.", "operationId": "70c5f8429bdb0d889f8138bc1024d012", "parameters": [ { "name": "id", "in": "path", "description": "Setting ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "Setting deleted successfully" }, "401": { "description": "Unauthenticated" }, "403": { "description": "Forbidden - Not authorized to delete this setting" }, "404": { "description": "Setting not found" }, "500": { "description": "Failed to delete setting" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/downloadUrl": { "post": { "tags": [ "User" ], "operationId": "cd6c5128b0c1f4bd290f90b35c721e55", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDownloadFileRequest" }, "example": { "command": "TasksExportInvalidLinkedin" } } } }, "responses": { "200": { "description": "Get url for download file", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDownloadFileResource" } } } }, "422": { "description": "Validation error" }, "503": { "description": "Service unavailable" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user-actions": { "get": { "tags": [ "User Actions" ], "summary": "Get user actions", "description": "Get paginated user actions from MongoDB for the administration activity page.\n\nRetrieves user actions from year-based MongoDB collections (type-page-view-{year})\nand enriches them with user, team, and organization data from MySQL.", "operationId": "8217d4dee6518c14d691f5d6e285c1aa", "parameters": [ { "name": "startDate", "in": "query", "description": "Start date for filtering actions", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "description": "End date for filtering actions", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "paginate", "in": "query", "description": "Number of items per page", "required": false, "schema": { "type": "integer", "default": 20 } } ], "responses": { "200": { "description": "Successful response with paginated user actions" } } } }, "/api/track/organization/stats": { "get": { "tags": [ "User Actions" ], "summary": "Get all organization statistics", "description": "Returns aggregated usage statistics for all organizations", "operationId": "6c8929e308dd725c0a0e716ba633cb24", "parameters": [ { "name": "startDate", "in": "query", "description": "Start date for statistics period", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "description": "End date for statistics period", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Organization statistics" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/stats/export": { "get": { "tags": [ "User Actions" ], "summary": "Export all organization statistics", "description": "Downloads organization statistics as an Excel file", "operationId": "8be3f9c3dfdd119d6d6955f1da6e1aef", "parameters": [ { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Excel file download" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/{organization_id}/stats": { "get": { "tags": [ "User Actions" ], "summary": "Get organization statistics", "description": "Returns usage statistics for a specific organization", "operationId": "ffcc3b63bddd3d4f5f4e99c5665aa00a", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Organization statistics" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/{organization_id}/stats/export": { "get": { "tags": [ "User Actions" ], "summary": "Export organization statistics", "description": "Downloads organization statistics as an Excel file", "operationId": "8ee16e6ed81610e7aa962072b21defb4", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Excel file download" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/{organization_id}/stats/user": { "get": { "tags": [ "User Actions" ], "summary": "Get organization user statistics", "description": "Returns user-level statistics for a specific organization", "operationId": "884680279e13f7e35884fba30ff4f489", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "User statistics" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/{organization_id}/stats/weekly": { "get": { "tags": [ "User Actions" ], "summary": "Get organization weekly statistics", "description": "Returns weekly usage statistics for a specific organization", "operationId": "17109e09fb716082b087fa6f3edae2a7", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Weekly statistics" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/{organization_id}/stats/category": { "get": { "tags": [ "User Actions" ], "summary": "Get organization category statistics", "description": "Returns category-level usage statistics for a specific organization", "operationId": "11db03e97916a183a03c8853dab1e493", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Category statistics" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/track/organization/{organization_id}/stats/league": { "get": { "tags": [ "User Actions" ], "summary": "Get organization property type statistics", "description": "Returns property type (league) statistics for a specific organization", "operationId": "cbe197d686bedeb45fb6665aa0b8be94", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "startDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } }, { "name": "endDate", "in": "query", "required": true, "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "Property type statistics" }, "401": { "description": "Unauthenticated" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/custom-reports/{id}/rename": { "put": { "tags": [ "User Custom Reports" ], "summary": "Rename a user's custom report", "description": "Renames the user's copy of a custom report. Only the owner can rename their report. If the new name conflicts with an existing report, it will be automatically adjusted with a numeric suffix.", "operationId": "12d65039d785ecedbb39f94a0ee42507", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the user custom report to rename", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCustomReportRenameRequest" } } } }, "responses": { "200": { "description": "Report renamed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized." } }, "type": "object" } } } }, "404": { "description": "Report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not found" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/custom-reports/{id}": { "delete": { "tags": [ "User Custom Reports" ], "summary": "Delete a user's custom report", "description": "Soft deletes the user's copy of a custom report. Only the owner can delete their report. This does not affect the original admin report or other users' copies.", "operationId": "1bb45af3d01a08ee9ec58e516fdeb88c", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the user custom report to delete", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Report deleted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized." } }, "type": "object" } } } }, "404": { "description": "Report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/user/custom-reports/{id}/duplicate": { "post": { "tags": [ "User Custom Reports" ], "summary": "Duplicate a user's custom report", "description": "Creates an independent copy of the user's custom report. The new report will have a unique name with a numeric suffix if the original name conflicts. Only the owner can duplicate their report.", "operationId": "f95af124361b5ef8465fcf591e8cb612", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the user custom report to duplicate", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "201": { "description": "Report duplicated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized." } }, "type": "object" } } } }, "404": { "description": "Report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/custom-reports/{id}/mark-viewed": { "post": { "tags": [ "User Custom Reports" ], "summary": "Mark a user's custom report as viewed", "description": "Marks the user's copy of a custom report as viewed. Only the owner can mark their report as viewed.", "operationId": "804d28c4e99271e2cc4e802b74f4ec3a", "parameters": [ { "name": "id", "in": "path", "description": "The unique identifier of the user custom report to mark as viewed", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "Report marked as viewed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCustomReportResource" } } } }, "403": { "description": "Access denied - user is not the owner of this report", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized." } }, "type": "object" } } } }, "404": { "description": "Report not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not found" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/vortex/upload-image-from-url": { "post": { "tags": [ "Vortex" ], "summary": "Ingest a scouting photo from a URL as an asset", "description": "Pulls an image from the provided URL, stores it on S3 as an asset, and returns the created Image record. The returned id can be attached to a scouting audit via items.*.images.*.id on POST /api/vortex/audit/bulk. Always creates an asset (type is fixed server-side). Authenticated via X-API-Key.", "operationId": "3bc149d730c8a0f92d46b2a9aa9fc9a3", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadImageFromUrlRequest" } } } }, "responses": { "201": { "description": "Asset created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Image" } } } }, "422": { "description": "Validation error or invalid image" }, "401": { "description": "Unauthenticated" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/vortex/events": { "post": { "tags": [ "Vortex" ], "summary": "Create a scouting event from a Vortex session", "description": "Creates a new event and assigns it to the specified user. Authenticated via X-API-Key.", "operationId": "735059a13732ba80b5619ddbc579e9f4", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VortexCreateEventRequest" } } } }, "responses": { "201": { "description": "Event created successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "event_type": { "type": "string" }, "season": { "type": "integer" }, "hometeam_id": { "type": "integer" }, "awayteam_id": { "type": "integer" }, "scheduled": { "type": "string", "format": "date-time", "nullable": true } }, "type": "object" } } } }, "422": { "description": "Validation error" }, "401": { "description": "Unauthenticated" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/vortex/audit/bulk": { "post": { "tags": [ "Vortex" ], "summary": "Push bulk scouting data from a completed Vortex session", "description": "Creates audits and item values for multiple brands across a scouting event. Authenticated via X-API-Key. All entity IDs (brands, properties, events) must be pre-resolved. Sessions with unresolved IDs should be filtered out before calling this endpoint.", "operationId": "b345ce5989c7db7985d6226075ceca03", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VortexBulkAddRequest" } } } }, "responses": { "200": { "description": "Item values created successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "422": { "description": "Validation error" }, "401": { "description": "Unauthenticated" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/vortex/user-event-notes": { "post": { "tags": [ "Vortex" ], "summary": "Attach notes to a scouting event", "description": "Attaches one or more notes to a user's scouting session for an event+property, stored exactly like the single-note Scout flow. Creates the user event in the review queue if it does not yet exist. Idempotent. Authenticated via X-API-Key.", "operationId": "7688f9a0f9fc94c86a6f3aec6bb465c7", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VortexUserEventNotesStoreRequest" } } } }, "responses": { "201": { "description": "Notes attached successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "422": { "description": "Validation error" }, "401": { "description": "Unauthenticated" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/vortex/user-event-uploads": { "post": { "tags": [ "Vortex" ], "summary": "Attach session-level media to a scouting event", "description": "Attaches already-uploaded media (e.g. images from POST /api/vortex/upload-image-from-url) to a user's scouting session for an event+property, without recording any brand/item audit. Creates the user event in the review queue if it does not yet exist. Idempotent. Authenticated via X-API-Key.", "operationId": "64882b86eec7c644fd28067f5e650665", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VortexUserEventUploadsStoreRequest" } } } }, "responses": { "201": { "description": "Uploads attached successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "422": { "description": "Validation error" }, "401": { "description": "Unauthenticated" } }, "security": [ { "apiKeyAuth": [] } ] } }, "/api/youtube-brand-assets-combination/{userEvent}": { "get": { "tags": [ "YouTube Brand Assets" ], "summary": "Get brand-asset combinations for a YouTube scouting event", "description": "Retrieves all detected brand-asset combinations for a given scouting event from YouTube video processing", "operationId": "1cd62c0bed197799e56b1eb7797a9f12", "parameters": [ { "name": "userEvent", "in": "path", "description": "User event ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of brand-asset combinations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/YoutubeBrandAssetCombinationResource" } } } } }, "404": { "description": "Scouting event not found" } }, "security": [ { "bearerAuth": [] } ] } } }, "components": { "schemas": { "StatsMappingDto": { "title": "Stats Mapping DTO", "description": "Data Transfer Object representing a stats perform mapping entry", "properties": { "id": { "description": "Unique identifier for the mapping", "type": "integer", "example": 1 }, "statsSport": { "description": "Name of the sport in Stats Perform system", "type": "string", "example": "basketball" }, "statsSportId": { "description": "Numeric ID of the sport in Stats Perform system", "type": "integer", "example": 2 }, "statsLeagueAbbreviation": { "description": "League abbreviation in Stats Perform system", "type": "string", "example": "nba", "nullable": true }, "statsLeagueName": { "description": "League name in Stats Perform system", "type": "string", "example": "National Basketball Association", "nullable": true }, "statsTeamId": { "description": "Team identifier in Stats Perform system", "type": "string", "example": "sr:competitor:3417", "nullable": true }, "statsTeamName": { "description": "Team name in Stats Perform system", "type": "string", "example": "Los Angeles Lakers", "nullable": true }, "suTeamId": { "description": "SponsorUnited team/property ID", "type": "integer", "example": 456, "nullable": true }, "suTeamName": { "description": "SponsorUnited team/property name", "type": "string", "example": "Los Angeles Lakers", "nullable": true }, "statsApi": { "description": "Stats Perform API source identifier", "type": "string", "example": "SDAPI" } }, "type": "object" }, "StatsMappingUpdateDto": { "title": "Stats Mapping Update DTO", "description": "Data Transfer Object for updating a stats perform mapping", "properties": { "suTeamId": { "description": "SponsorUnited team/property ID to map to", "type": "integer", "example": 456 } }, "type": "object" }, "StatsPerformJobStatusDto": { "title": "Stats Perform Job Status DTO", "description": "Data Transfer Object representing the status of Stats Perform import jobs for a property", "properties": { "queuedCount": { "description": "Number of jobs waiting in queue", "type": "integer", "example": 5 }, "executingCount": { "description": "Number of jobs currently executing", "type": "integer", "example": 1 }, "finishedCount": { "description": "Number of successfully completed jobs", "type": "integer", "example": 24 }, "failedCount": { "description": "Number of failed jobs", "type": "integer", "example": 0 }, "retryingCount": { "description": "Number of jobs being retried", "type": "integer", "example": 0 }, "totalCount": { "description": "Total number of jobs", "type": "integer", "example": 30 }, "hasActiveJobs": { "description": "Whether there are any active (queued, executing, or retrying) jobs", "type": "boolean", "example": true }, "lastUpdated": { "description": "Timestamp of the most recently updated job", "type": "string", "format": "date-time", "example": "2025-12-07T10:30:00Z", "nullable": true }, "oldestActiveJob": { "description": "Timestamp of the oldest active job", "type": "string", "format": "date-time", "example": "2025-12-07T10:25:00Z", "nullable": true } }, "type": "object" }, "EmailExistsResponse": { "properties": { "exists": { "description": "Whether the email exists in the system", "type": "boolean" } }, "type": "object" }, "VerifyUserResponse": { "properties": { "success": { "description": "Whether the verification was successful", "type": "boolean" }, "message": { "description": "Verification result message", "type": "string" } }, "type": "object" }, "SendPinResponse": { "properties": { "retries_left": { "description": "Number of PIN verification attempts remaining", "type": "integer" }, "message": { "description": "Status message", "type": "string" } }, "type": "object" }, "EnrollResponse": { "properties": { "success": { "description": "Whether enrollment was successful", "type": "boolean" }, "message": { "description": "Enrollment result message", "type": "string" } }, "type": "object" }, "ForgotPasswordResponse": { "properties": { "success": { "description": "Whether the request was processed successfully", "type": "boolean" }, "status": { "description": "Status message", "type": "string" } }, "type": "object" }, "ResetPasswordResponse": { "properties": { "status": { "description": "Status indicator (ok or error)", "type": "string" }, "error": { "description": "Error details (only present on failure)", "properties": { "type": { "description": "Error type code", "type": "string" }, "message": { "description": "Human-readable error message", "type": "string" } }, "type": "object" } }, "type": "object" }, "GenericEntity": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "LeagueAssetEntity": { "properties": { "id": { "description": "league_items row id. Use as the after_id cursor.", "type": "integer", "example": 38439 }, "league_id": { "description": "League the asset is in capture scope for.", "type": "integer", "example": 109 }, "item_id": { "description": "Asset id. Identifies the tab; two assets in one league may share a name, so never key on item_name.", "type": "integer", "example": 350 }, "item_name": { "description": "Asset name, denormalized so consumers need no second lookup. NOT unique within a league \u2014 MLB carries eleven distinct assets under this exact name.", "type": "string", "example": "COMMERCIAL: Recorded" }, "item_platform": { "description": "Platform name \u2014 the coarse family the asset belongs to. Intended for grouping a league's assets into something navigable, and for telling venue-observable assets apart from broadcast ones. Null when the item has no platform.", "type": "string", "example": "MEDIA: Broadcast, Streaming & Other", "nullable": true }, "item_subplatform": { "description": "Subplatform name, and the only thing separating same-named assets. Null when the item has no subplatform. Consumers must use it to disambiguate labels.", "type": "string", "example": "TV: Pre Show(s)", "nullable": true }, "is_key_asset": { "description": "Whether the asset is flagged key for this league. A ranking hint, not a filter: key assets make sensible default tabs, non-key ones are opt-in.", "type": "integer", "example": 1 }, "capture_type": { "description": "What the asset captures per brand, and therefore the input the scout is given: 'frequency' counts occurrences and is pushed as items[].frequency; 'amount' records presence or quantity and is pushed as items[].value.", "type": "string", "enum": [ "frequency", "amount" ], "example": "frequency" } }, "type": "object" }, "PropertySyncEntity": { "properties": { "id": { "type": "integer", "example": 42 }, "name": { "type": "string", "example": "New England Patriots" }, "league_id": { "description": "League the property belongs to. Consumers map property -> league to resolve league-scoped reference data offline.", "type": "integer", "example": 7, "nullable": true } }, "type": "object" }, "PropertyKnownBrandEntity": { "properties": { "id": { "description": "Row id. Use as the after_id cursor.", "type": "integer", "example": 42 }, "team_id": { "description": "Property the brand was recorded against.", "type": "integer", "example": 2 }, "item_id": { "description": "Asset the brand was recorded on.", "type": "integer", "example": 191 }, "company_id": { "description": "Brand id.", "type": "integer", "example": 55 }, "company_name": { "description": "Brand name, denormalized so consumers need no second lookup.", "type": "string", "example": "Nike", "nullable": true } }, "type": "object" }, "StoreAgencyContactRequest": { "required": [ "name" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "companies": { "type": "array", "items": { "allOf": [ { "title": "BrandAgency", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } ] } }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" } }, "type": "object" }, "UpdateAgencyContactEmailStatusRequest": { "required": [ "id", "email_status", "email_status_updated" ], "properties": { "id": { "type": "integer" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" } }, "type": "object" }, "UpdateAgencyContactRequest": { "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "companies": { "type": "array", "items": { "allOf": [ { "title": "BrandAgency", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } ] } }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" } }, "type": "object" }, "AgencyServiceCreateRequest": { "properties": { "name": { "type": "string", "example": "Type 1" }, "service_type_id": { "type": "integer", "example": "1" } }, "type": "object" }, "AgencyServiceTypeCreateRequest": { "properties": { "name": { "type": "string", "example": "Type 1" } }, "type": "object" }, "AgencyServiceTypeUpdateRequest": { "properties": { "name": { "type": "string", "example": "Type 1" } }, "type": "object" }, "AgencyServiceUpdateRequest": { "properties": { "name": { "type": "string", "example": "Type 1" }, "service_type_id": { "type": "integer", "example": "1" } }, "type": "object" }, "AgencyStoreRequest": { "required": [ "name" ], "type": "object", "allOf": [ { "properties": { "name": { "type": "string" }, "synopsis": { "type": "string" }, "logo": { "type": "string" }, "no_of_employees": { "type": "integer" }, "corporate_phone": { "type": "string" }, "website": { "type": "string" }, "linkedin": { "type": "string" }, "linkedin_employees": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "twitch": { "type": "string" }, "tiktok": { "type": "string" }, "youtube": { "type": "string" }, "feed_url": { "type": "string" } }, "type": "object" }, { "properties": { "organizations": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "type": "integer", "example": "agency" }, "logo": { "type": "string" } }, "type": "object" } } }, "type": "object" }, { "properties": { "companies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } } }, "type": "object" }, { "properties": { "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } } }, "type": "object" } ] }, "AgencyUpdateRequest": { "required": [ "name" ], "type": "object", "allOf": [ { "properties": { "name": { "type": "string" }, "synopsis": { "type": "string" }, "logo": { "type": "string" }, "no_of_employees": { "type": "integer" }, "corporate_phone": { "type": "string" }, "website": { "type": "string" }, "linkedin": { "type": "string" }, "linkedin_employees": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "twitch": { "type": "string" }, "tiktok": { "type": "string" }, "youtube": { "type": "string" }, "feed_url": { "type": "string" } }, "type": "object" }, { "properties": { "organizations": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "type": "integer", "example": "agency" }, "logo": { "type": "string" } }, "type": "object" } } }, "type": "object" }, { "properties": { "companies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } } }, "type": "object" }, { "properties": { "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } } }, "type": "object" } ] }, "AssetGroupingIndexRequest": { "properties": { "name": { "type": "string" }, "page": { "type": "integer", "example": 1 }, "per_page": { "type": "integer", "example": 25 } }, "type": "object" }, "AssetGroupingReassignRequest": { "properties": { "new_grouping": { "type": "integer", "example": 1 } }, "type": "object" }, "AssetGroupingRequest": { "properties": { "name": { "type": "string" }, "icon": { "type": "string" }, "media_order": { "type": "integer" } }, "type": "object" }, "AssetIndexRequest": { "properties": { "subplatform": { "description": "Comma separated subplatform ids.", "type": "string" }, "league": { "description": "Comma separated league ids.", "type": "string" }, "property": { "description": "Comma separated property ids.", "type": "string" }, "subgenre": { "description": "Comma separated subgenre ids.", "type": "string" }, "having_deals_in_season": { "description": "A season in which the assets have deals.", "type": "integer" }, "season": { "description": "Season year the assets are requested for. When given, each property's enabled assets are resolved from the league it belonged to in that season instead of its current league.", "type": "integer" } }, "type": "object" }, "AssetStoreUpdateRequest": { "required": [ "name", "item_platform_id", "item_subplatform_id", "item_grouping_id" ], "properties": { "name": { "description": "Name of the asset", "type": "string" }, "item_platform_id": { "description": "Platform ID", "type": "integer" }, "item_subplatform_id": { "description": "Subplatform ID", "type": "integer" }, "item_grouping_id": { "description": "Grouping ID", "type": "integer" }, "default_rank": { "description": "Default rank for the asset", "type": "integer" }, "description": { "description": "Description of the asset", "type": "string" }, "hasAmount": { "description": "Whether the asset has amount", "type": "boolean" }, "hasDescription": { "description": "Whether the asset has description", "type": "boolean" }, "hasFrequency": { "description": "Whether the asset has frequency", "type": "boolean" }, "hasImages": { "description": "Whether the asset has images", "type": "boolean" }, "hasVideos": { "description": "Whether the asset has videos", "type": "boolean" }, "isDigital": { "description": "Whether the asset is digital", "type": "boolean" }, "isPrint": { "description": "Whether the asset is print", "type": "boolean" }, "isRadio": { "description": "Whether the asset is radio", "type": "boolean" }, "isSocial": { "description": "Whether the asset is social", "type": "boolean" }, "isSponsor": { "description": "Whether the asset is sponsor", "type": "boolean" }, "isTv": { "description": "Whether the asset is TV", "type": "boolean" }, "isVendor": { "description": "Whether the asset is vendor", "type": "boolean" }, "isOutOfHome": { "description": "Whether the asset is out of home", "type": "boolean" }, "definition": { "description": "Definition of the asset", "type": "string" }, "synonyms": { "description": "Array of synonym strings", "type": "array", "items": { "type": "string" } } }, "type": "object" }, "AssetSubgroupingStoreRequest": { "properties": { "name": { "type": "string" }, "asset_grouping_id": { "type": "integer" }, "media_order": { "type": "numeric" }, "icon": { "type": "string" } }, "type": "object" }, "AssetSubgroupingTagRequest": { "properties": { "new_tag": { "type": "string" } }, "type": "object" }, "AssetSubgroupingUpdateRequest": { "properties": { "name": { "type": "string" }, "asset_grouping_id": { "type": "integer" }, "icon": { "type": "string" } }, "type": "object" }, "AttendanceUpdateRequest": { "description": "Request for updating attendance data", "properties": { "property_attendances": { "description": "Array of property attendances for update", "type": "array", "items": { "properties": { "id": { "description": "Unique identifier of the attendance entry", "type": "integer" }, "property_id": { "description": "The ID of the property", "type": "integer" }, "season_id": { "description": "The ID of the season", "type": "integer" }, "attendance_average": { "description": "The average attendance (optional)", "type": "integer" }, "attendance_total": { "description": "The total attendance (optional)", "type": "integer" } }, "type": "object" } } }, "type": "object" }, "UpdateEmptyAudioRequest": { "required": [ "audio_id", "original_name", "stored_name", "original_file_size" ], "properties": { "audio_id": { "type": "integer", "example": 1 }, "original_name": { "type": "string" }, "stored_name": { "type": "string" }, "original_file_size": { "type": "number" }, "item_subplatform_id": { "description": "Restricts asset matching during transcription to this subplatform", "type": "integer", "nullable": true }, "property_id": { "description": "Scouting property/team the audio belongs to; forwarded to the transcription pipeline", "type": "integer", "nullable": true } }, "type": "object" }, "StoreAudioDownloadLinkRequest": { "required": [ "url" ], "properties": { "url": { "description": "Audio download URL", "type": "string", "format": "uri", "maxLength": 500, "example": "https://example.com/audio/download.mp3" } }, "type": "object" }, "AuditBulkReassignBrandRequest": { "required": [ "brand_id" ], "properties": { "item_value_ids": { "description": "Array of item value IDs to reassign (optional, reassigns all if not provided)", "type": "array", "items": { "type": "integer" } }, "excluded_item_value_ids": { "description": "Item value IDs to exclude (used when item_value_ids is not provided)", "type": "array", "items": { "type": "integer" } }, "brand_id": { "description": "Target brand ID to reassign item values to", "type": "integer", "example": 123 } }, "type": "object" }, "AuditCopyRequest": { "required": [ "new_brand_id" ], "properties": { "new_brand_id": { "description": "ID of the brand to copy the audit to", "type": "integer", "example": 456 }, "item_id": { "description": "Optional new item ID for the copied item value", "type": "integer", "example": 789 } }, "type": "object" }, "AuditReviewListRequest": { "properties": { "brand_ids": { "description": "Comma-separated brand IDs", "type": "string", "example": "1,2,3" }, "platform_ids": { "description": "Comma-separated platform IDs", "type": "string", "example": "1,2" }, "subplatform_ids": { "description": "Comma-separated subplatform IDs", "type": "string", "example": "1,2" }, "asset_ids": { "description": "Comma-separated asset/item IDs", "type": "string", "example": "1,2,3" }, "per_page": { "description": "Items per page", "type": "integer", "example": 15 }, "page": { "description": "Page number", "type": "integer", "example": 1 }, "order_by": { "description": "Field to order by", "type": "string", "enum": [ "brand", "platform", "subplatform", "asset", "amount", "frequency", "created_at" ], "example": "brand" }, "order_direction": { "description": "Sort direction", "type": "string", "enum": [ "asc", "desc" ], "example": "asc" } }, "type": "object" }, "BulkAddAuditsRequest": { "required": [ "companies", "properties", "items" ], "properties": { "companies": { "description": "Companies/brands to create audits for", "type": "array", "items": { "required": [ "id" ], "properties": { "id": { "description": "Brand ID", "type": "integer" } }, "type": "object" } }, "properties": { "description": "Properties with their associated events", "type": "array", "items": { "required": [ "id", "events" ], "properties": { "id": { "description": "Property / team ID", "type": "integer" }, "events": { "type": "array", "items": { "type": "object" } } }, "type": "object" } }, "items": { "description": "Items with their values", "type": "array", "items": { "required": [ "id" ], "properties": { "id": { "description": "Item ID", "type": "integer" } }, "type": "object" } }, "synonyms": { "description": "Synonyms to add to events", "type": "array", "items": { "type": "object" } }, "isQuickAdd": { "description": "Whether this is a quick-add operation", "type": "boolean", "default": true } }, "type": "object" }, "SaveUserEventRequest": { "required": [ "item_id" ], "properties": { "item_id": { "description": "Item ID", "type": "integer" }, "frequency": { "description": "Frequency value", "type": "integer" }, "value": { "description": "Amount value", "type": "number" }, "description": { "description": "Description/keyword", "type": "string" }, "socialMediaValue": { "description": "Social media post URL", "type": "string" }, "item_images": { "type": "array", "items": { "type": "object" } }, "item_videos": { "type": "array", "items": { "type": "object" } }, "audios": { "type": "array", "items": { "type": "object" } }, "user_id": { "description": "User ID (requires edit-any-scouting-report permission)", "type": "integer" } }, "type": "object" }, "UpdateUserEventsRequest": { "properties": { "status": { "description": "New status for the user event", "type": "integer" }, "league": { "description": "Apply changes to the entire league", "type": "boolean" }, "property": { "description": "Apply changes to the entire property", "type": "boolean" }, "scan": { "description": "Apply changes to the entire scan", "type": "boolean" }, "review_notes": { "description": "Review notes", "type": "string" }, "event": { "description": "Comma-separated event IDs", "type": "string" }, "brand_id": { "description": "Brand ID for property/league changes", "type": "integer" }, "type": { "description": "Update user-event type", "type": "string" }, "eventId": { "description": "Move audits to a different event", "type": "integer" }, "teamId": { "description": "Source team ID for a move operation", "type": "integer" } }, "type": "object" }, "AuditReviewBulkCloneRequest": { "required": [ "asset_id" ], "properties": { "item_value_ids": { "type": "array", "items": { "type": "integer" } }, "excluded_item_value_ids": { "description": "Item value IDs to exclude (used when item_value_ids is not provided)", "type": "array", "items": { "type": "integer" } }, "asset_id": { "type": "integer" } }, "type": "object" }, "AuditReviewBulkDeleteRequest": { "required": [], "properties": { "item_value_ids": { "type": "array", "items": { "type": "integer" } }, "excluded_item_value_ids": { "description": "Item value IDs to exclude (used when item_value_ids is not provided)", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "AuditReviewBulkRejectRequest": { "required": [ "content" ], "properties": { "item_value_ids": { "type": "array", "items": { "type": "integer" } }, "excluded_item_value_ids": { "description": "Item value IDs to exclude (used when item_value_ids is not provided)", "type": "array", "items": { "type": "integer" } }, "content": { "type": "string" } }, "type": "object" }, "AuditReviewBulkUpdateRequest": { "required": [ "asset_id" ], "properties": { "item_value_ids": { "type": "array", "items": { "type": "integer" } }, "excluded_item_value_ids": { "description": "Item value IDs to exclude (used when item_value_ids is not provided)", "type": "array", "items": { "type": "integer" } }, "asset_id": { "type": "integer" }, "frequency": { "type": "number", "nullable": true }, "item_images": { "type": "array", "items": { "properties": { "image_id": { "type": "integer" } }, "type": "object" } }, "item_videos": { "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } } }, "type": "object" }, "AuthEmailExistsRequest": { "required": [ "email" ], "properties": { "email": { "description": "Email address to check", "type": "string", "format": "email" } }, "type": "object" }, "LoginRequest": { "required": [ "email", "password" ], "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "format": "password" }, "remember_me": { "type": "boolean" } }, "type": "object" }, "VerifyLoginRequest": { "required": [ "pin" ], "properties": { "pin": { "description": "6-digit verification PIN", "type": "string" } }, "type": "object" }, "ApproveBrandCompetitorReviewItemRequest": { "required": [ "resolution_brand_id" ], "properties": { "resolution_brand_id": { "description": "ID of the existing brand (companies.id) to link as competitor.", "type": "integer", "example": 4711 } }, "type": "object" }, "RejectBrandCompetitorReviewItemRequest": { "required": [ "rejection_reason" ], "properties": { "rejection_reason": { "type": "string", "enum": [ "not_a_brand", "not_on_platform", "scraper_noise", "other" ], "example": "scraper_noise" }, "note": { "description": "Free-form rationale. Required when rejection_reason=other.", "type": "string", "maxLength": 2048, "example": "OCR noise from synopsis HTML extraction.", "nullable": true } }, "type": "object" }, "BrandSynonymStoreRequest": { "required": [ "synonym" ], "type": "object", "allOf": [ { "properties": { "brand_id": { "type": "integer" }, "synonym": { "type": "string" } }, "type": "object" } ] }, "BrandSynonymUpdateRequest": { "required": [ "synonym" ], "type": "object", "allOf": [ { "properties": { "synonym": { "type": "string" } }, "type": "object" } ] }, "CategoryIndexRequest": { "properties": { "name": { "description": "Filter categories by name (prefix match)", "type": "string", "example": "Auto", "nullable": true } }, "type": "object" }, "CategoryStoreRequest": { "required": [ "name" ], "properties": { "name": { "description": "Name of the category", "type": "string", "minLength": 3, "example": "Automotive" }, "synopsis": { "description": "Brief description of the category", "type": "string", "example": "Automotive industry brands and companies", "nullable": true } }, "type": "object" }, "CategoryUpdateRequest": { "required": [ "name" ], "properties": { "name": { "description": "Name of the category", "type": "string", "minLength": 3, "example": "Automotive" }, "synopsis": { "description": "Brief description of the category", "type": "string", "example": "Automotive industry brands and companies", "nullable": true } }, "type": "object" }, "CompanyIndexRequest": { "properties": { "order_by": { "type": "string" }, "order": { "type": "string" }, "only_unapproved": { "type": "boolean" }, "name": { "type": "string" }, "categories": { "type": "string", "example": "1,2,3" }, "subcategories": { "type": "string", "example": "1,2,3" }, "markets": { "type": "string", "example": "1,2,3" } }, "type": "object" }, "StoreBrandContactRequest": { "required": [ "name" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "companies": { "type": "array", "items": { "allOf": [ { "title": "BrandAgency", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } ] } }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" } }, "type": "object" }, "UpdateBrandContactEmailStatusRequest": { "required": [ "id", "email_status", "email_status_updated" ], "properties": { "id": { "type": "integer" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" } }, "type": "object" }, "UpdateBrandContactRequest": { "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" } }, "type": "object" }, "BrandContactsIndexRequest": { "properties": { "brands": { "type": "boolean" } }, "type": "object" }, "BadEmailReportIndexRequest": { "properties": { "status": { "description": "Filter by report status", "type": "string", "enum": [ "pending", "new_email_found", "new_company", "confirmed_valid", "scraping_failed", "deleted" ] } }, "type": "object" }, "ContactCreateSaleRequest": { "required": [ "person_profile_ids", "sale_list_id" ], "properties": { "person_profile_ids": { "type": "array", "items": { "type": "integer" } }, "sale_list_id": { "type": "integer" }, "source_entity_type": { "type": "string", "enum": [ "brand", "property", "agency" ], "nullable": true } }, "type": "object" }, "ContactDeleteSaleRequest": { "required": [ "sale_list_id" ], "properties": { "sale_list_id": { "type": "integer" }, "person_profile_ids": { "description": "Explicit person_profile IDs to remove. Mutually exclusive with excluded_person_profile_ids.", "type": "array", "items": { "type": "integer" } }, "excluded_person_profile_ids": { "description": "Remove every contact on the list except these. Mutually exclusive with person_profile_ids.", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "ContactEmailStatusFileRequest": { "properties": { "email_statuses": { "type": "string", "format": "binary" } }, "type": "object" }, "ContactIndexRequest": { "properties": { "brands": { "type": "boolean" } }, "type": "object" }, "ContactLinkedinEmployeeSearchRequest": { "properties": { "title": { "description": "The job title to search for", "type": "string", "example": "Chief Executive Officer" }, "container": { "description": "Optional container ID for using existing scraping results", "type": "string", "example": "123456789" } }, "type": "object" }, "ContactLinkedinScrapeShowRequest": { "title": "ContactLinkedinScrapeShowRequest", "required": [ "urls" ], "properties": { "urls": { "type": "array", "items": { "type": "string" }, "maxItems": 10, "minItems": 1 } }, "type": "object" }, "ContactSearchByEmailRequest": { "properties": { "email": { "type": "string" }, "should_skip_sale_contacts": { "type": "boolean" } }, "type": "object" }, "ContactSearchBySchoolRequest": { "properties": { "contact_type": { "type": "string" }, "school_name": { "type": "string" } }, "type": "object" }, "StoreContactRequest": { "required": [ "name" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "companies": { "description": "Only for Agency contacts. An array with companies associated with the agency contact.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "properties": { "description": "Only for Agency contacts. An array with properties associated with the agency contact.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" }, "contact_status_id": { "type": "integer" } }, "type": "object" }, "UpdateContactEmailStatusRequest": { "required": [ "id", "email_status", "email_status_updated" ], "properties": { "id": { "type": "integer" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" } }, "type": "object" }, "UpdateContactRequest": { "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "companies": { "description": "Only for Agency contacts. An array with companies associated with the agency contact.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "properties": { "description": "Only for Agency contacts. An array with properties associated with the agency contact.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" }, "contact_status_id": { "type": "integer" } }, "type": "object" }, "PhantombusterEmployeeSearchWebhookRequest": { "required": [ "agentId", "containerId", "exitCode" ], "properties": { "agentId": { "description": "PhantomBuster agent ID", "type": "string", "example": "5027055349780535" }, "agentName": { "description": "PhantomBuster agent name", "type": "string", "example": "LinkedIn Employee Search" }, "containerId": { "description": "PhantomBuster container ID", "type": "string", "example": "3358014727012763" }, "script": { "description": "Script filename", "type": "string", "example": "script.js" }, "scriptOrg": { "description": "Script organization", "type": "string", "example": "phantombuster" }, "branch": { "description": "Script branch", "type": "string", "example": "main" }, "launchDuration": { "description": "Launch duration in milliseconds", "type": "integer", "example": 121 }, "runDuration": { "description": "Run duration in milliseconds", "type": "integer", "example": 1850 }, "resultObject": { "description": "Result data from the scraping", "type": "object" }, "exitMessage": { "description": "Exit message", "type": "string", "example": "finished" }, "exitCode": { "description": "Exit code (0 = success)", "type": "integer", "example": 0 } }, "type": "object" }, "ReportBadEmailRequest": { "required": [ "person_profile_id", "entity_id", "entity_type" ], "properties": { "person_profile_id": { "description": "The person profile ID", "type": "integer" }, "entity_id": { "description": "The entity ID (agency, brand, or property)", "type": "integer" }, "entity_type": { "description": "The type of entity", "type": "string", "enum": [ "agency", "brand", "property" ] } }, "type": "object" }, "ActiveCuratedNewsRequest": { "properties": { "news_tag": { "type": "string" }, "brand": { "description": "Comma separated brand ids.", "type": "string" }, "property": { "description": "Comma separated property ids.", "type": "string" }, "agency": { "description": "Comma separated agency ids.", "type": "string" }, "sub_brands": { "type": "boolean" }, "with_image": { "type": "string" }, "page": { "type": "integer" }, "per_page": { "type": "string" } }, "type": "object" }, "AddNewsContactsRequest": { "required": [ "news_contact_ids" ], "properties": { "news_contact_ids": { "description": "Ids of the extracted contacts the reviewer selected. Every id must belong to this article.", "type": "array", "items": { "type": "integer", "example": 4711 }, "minItems": 1 } }, "type": "object" }, "AnalyseCuratedNewsRequest": { "required": [ "urls" ], "properties": { "urls": { "type": "array", "items": { "type": "string", "format": "url", "maxLength": 2048, "example": "https://example.com/article" }, "minItems": 1 }, "companies": { "type": "array", "items": { "type": "integer", "example": 1 } }, "agencies": { "type": "array", "items": { "type": "integer", "example": 1 } }, "teams": { "type": "array", "items": { "type": "integer", "example": 1 } }, "extract_entities": { "description": "When true (default), entity extraction (brand/property/agency) runs in parallel with contact extraction.", "type": "boolean", "example": true }, "extract_contacts": { "description": "When true (default), contact extraction runs after markdown conversion completes.", "type": "boolean", "example": true }, "extract_assets": { "description": "When true (default), asset extraction runs after markdown conversion completes, in parallel with contact extraction.", "type": "boolean", "example": true } }, "type": "object" }, "NewsSubmissionShowRequest": { "properties": { "id": { "type": "integer" } }, "type": "object" }, "NewsSubmissionsRequest": { "properties": { "page": { "type": "integer" }, "per_page": { "type": "integer" }, "status": { "description": "Comma-separated list of statuses (e.g. pending,analysed,published,unpublished,declined)", "type": "string", "example": "pending,analysed,published" }, "order_by": { "description": "Field to order by", "type": "string", "enum": [ "created_at", "updated_at", "published_at", "title", "status", "url" ] }, "order_direction": { "description": "Sort direction", "type": "string", "enum": [ "asc", "desc" ] }, "reporter_id": { "description": "Optional. Scope the global queue to a single submitter's submissions.", "type": "integer" }, "from": { "description": "Filter submissions created on or after this date (Y-m-d)", "type": "string", "format": "date" }, "to": { "description": "Filter submissions created on or before this date (Y-m-d, inclusive)", "type": "string", "format": "date" }, "title": { "description": "Filter by article title (case-insensitive substring). When combined with `url`, both must match (AND).", "type": "string", "maxLength": 255 }, "url": { "description": "Filter by article URL (case-insensitive substring). When combined with `title`, both must match (AND).", "type": "string", "maxLength": 255 } }, "type": "object" }, "ResolveNewsContactRequest": { "required": [ "linkedin_url" ], "properties": { "linkedin_url": { "description": "The chosen LinkedIn member profile, usually one of the row's sourced candidates.", "type": "string", "example": "https://www.linkedin.com/in/casey-wasserman" } }, "type": "object" }, "StoreNewsAssetRequest": { "required": [ "item_id" ], "properties": { "item_id": { "description": "FK to items; must reference an existing catalog row. Searchable via GET /api/search/asset.", "type": "integer", "example": 481 }, "context": { "description": "Optional free-text note persisted on the asset row.", "type": "string", "example": "Mentioned in paragraph 3 as the title sponsor.", "nullable": true } }, "type": "object" }, "UpdateNewsAssetRequest": { "properties": { "item_id": { "description": "FK to items; must reference an existing catalog row.", "type": "integer", "example": 481, "nullable": true }, "match_status": { "description": "Reviewer-driven state transitions (needs_review = unconfirm).", "type": "string", "enum": [ "confirmed", "dismissed", "needs_review" ], "example": "confirmed" }, "context": { "description": "Editable free-text note. Send null or an empty string to clear it; omit to leave it unchanged.", "type": "string", "example": "Mentioned in paragraph 3 as the title sponsor.", "nullable": true } }, "type": "object" }, "CustomReportIndexRequest": { "properties": { "user": { "description": "Filter by user IDs", "type": "string", "example": "1,2,3" }, "agency": { "description": "Filter by agency IDs", "type": "string", "example": "1,2,3" }, "brand": { "description": "Filter by brand IDs", "type": "string", "example": "1,2,3" }, "property": { "description": "Filter by property IDs", "type": "string", "example": "1,2,3" }, "tag": { "description": "Filter by tag IDs", "type": "string", "example": "1,2,3" }, "organization": { "description": "Filter by organization IDs", "type": "string", "example": "1,2,3" }, "publishedBefore": { "description": "Filter reports published before this date", "type": "string", "example": "2021-01-01" }, "publishedAfter": { "description": "Filter reports published after this date", "type": "string", "example": "2021-01-01" } }, "type": "object" }, "CustomReportRenameRequest": { "required": [ "title" ], "properties": { "title": { "description": "New report title", "type": "string" } }, "type": "object" }, "CustomReportShareRequest": { "required": [ "user_ids" ], "properties": { "user_ids": { "description": "Array of user IDs to share the report with", "type": "array", "items": { "type": "integer" }, "minItems": 1 } }, "type": "object" }, "CustomReportStoreRequest": { "required": [ "title" ], "properties": { "title": { "description": "Report title", "type": "string" }, "description": { "description": "Report description", "type": "string", "nullable": true }, "report_file_id": { "description": "Report file ID (infographic PDF)", "type": "integer", "nullable": true }, "thumbnail_url": { "description": "Thumbnail image URL", "type": "string", "nullable": true }, "published_at": { "description": "Publication date", "type": "string", "format": "date-time", "nullable": true }, "tags": { "description": "Associated tags", "type": "array", "items": { "oneOf": [ { "description": "Tag ID", "type": "integer" }, { "properties": { "name": { "description": "Tag name", "type": "string" } }, "type": "object" } ] } }, "brands": { "description": "Associated brand IDs (comma-separated)", "type": "string", "example": "1,2,3" }, "properties": { "description": "Associated property IDs (comma-separated)", "type": "string", "example": "1,2,3" }, "agencies": { "description": "Associated agency IDs (comma-separated)", "type": "string", "example": "1,2,3" }, "organizations": { "description": "Organization IDs (assigns to ALL users in org, comma-separated)", "type": "string", "example": "1,2,3" }, "users": { "description": "Individual user IDs (comma-separated)", "type": "string", "example": "1,2,3" } }, "type": "object" }, "IngestionWebhookRequest": { "required": [ "request_id", "task_id", "type", "status" ], "properties": { "event_id": { "type": "string", "format": "uuid" }, "correlation_id": { "description": "Optional client correlation id echoed for tracing", "type": "string", "maxLength": 255, "nullable": true }, "request_id": { "type": "string" }, "task_id": { "type": "string" }, "type": { "type": "string", "enum": [ "content_extraction", "screenshot_extraction", "markdown_conversion", "contact_extraction", "entity_extraction" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "queued", "processing", "completed", "failed" ] }, "timestamp": { "type": "string", "format": "date-time" }, "result": { "type": "object" }, "error": { "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "type": "object" } }, "type": "object" }, "ListIngestionJobsRequest": { "properties": { "status": { "type": "string", "enum": [ "pending", "in_progress", "completed", "partially_completed", "failed" ] }, "per_page": { "type": "integer", "maximum": 100, "minimum": 1, "example": 15 } }, "type": "object" }, "SubmitIngestionRequest": { "required": [ "url", "tasks" ], "properties": { "url": { "type": "string", "format": "url", "maxLength": 2048, "example": "https://example.com/article" }, "tasks": { "type": "array", "items": { "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "content_extraction", "screenshot_extraction", "markdown_conversion", "contact_extraction", "entity_extraction" ] }, "options": { "type": "object" } }, "type": "object" } } }, "type": "object" }, "EnrollRequest": { "required": [ "firstname", "lastname", "email" ], "properties": { "firstname": { "description": "User's first name", "type": "string" }, "lastname": { "description": "User's last name", "type": "string" }, "email": { "description": "User's email address", "type": "string", "format": "email" } }, "type": "object" }, "FeedbackSendRequest": { "properties": { "email_body": { "type": "string" } }, "type": "object" }, "FileUploadRequest": { "description": "Request schema for uploading a file", "required": [ "file" ], "properties": { "file": { "description": "The file to upload. Must be a PDF, PPT, PPTX, XLS, XLSX, or CSV. Max size 20MB.", "type": "string", "format": "binary" }, "generate_thumbnail": { "description": "Whether to generate a thumbnail for the uploaded file.", "type": "boolean", "example": true } }, "type": "object" }, "ForgotPasswordRequest": { "required": [ "email" ], "properties": { "email": { "description": "Email address for password reset", "type": "string", "format": "email" } }, "type": "object" }, "CropImageRequest": { "title": "Crop Image Request", "description": "Request schema for cropping an image", "required": [ "file" ], "properties": { "file": { "description": "Base64-encoded image data URI (must start with data:image/)", "type": "string", "example": "data:image/png;base64,iVBORw0KGgo..." }, "type": { "description": "The upload type category", "type": "string", "example": "generic", "nullable": true }, "id": { "description": "The image ID", "type": "integer", "nullable": true }, "item_image_id": { "description": "The item image ID (triggers duplication if image is used on multiple items)", "type": "integer", "nullable": true } }, "type": "object" }, "DownloadImageRequest": { "title": "Download Image Request", "description": "Request schema for downloading an image as base64", "required": [ "url" ], "properties": { "url": { "description": "The URL of the image to download", "type": "string", "format": "url", "example": "https://example.com/image.png" } }, "type": "object" }, "GetLogosRequest": { "title": "Get Logos Request", "description": "Request schema for detecting logos in an image via Google Cloud Vision", "required": [ "img_url" ], "properties": { "img_url": { "description": "The URL of the image to detect logos from", "type": "string", "format": "url", "example": "https://example.com/image.png" } }, "type": "object" }, "UploadImageFromUrlRequest": { "title": "Upload Image From URL Request", "description": "Request schema for uploading an image from a URL to S3", "required": [ "url" ], "properties": { "url": { "description": "The URL of the image to upload", "type": "string", "format": "url", "example": "https://example.com/image.png" }, "type": { "description": "The upload type category", "type": "string", "example": "generic", "nullable": true } }, "type": "object" }, "InfographicsIndexRequest": { "properties": { "category": { "type": "string", "example": "1,2,3" }, "subcategory": { "type": "string", "example": "1,2,3" }, "agency": { "type": "string", "example": "1,2,3" }, "league": { "type": "string", "example": "1,2,3" }, "tag": { "type": "string", "example": "1,2,3" }, "publishedBefore": { "type": "string", "example": "2021-01-01" }, "publishedAfter": { "type": "string", "example": "2021-01-01" } }, "type": "object" }, "InfographicsStoreRequest": { "required": [ "title", "original_url", "resized_url", "thumbnail_url", "published_at" ], "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "original_url": { "type": "string" }, "resized_url": { "type": "string" }, "thumbnail_url": { "type": "string" }, "published_at": { "type": "string" }, "tags": { "type": "object" }, "brands": { "type": "string", "example": "1,2,3" }, "properties": { "type": "string", "example": "1,2,3" }, "agencies": { "type": "string", "example": "1,2,3" } }, "type": "object" }, "InfographicsUpdateRequest": { "required": [ "title", "original_url", "resized_url", "thumbnail_url", "published_at" ], "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "original_url": { "type": "string" }, "resized_url": { "type": "string" }, "thumbnail_url": { "type": "string" }, "published_at": { "type": "string" }, "tags": { "type": "object" }, "brands": { "type": "string", "example": "1,2,3" }, "properties": { "type": "string", "example": "1,2,3" }, "agencies": { "type": "string", "example": "1,2,3" } }, "type": "object" }, "SalesforceAccessTokenRequest": { "properties": { "username": { "type": "string" }, "password": { "type": "string" } }, "type": "object" }, "SaveSalesforceRequest": { "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "BrandsSyncRequest": { "properties": { "after_id": { "description": "Cursor: return records with id greater than this value. Omit for the first page.", "type": "integer", "example": 500, "nullable": true }, "per_page": { "description": "Number of records per page. Min: 1, max: 10000. Defaults to 500.", "type": "integer", "example": 500 } }, "type": "object" }, "LeagueAssetsSyncRequest": { "properties": { "after_id": { "description": "Cursor: return records with id greater than this value. Omit for the first page.", "type": "integer", "example": 500, "nullable": true }, "per_page": { "description": "Number of records per page. Min: 1, max: 10000. Defaults to 500.", "type": "integer", "example": 500 } }, "type": "object" }, "PropertiesSyncRequest": { "properties": { "after_id": { "description": "Cursor: return records with id greater than this value. Omit for the first page.", "type": "integer", "example": 500, "nullable": true }, "per_page": { "description": "Number of records per page. Min: 1, max: 10000. Defaults to 500.", "type": "integer", "example": 500 } }, "type": "object" }, "PropertyKnownBrandsSyncRequest": { "properties": { "after_id": { "description": "Cursor: return records with id greater than this value. Omit for the first page.", "type": "integer", "example": 500, "nullable": true }, "per_page": { "description": "Number of records per page. Min: 1, max: 10000. Defaults to 500.", "type": "integer", "example": 500 } }, "type": "object" }, "VenuesSyncRequest": { "properties": { "after_id": { "description": "Cursor: return records with id greater than this value. Omit for the first page.", "type": "integer", "example": 500, "nullable": true }, "per_page": { "description": "Number of records per page. Min: 1, max: 10000. Defaults to 500.", "type": "integer", "example": 500 } }, "type": "object" }, "ItemValueIndexRequest": { "properties": { "page": { "type": "integer", "example": 1 }, "per_page": { "type": "integer", "example": 25 } }, "type": "object" }, "ItemValueUpdateRequest": { "properties": { "item_id": { "type": "string" }, "audit_id": { "type": "string" }, "description": { "type": "string" }, "frequency": { "type": "string" }, "value": { "type": "string" }, "item_images": { "type": "string" }, "item_videos": { "type": "string" } }, "type": "object" }, "PositionKeywordRequest": { "required": [ "keywords" ], "properties": { "keywords": { "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } } }, "type": "object" }, "StoreKeywordRequest": { "required": [ "keyword", "image_id" ], "properties": { "keyword": { "type": "string" }, "image_id": { "type": "integer" } }, "type": "object" }, "UpdateKeywordRequest": { "properties": { "keyword": { "type": "string" }, "image_id": { "type": "integer" } }, "type": "object" }, "LeagueStoreRequest": { "properties": { "name": { "description": "League name.", "type": "string", "nullable": true }, "short_name": { "description": "League short name.", "type": "string", "nullable": true }, "currency": { "description": "ISO currency code.", "type": "string", "maxLength": 3, "nullable": true }, "logo_url": { "description": "URL of the league logo image.", "type": "string", "nullable": true }, "website_url": { "description": "League website URL.", "type": "string", "nullable": true }, "sport_id": { "description": "Associated sport ID.", "type": "integer", "nullable": true }, "owner_id": { "description": "League owner user ID.", "type": "integer", "nullable": true }, "scouting_priority": { "description": "Scouting priority.", "type": "integer", "nullable": true }, "platforms_scouted": { "description": "Number of platforms scouted.", "type": "integer", "nullable": true }, "times_scouted_per_year": { "description": "Times scouted per year.", "type": "integer", "nullable": true }, "genre_id": { "description": "Genre ID.", "type": "integer", "nullable": true }, "subgenre_id": { "description": "Subgenre ID.", "type": "integer", "nullable": true }, "release_date": { "description": "Season release date (MM/DD).", "type": "string", "nullable": true }, "start_date": { "description": "Season start date (MM/DD).", "type": "string", "nullable": true }, "end_date": { "description": "Season end date (MM/DD).", "type": "string", "nullable": true }, "social_start_date": { "description": "Social scraping start date (MM/DD).", "type": "string", "nullable": true }, "social_end_date": { "description": "Social scraping end date (MM/DD).", "type": "string", "nullable": true }, "notes": { "description": "Free-text notes.", "type": "string", "nullable": true }, "assistants": { "description": "User IDs to assign as league assistants.", "type": "array", "items": { "type": "integer" } }, "is_continuous": { "description": "Whether the league runs continuously (no fixed season window).", "type": "boolean", "nullable": true }, "separator_text": { "description": "Separator label used in listings.", "type": "string", "maxLength": 255, "nullable": true } }, "type": "object" }, "LeagueUpdateRequest": { "properties": { "name": { "description": "League name.", "type": "string", "nullable": true }, "short_name": { "description": "League short name.", "type": "string", "nullable": true }, "currency": { "description": "ISO currency code.", "type": "string", "maxLength": 3, "nullable": true }, "is_continuous": { "description": "Whether the league runs continuously (no fixed season window).", "type": "boolean", "nullable": true }, "logo_url": { "description": "URL of the league logo image.", "type": "string", "nullable": true }, "website_url": { "description": "League website URL.", "type": "string", "nullable": true }, "sport_id": { "description": "Associated sport ID.", "type": "integer", "nullable": true }, "owner_id": { "description": "League owner user ID.", "type": "integer", "nullable": true }, "scouting_priority": { "description": "Scouting priority.", "type": "integer", "nullable": true }, "platforms_scouted": { "description": "Number of platforms scouted.", "type": "integer", "nullable": true }, "times_scouted_per_year": { "description": "Times scouted per year.", "type": "integer", "nullable": true }, "genre_id": { "description": "Genre ID.", "type": "integer", "nullable": true }, "subgenre_id": { "description": "Subgenre ID.", "type": "integer", "nullable": true }, "notes": { "description": "Free-text notes.", "type": "string", "nullable": true }, "assistants": { "description": "User IDs to assign as league assistants.", "type": "array", "items": { "type": "integer" } }, "divisions": { "description": "League divisions to sync.", "type": "array", "items": { "type": "object" } }, "rejected_companies": { "description": "Companies to mark as rejected.", "type": "array", "items": { "required": [ "id" ], "properties": { "id": { "type": "integer" } }, "type": "object" } }, "order": { "description": "Display order within its genre/subgenre group.", "type": "integer" }, "separator_text": { "description": "Separator label used in listings.", "type": "string", "maxLength": 255, "nullable": true }, "release_date": { "description": "Season release date (MM/DD); applied across the league's seasons.", "type": "string", "nullable": true }, "start_date": { "description": "Season start date (MM/DD); applied across the league's seasons.", "type": "string", "nullable": true }, "end_date": { "description": "Season end date (MM/DD); applied across the league's seasons.", "type": "string", "nullable": true }, "social_start_date": { "description": "Social scraping start date (MM/DD); applied across the league's seasons.", "type": "string", "nullable": true }, "social_end_date": { "description": "Social scraping end date (MM/DD); applied across the league's seasons.", "type": "string", "nullable": true } }, "type": "object" }, "LeagueSocialScrapingPlatformSettings": { "properties": { "enabled": { "description": "Whether scraping is enabled for the platform.", "type": "boolean" }, "frequency_value": { "description": "How often to scrape, paired with frequency_unit.", "type": "integer" }, "frequency_unit": { "description": "Unit for the scraping frequency.", "type": "string" }, "week_day": { "description": "Day of week scraping runs on.", "type": "string" }, "end_day_offset": { "description": "Offset, in days, applied to the scraping window end.", "type": "integer" } }, "type": "object" }, "LeagueUpdateSocialScrapingSettingsRequest": { "properties": { "twitter": { "oneOf": [ { "$ref": "#/components/schemas/LeagueSocialScrapingPlatformSettings" } ], "nullable": true }, "facebook": { "oneOf": [ { "$ref": "#/components/schemas/LeagueSocialScrapingPlatformSettings" } ], "nullable": true }, "instagram": { "oneOf": [ { "$ref": "#/components/schemas/LeagueSocialScrapingPlatformSettings" } ], "nullable": true }, "tiktok": { "oneOf": [ { "$ref": "#/components/schemas/LeagueSocialScrapingPlatformSettings" } ], "nullable": true } }, "type": "object" }, "LeagueDealsFilterOptionsRequest": { "required": [ "season" ], "properties": { "season": { "description": "Season year to report on.", "type": "integer", "example": 2025 }, "status": { "description": "Accepted for compatibility; does not restrict filter options.", "type": "array", "items": { "type": "integer" }, "nullable": true }, "platform_id": { "description": "Accepted for compatibility; does not restrict filter options.", "type": "integer", "nullable": true }, "subplatform_id": { "description": "Accepted for compatibility; does not restrict filter options.", "type": "integer", "nullable": true }, "item_id": { "description": "Accepted for compatibility; does not restrict filter options.", "type": "integer", "nullable": true }, "leagues": { "description": "League IDs (comma-separated).", "type": "array", "items": { "type": "integer" }, "nullable": true }, "division_id": { "description": "Division scope filter.", "type": "integer", "nullable": true }, "scouting_groups": { "description": "Scouting group IDs (comma-separated).", "type": "array", "items": { "type": "integer" }, "nullable": true }, "scouting_markets": { "description": "Scouting market IDs (comma-separated).", "type": "array", "items": { "type": "integer" }, "nullable": true } }, "type": "object" }, "LeagueDealsStatisticsCompletionRequest": { "required": [ "season" ], "properties": { "season": { "description": "Season year.", "type": "integer", "example": 2025 }, "league_ids": { "description": "League IDs. Required when scouting_markets is not provided.", "type": "array", "items": { "type": "integer" } }, "scouting_markets": { "description": "Scouting market IDs. Required when league_ids is not provided.", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "LeagueDealsStatisticsRequest": { "properties": { "season": { "description": "Season year. Defaults to the current year when omitted.", "type": "integer", "example": 2025 }, "league_ids": { "description": "League IDs. Required when scouting_markets is not provided.", "type": "array", "items": { "type": "integer" } }, "scouting_markets": { "description": "Scouting market IDs. Required when league_ids is not provided.", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "LeagueItemsUpdateItemLeaguesRequest": { "properties": { "leagues": { "type": "array", "items": { "properties": { "league_id": { "type": "integer" }, "is_key_asset": { "type": "integer" } }, "type": "object" } }, "search": { "type": "string" } }, "type": "object" }, "LeagueItemsUpdateLeagueItemsRequest": { "properties": { "items": { "type": "array", "items": { "properties": { "item_id": { "type": "integer" }, "is_key_asset": { "type": "integer" } }, "type": "object" } }, "search": { "type": "string" } }, "type": "object" }, "LeagueLatestScoutingDatesFilterOptionsRequest": { "properties": { "division_id": { "description": "Restrict the options to a division.", "type": "integer", "nullable": true } }, "type": "object" }, "LeagueLatestScoutingDatesIndexRequest": { "properties": { "division_id": { "description": "Filter properties by division ID.", "type": "integer", "nullable": true }, "per_page": { "description": "Items per page. Defaults to 10.", "type": "integer", "maximum": 20, "minimum": 1, "example": 10 }, "page": { "description": "Page number. Defaults to 1.", "type": "integer", "minimum": 1, "example": 1 }, "properties": { "description": "Column filter: property (team) IDs (comma-separated).", "type": "array", "items": { "type": "integer" }, "nullable": true }, "scouting_market_owners": { "description": "Column filter: owner IDs of the property's representative scouting market (comma-separated).", "type": "array", "items": { "type": "integer" }, "nullable": true }, "sort_by": { "description": "Column to sort the full dataset by.", "type": "string", "nullable": true }, "sort_order": { "description": "Sort direction.", "type": "string", "default": "asc", "enum": [ "asc", "desc" ], "nullable": true } }, "type": "object" }, "LocationForSmartSearchOnBrandsDownloadRequest": { "properties": { "brand": { "type": "string" }, "city": { "type": "string" }, "locatated_in_market": { "type": "string" }, "order_by": { "type": "string" }, "order_direction": { "type": "string" } }, "type": "object" }, "LocationForSmartSearchOnBrandsMetadataRequest": { "required": [ "brand" ], "properties": { "located_in_market": { "description": "Comma separated located in market ids.", "type": "string" }, "market": { "description": "Comma separated market ids.", "type": "string" }, "league": { "description": "Comma separated league ids.", "type": "string" }, "brand": { "description": "Comma separated brand ids.", "type": "string" }, "category": { "description": "Comma separated category ids.", "type": "string" }, "subcategory": { "description": "Comma separated subcategory ids.", "type": "string" }, "city": { "description": "Comma separated city ids.", "type": "string" }, "state": { "description": "Comma separated state ids.", "type": "string" } }, "type": "object" }, "LocationForSmartSearchOnBrandsShowRequest": { "properties": { "located_in_market": { "description": "Comma-separated located-in market IDs.", "type": "string" }, "market": { "description": "Comma-separated target market IDs.", "type": "string" }, "league": { "description": "Comma-separated league IDs.", "type": "string" }, "brand": { "description": "Comma-separated brand IDs.", "type": "string" }, "city": { "description": "Comma-separated city IDs.", "type": "string" }, "category": { "description": "Comma-separated category IDs.", "type": "string" }, "subcategory": { "description": "Comma-separated subcategory IDs.", "type": "string" }, "state": { "description": "Comma-separated state IDs.", "type": "string" }, "order_by": { "description": "Field to order results by.", "type": "string", "enum": [ "brand", "category", "subcategory", "street", "city", "state", "country", "total_deals_count" ] }, "order_direction": { "description": "Sort direction.", "type": "string", "enum": [ "asc", "desc" ] }, "page": { "description": "Page number.", "type": "integer" }, "per_page": { "description": "Number of items per page.", "type": "integer" } }, "type": "object" }, "LocationStoreRequest": { "properties": { "is_us_hq": { "description": "Rejected when the location is being attached to an individual property.", "type": "boolean" }, "street": { "type": "string" }, "city_id": { "type": "integer" }, "zip": { "type": "string" }, "phone": { "type": "string" }, "entity_type": { "type": "string" }, "entity_id": { "type": "integer" } }, "type": "object" }, "LocationUpdateRequest": { "properties": { "is_us_hq": { "description": "Rejected when the location is currently linked to any individual property.", "type": "boolean" }, "street": { "type": "string" }, "city_id": { "type": "integer" }, "zip": { "type": "string" }, "phone": { "type": "string" } }, "type": "object" }, "LogoRecognitionIgnoreBrandsRequest": { "properties": { "brands": { "description": "Array of brand IDs to ignore in logo recognition", "type": "array", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] } }, "type": "object" }, "LogoRecognitionImageProcessRequest": { "required": [ "item_images" ], "properties": { "item_images": { "description": "Array of images to process", "type": "array", "items": { "properties": { "item_value_id": { "description": "The item value ID", "type": "integer" }, "image_id": { "description": "The image ID", "type": "integer" }, "processed": { "description": "Whether the image is processed", "type": "boolean", "default": false } }, "type": "object" } } }, "type": "object" }, "ManageMarketCategoryForCountryRequest": { "required": [ "level", "level_id", "supports" ], "properties": { "id": { "description": "ID for update operations", "type": "integer" }, "name": { "description": "Name of the market grouping", "type": "string" }, "level": { "description": "Territory level (country, continent, generic)", "type": "string", "example": "country" }, "level_id": { "description": "ID of the territory at the specified level", "type": "integer" }, "supports": { "description": "Configuration for supported territory types", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "enabled": { "type": "boolean" } }, "type": "object" } } }, "type": "object" }, "MarketIndexRequest": { "properties": { "with_relationships": { "description": "Additional relationships to include", "type": "array", "items": { "type": "string" } }, "search": { "description": "Search markets by name", "type": "string" }, "markets": { "description": "Filter by specific market IDs", "type": "array", "items": { "type": "integer" } }, "only_categories": { "description": "Filter by category IDs", "type": "array", "items": { "type": "integer" } }, "with_count": { "description": "Include counts for specified relationships", "type": "array", "items": { "type": "string" } }, "with_demographics": { "description": "Include demographics data", "type": "boolean", "example": true } }, "type": "object" }, "MarketStoreUpdateRequest": { "required": [ "name" ], "properties": { "name": { "description": "Name of the market", "type": "string", "example": "New York Metro" }, "market_category_id": { "description": "Market category ID", "type": "integer" }, "market_grouping_id": { "description": "Market grouping ID", "type": "integer" }, "continents": { "description": "Array of continent objects with IDs", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "countries": { "description": "Array of country objects with IDs", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "states": { "description": "Array of state objects with IDs", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "counties": { "description": "Array of county objects with IDs", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } }, "cities": { "description": "Array of city objects with IDs", "type": "array", "items": { "properties": { "id": { "type": "integer" } }, "type": "object" } } }, "type": "object" }, "MintTokenRequest": { "required": [ "user_id" ], "properties": { "user_id": { "type": "integer", "example": 1 } }, "type": "object" }, "LeagueScoutingNoteUpsertRequest": { "properties": { "frequency_duration": { "description": "The frequency duration field must be true or false.", "type": "boolean", "nullable": true }, "spend": { "description": "The spend field must be true or false.", "type": "boolean", "nullable": true }, "athletes_scouted": { "description": "The athletes scouted field must be true or false.", "type": "boolean", "nullable": true }, "athletes_scouted_league_ids": { "description": "The athletes scouted league ids field must be an array.", "type": "array", "items": { "description": "Each athletes scouted league id must be an integer and reference an existing league.", "type": "integer" }, "nullable": true }, "additional_notes": { "description": "The additional notes field must be a string.", "type": "string", "nullable": true }, "platforms_scouted": { "description": "The platforms scouted field must be an array of valid platform values.", "type": "array", "items": { "description": "Each platform must be a valid scouted platform.", "type": "string" }, "nullable": true }, "social_scan_review_weeks": { "description": "The social scan review weeks field must be an integer between 2 and 16.", "type": "integer", "nullable": true } }, "type": "object" }, "AdminOrganizationSurfaceContextUpdateRequest": { "required": [ "context" ], "properties": { "context": { "description": "Freeform administrator-set context for the target organization, injected into Surface LLM prompts for every member alongside the organization's own context. Formatting (markdown / line breaks) is preserved verbatim. Send null or an empty string to clear it.", "type": "string", "maxLength": 20000, "nullable": true } }, "type": "object" }, "OrganizationEvalProposalSaveRequest": { "properties": { "eval_deep_mode_limit": { "type": "integer", "example": "1" } }, "type": "object" }, "OrganizationIndexRequest": { "properties": { "per_page": { "type": "integer", "example": "25" }, "order_by": { "type": "string", "example": "name,types,contract_statuses,contract_payment_types,sales_account,account_manager,contract_onboarding_date,contract_start_date,contract_end_date,contract_auto_renew,properties_count,agencies_count,companies_count,users_count" }, "order": { "type": "string", "example": "asc" }, "name": { "type": "string", "example": "John" }, "types": { "type": "string", "example": "1,2,3" }, "contract_statuses": { "type": "string", "example": "1,2,3" }, "contract_payment_types": { "type": "string", "example": "1,2,3" }, "contract_auto_renew": { "type": "string", "example": "0,1" }, "sales_account": { "type": "string", "example": "John" }, "account_manager": { "type": "string", "example": "John" } }, "type": "object" }, "OrganizationIntercomSyncRequest": { "properties": { "organization_ids": { "description": "Array of organization IDs to sync. If not provided, all organizations will be synced.", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "OrganizationSurfaceContextUpdateRequest": { "required": [ "context" ], "properties": { "context": { "description": "Freeform organization context injected into Surface LLM prompts for every member of the org. Formatting (markdown / line breaks) is preserved verbatim. Send null or an empty string to clear it.", "type": "string", "maxLength": 20000, "nullable": true } }, "type": "object" }, "OrganizationSyncMarketsRequest": { "properties": { "markets": { "type": "string", "example": "1,2,3" } }, "type": "object" }, "OrganizationSyncPropertyTypeRequest": { "properties": { "property_types": { "type": "string", "example": "1,2,3" } }, "type": "object" }, "OrganizationUpdateContractRequest": { "properties": { "account_manager_id": { "type": "integer", "nullable": true }, "sales_user_id": { "type": "integer", "nullable": true }, "contract_auto_renew": { "type": "boolean", "nullable": true }, "contract_start_date": { "type": "string", "example": "2026-01-01", "nullable": true }, "contract_end_date": { "type": "string", "example": "2026-12-31", "nullable": true }, "contract_file_url": { "type": "string", "nullable": true }, "contract_monthly_spend": { "type": "number", "nullable": true }, "contract_onboarding_date": { "type": "string", "nullable": true }, "contract_payment_type_id": { "type": "integer", "nullable": true }, "contract_status_id": { "type": "integer", "nullable": true }, "max_user_seats": { "description": "Seat cap for org-admin user management. `null` disables the feature, `-1` enables it with unlimited seats, `0` is normalized to `null`, and a positive value caps the organization at that many active users. Any other negative value is rejected.", "type": "integer", "minimum": -1, "example": 25, "nullable": true }, "default_user_subscription_cancel_date": { "type": "string", "nullable": true }, "default_user_subscription_plan_id": { "type": "string", "nullable": true }, "default_user_subscription_product_name": { "type": "string", "nullable": true }, "user_email_domain": { "type": "string", "nullable": true }, "subscription_plan_id": { "type": "string", "nullable": true }, "subscription_product_name": { "type": "string", "nullable": true }, "trial_ends_at": { "type": "string", "nullable": true }, "salesforce_id": { "type": "string", "nullable": true }, "account_limit": { "properties": { "organization": { "properties": { "monthly": { "type": "integer", "example": 500 }, "annual": { "type": "integer", "example": 6000 } }, "type": "object" }, "user": { "properties": { "monthly": { "type": "integer", "example": 100 }, "annual": { "type": "integer", "example": 1200 } }, "type": "object" } }, "type": "object" }, "surface_limit": { "description": "Surface usage limits. Use `monthly` for the cap value and `type` for the scope.", "properties": { "monthly": { "type": "integer", "example": 500 }, "type": { "type": "string", "enum": [ "user", "organization" ], "example": "organization" } }, "type": "object" } }, "type": "object" }, "OrganizationUpdateRequest": { "required": [ "name", "organization_type_id", "product_id", "representatives", "representative_id", "representative_type" ], "properties": { "name": { "type": "string", "example": "Acme Sports" }, "organization_type_id": { "type": "integer", "example": 1 }, "product_id": { "type": "integer", "example": 1 }, "mfa_enabled": { "type": "boolean", "example": false }, "contract_status_id": { "type": "integer" }, "representative_id": { "type": "integer", "example": 12362 }, "representative_type": { "type": "string", "enum": [ "brand", "property", "agency" ], "example": "property" }, "representatives": { "type": "array", "items": { "required": [ "representative_id", "representative_type", "is_main" ], "properties": { "representative_id": { "type": "integer", "example": 12362 }, "representative_type": { "type": "string", "enum": [ "brand", "property", "agency" ], "example": "property" }, "is_main": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } }, "type": "object" } }, "users": { "type": "array", "items": { "type": "integer" } }, "teams": { "type": "array", "items": { "type": "integer" } }, "agencies": { "type": "array", "items": { "type": "integer" } }, "companies": { "type": "array", "items": { "type": "integer" } }, "market_access": { "description": "Array or comma-separated list of market IDs", "example": "336,420,337" }, "property_type_access": { "description": "Array or comma-separated list of property-type IDs", "example": "1,5,833" }, "organization_limit_access_type_id": { "description": "Access-limiting mode (FK to organization_limit_access_types). The 'none' row id or null both mean no restriction.", "type": "integer", "example": 2, "nullable": true }, "subcategory_access": { "description": "Array or comma-separated list of subcategory IDs", "example": "14,27" } }, "type": "object" }, "StoreOrganizationTypeRequest": { "required": [ "name" ], "properties": { "name": { "type": "string" }, "properties": { "type": "boolean" }, "brands": { "type": "boolean" }, "agencies": { "type": "boolean" } }, "type": "object" }, "UpdateOrganizationTypeRequest": { "required": [ "name" ], "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "properties": { "type": "boolean" }, "brands": { "type": "boolean" }, "agencies": { "type": "boolean" } }, "type": "object" }, "PartnershipReportIndexRequest": { "properties": { "category": { "type": "string", "example": "1,2,3" }, "subcategory": { "type": "string", "example": "1,2,3" }, "agency": { "type": "string", "example": "1,2,3" }, "league": { "type": "string", "example": "1,2,3" }, "tag": { "type": "string", "example": "1,2,3" }, "publishedBefore": { "type": "string", "example": "2021-01-01" }, "publishedAfter": { "type": "string", "example": "2021-01-01" } }, "type": "object" }, "PartnershipReportWriteRequest": { "properties": { "title": { "type": "string", "example": "Partnership Report Title" }, "description": { "type": "string", "example": "Partnership Report Description" }, "report_file_id": { "type": "integer", "example": "1" }, "report_external_url": { "type": "string", "example": "https://www.example.com" }, "thumbnail_url": { "type": "string", "example": "https://www.example.com" }, "resized_url": { "type": "string", "example": "https://www.example.com" }, "original_url": { "type": "string", "example": "https://www.example.com" }, "published_at": { "type": "string", "example": "2021-01-01" }, "tags": { "type": "array", "items": { "oneOf": [ { "type": "integer" }, { "type": "string" } ] }, "example": "[1, 'test', 2]" }, "brands": { "type": "array", "items": { "type": "integer" }, "example": "[1,2,3]" }, "properties": { "type": "array", "items": { "type": "integer" }, "example": "[1,2,3]" }, "agencies": { "type": "array", "items": { "type": "integer" }, "example": "[1,2,3]" } }, "type": "object" }, "PermissionUpdateRequest": { "properties": { "display_name": { "type": "string" }, "description": { "type": "string" } }, "type": "object" }, "ProductCreateRequest": { "properties": { "name": { "type": "string", "example": "Product 1" }, "badge": { "type": "string", "example": "su,supr,spnd" }, "roles": { "type": "string", "example": "1,2,3" }, "surface_limit": { "properties": { "organization": { "type": "integer", "example": 500, "nullable": true }, "user": { "type": "integer", "example": 100, "nullable": true } }, "type": "object" } }, "type": "object" }, "ProductUpdateRequest": { "properties": { "name": { "type": "string", "example": "Product 1" }, "roles": { "type": "string", "example": "1,2,3" }, "surface_limit": { "properties": { "organization": { "type": "integer", "example": 500, "nullable": true }, "user": { "type": "integer", "example": 100, "nullable": true } }, "type": "object" } }, "type": "object" }, "ReportSharingRecipientsRequest": { "properties": { "report_type": { "description": "Type of report", "type": "string", "enum": [ "user_custom", "saved" ] }, "report_id": { "description": "Report ID: the admin custom report id (custom_reports.id) for user_custom, or the source saved report id (saved_reports.id) for saved", "type": "integer" } }, "type": "object" }, "ReportSharingReportsRequest": { "properties": { "user_id": { "description": "User ID", "type": "integer" } }, "type": "object" }, "RepresentationUpdateRequest": { "properties": { "id": { "description": "ID of the property control", "type": "integer" }, "linkage_type": { "description": "Linkage type of the representation data", "type": "string", "enum": [ "PROPERTY", "LEAGUE", "TV", "RADIO", "DIGITAL", "VENUE", "EVENT", "INDIVIDUAL", "BROADCAST_RIGHTS" ] }, "controlled_property_id": { "description": "ID of the controlled property", "type": "integer" }, "control_value": { "description": "Control value of the representation data" }, "is_asset_based_subplatform": { "description": "Indicates if it's an asset-based subplatform representation", "type": "boolean" }, "notes": { "description": "Notes associated with the with the representation data", "type": "string" }, "season_id": { "description": "Season ID associated with the representation data", "type": "integer" } }, "type": "object" }, "ResetPasswordRequest": { "required": [ "token", "email", "password", "password_confirmation" ], "properties": { "token": { "description": "Password reset token from email", "type": "string" }, "email": { "description": "User's email address", "type": "string", "format": "email" }, "password": { "description": "New password (min 8 chars, mixed case, with symbols)", "type": "string", "format": "password" }, "password_confirmation": { "description": "Password confirmation", "type": "string", "format": "password" } }, "type": "object" }, "StoreRoleRequest": { "required": [ "name" ], "properties": { "name": { "type": "string" }, "display_name": { "type": "string" }, "description": { "type": "string" }, "permissions": { "type": "string", "example": "1,2,3" }, "role_level": { "type": "integer", "example": 40 } }, "type": "object" }, "UpdateRoleRequest": { "properties": { "display_name": { "type": "string" }, "description": { "type": "string" }, "permissions": { "type": "string", "example": "1,2,3" }, "allow": { "description": "When present and true, it will attach one or more permissions to the role.", "type": "boolean" } }, "type": "object" }, "RoleOrientationIndexRequest": { "properties": { "name": { "description": "Filter by name", "type": "string", "example": "sell_side", "nullable": true } }, "type": "object" }, "RoleOrientationStoreRequest": { "required": [ "name" ], "properties": { "name": { "description": "Name of the role orientation", "type": "string", "maxLength": 255, "minLength": 1, "example": "sell_side" } }, "type": "object" }, "RoleOrientationUpdateRequest": { "required": [ "name" ], "properties": { "name": { "description": "Name of the role orientation", "type": "string", "maxLength": 255, "minLength": 1, "example": "buy_side" } }, "type": "object" }, "SavedReportShareRequest": { "required": [ "user_ids" ], "properties": { "user_ids": { "description": "Array of user IDs to share the report with", "type": "array", "items": { "type": "integer" }, "minItems": 1 } }, "type": "object" }, "SavedReportStoreRequest": { "properties": { "name": { "type": "string" }, "type": { "type": "string", "example": "spend-categories|spend-major-assets|spend-deal-builder|spend-comparison|categories|markets|leagues|assets|properties-comparison|brands-comparison|trending-topics|smart-search-results|proposal-evaluator|smart-lists-contacts" }, "url": { "type": "string" }, "payload": { "description": "Report state, persisted as sent. Its shape depends on `type`, and the server reads type-specific keys from it to resolve the report thumbnail. For `trending-topics`, `seasons` is a comma-separated list of four-digit years and `search_term` a comma-separated list of terms.", "type": "object", "example": { "seasons": "2023,2024", "search_term": "nike,adidas" } } }, "type": "object" }, "SavedReportUpdateRequest": { "properties": { "name": { "type": "string" } }, "type": "object" }, "ScoutingGroupsStoreRequest": { "required": [ "name" ], "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "owner_id": { "type": "integer" }, "members": { "type": "string", "example": "123,456,789" } }, "type": "object" }, "ScoutingYoutubeLinkStoreRequest": { "required": [ "youtube_url" ], "properties": { "youtube_url": { "description": "YouTube URL", "type": "string", "example": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } }, "type": "object" }, "ScoutingYoutubeLinkUpdateRequest": { "required": [ "youtube_url" ], "properties": { "youtube_url": { "description": "YouTube URL", "type": "string", "example": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } }, "type": "object" }, "SearchEntityByIdRequest": { "required": [ "id" ], "properties": { "id": { "type": "string" }, "limit": { "type": "integer" } }, "type": "object" }, "SearchEntityRequest": { "properties": { "name": { "type": "string" } }, "type": "object" }, "SearchIndexedRequest": { "required": [ "search_term" ], "properties": { "search_term": { "description": "Term to search the Meilisearch index for", "type": "string" }, "with_relationships": { "description": "Relationships to eager-load on the results", "type": "array", "items": { "type": "string" } }, "team_type_id": { "description": "Filter property results by team type", "type": "integer" }, "excluded_id": { "description": "IDs to exclude from the results", "type": "array", "items": { "type": "integer" } }, "with_deleted": { "description": "Include soft-deleted records", "type": "boolean" }, "is_parent": { "description": "Filter brands/properties by parent vs child", "type": "boolean" }, "is_contact_of": { "description": "Restrict contacts to those belonging to the given entity id", "type": "integer" }, "brand_typo_tolerance": { "description": "Use the brand index with typo tolerance", "type": "boolean" }, "organization_access": { "type": "array", "items": { "type": "string", "enum": [ "brands", "properties", "agencies" ] } }, "linkedin_url": { "type": "string" }, "email": { "type": "string", "format": "email" }, "for_primary_profile": { "type": "boolean" }, "for_secondary_profile": { "type": "boolean" }, "with_organization_users": { "type": "boolean" }, "show_secondary_profiles": { "type": "boolean" } }, "type": "object" }, "SearchSmartOnBrandsRequest": { "properties": { "partner_type": { "type": "object" }, "leagues": { "type": "object" }, "category": { "type": "object" }, "subcategory": { "type": "object" }, "area": { "type": "object" }, "territory": { "type": "object" }, "download": { "type": "boolean" }, "view": { "type": "string" } }, "type": "object" }, "BrightdataPostsDeliveryRequest": { "required": [ "session_id", "gap_id" ], "properties": { "session_id": { "description": "Scraping session ID (query param)", "type": "integer", "example": 42 }, "gap_id": { "description": "Scraping gap ID (query param)", "type": "integer", "example": 7 } }, "type": "object" }, "AssetsBucketsUpdateRequest": { "required": [ "buckets" ], "properties": { "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/BucketAsset" } } }, "type": "object" }, "CurrencyExchangeRateIndexRequest": { "required": [ "season_id" ], "properties": { "season_id": { "type": "integer", "example": 292 } }, "type": "object" }, "CurrencyExchangeRateUpdateRequest": { "required": [ "season_id", "rates" ], "properties": { "season_id": { "type": "integer", "example": 292 }, "rates": { "type": "array", "items": { "properties": { "from": { "type": "string", "example": "EUR" }, "rate": { "type": "number", "format": "float", "example": 1.0478 } }, "type": "object" } } }, "type": "object" }, "DealBucketAssetsGetDealAssetsByBucketsRequest": { "required": [ "property_id", "brand_id", "season_id" ], "properties": { "brand_id": { "type": "integer", "example": "3108" }, "property_id": { "type": "integer", "example": "47" }, "season_id": { "type": "integer", "example": "292" }, "parent_line": { "type": "integer", "example": "0" } }, "type": "object" }, "DealLevelsUpdateRequest": { "required": [ "property_id", "brand_id", "season_id", "label" ], "properties": { "brand_id": { "type": "integer", "example": "3108" }, "property_id": { "type": "integer", "example": "47" }, "season_id": { "type": "integer", "example": "292" }, "level": { "type": "string", "example": "league" } }, "type": "object" }, "DealTypesCreateUpdateRequest": { "required": [ "property_id", "brand_id", "season_id", "label" ], "properties": { "brand_id": { "type": "integer", "example": "3108" }, "property_id": { "type": "integer", "example": "47" }, "season_id": { "type": "integer", "example": "292" }, "type": { "type": "string", "example": "league" }, "parent_line": { "type": "integer", "example": "0" }, "notes": { "type": "string", "example": "notes" } }, "type": "object" }, "DealTypesDeleteRequest": { "required": [ "property_id", "brand_id", "season_id" ], "properties": { "brand_id": { "type": "integer", "example": "3108" }, "property_id": { "type": "integer", "example": "47" }, "season_id": { "type": "integer", "example": "292" } }, "type": "object" }, "AccuracySelectionIndexRequest": { "required": [ "season_id", "property_id" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "6" } }, "type": "object" }, "AccuracySelectionUpdateRequest": { "required": [ "season_id", "property_id", "deal_size", "dollar_off" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "3" }, "deal_size": { "type": "string", "example": "over_twenty_million" }, "dollar_off": { "type": "string", "example": "over_five_million" } }, "type": "object" }, "LeagueAssetBucketsUpdateRequest": { "required": [ "buckets" ], "properties": { "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/BucketLeagueAsset" } } }, "type": "object" }, "SaveCustomAssetBucketForDealRequest": { "required": [ "property_id", "brand_id", "season_id", "asset_id", "original_bucket_id", "custom_bucket_id" ], "properties": { "property_id": { "type": "integer", "example": "85" }, "brand_id": { "type": "integer", "example": "476" }, "season_id": { "type": "integer", "example": "303" }, "parent_line": { "type": "integer", "example": "0" }, "asset_id": { "type": "integer", "example": "1" }, "original_bucket_id": { "type": "integer", "example": "1" }, "custom_bucket_id": { "type": "integer", "example": "2" } }, "type": "object" }, "LeaguePropertyBucketsUpdateRequest": { "required": [ "buckets", "revenue" ], "properties": { "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/BucketLeagueProperty" } }, "revenue": { "$ref": "#/components/schemas/RevenueLeague" } }, "type": "object" }, "DollarOffMetricsHighlightCellRequest": { "required": [ "season_id", "property_id" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "3" }, "standard_deviation_off": { "type": "integer", "example": "2" }, "group": { "type": "integer", "example": "3" } }, "type": "object" }, "DollarOffMetricsRequest": { "required": [ "season_id", "property_id" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "6" } }, "type": "object" }, "GetPropertyDealsWithPredictedRevenuesRequest": { "required": [ "recalculate" ], "properties": { "recalculate": { "type": "boolean" } }, "type": "object" }, "PublishedSeasonUpdateRequest": { "required": [ "season_id" ], "properties": { "season_id": { "type": "integer", "example": "303" }, "is_soft_published": { "type": "boolean", "example": "true" }, "is_hard_published": { "type": "boolean", "example": "false" } }, "type": "object" }, "RevenueDealParentLineUpdateRequest": { "required": [ "id", "season_id", "property_id", "brand_id", "parent_line" ], "properties": { "id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "303" }, "property_id": { "type": "integer", "example": "6" }, "brand_id": { "type": "integer", "example": "357" }, "parent_line": { "type": "integer", "example": "0" } }, "type": "object" }, "RevenueDealPredictedParentLineUpdateRequest": { "required": [ "id", "season_id", "property_id", "brand_id", "parent_line" ], "type": "object", "allOf": [ { "$ref": "#/components/schemas/RevenueDealParentLineUpdateRequest" }, { "properties": { "id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "303" }, "property_id": { "type": "integer", "example": "6" }, "brand_id": { "type": "integer", "example": "357" }, "parent_line": { "type": "integer", "example": "0" }, "is_accepted": { "type": "boolean", "example": "true" }, "is_final": { "type": "boolean", "example": "true" } }, "type": "object" } ] }, "RevenuePropertyUpdateRequest": { "required": [ "revenue" ], "properties": { "revenue": { "$ref": "#/components/schemas/RevenueProperty" } }, "type": "object" }, "RevenueSubcategoryUpdateRequest": { "required": [ "revenue" ], "properties": { "revenue": { "$ref": "#/components/schemas/RevenueSubcategoryResource" } }, "type": "object" }, "AcceptWIPPredictedDealRevenuesRequest": { "required": [ "season_id", "property_id" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "6" } }, "type": "object" }, "DealRevenuesDuplicateRequest": { "required": [ "league_id", "source_season_id", "target_season_id", "increase_percentage" ], "properties": { "league_id": { "type": "integer", "example": "3" }, "source_season_id": { "type": "integer", "example": "303" }, "target_season_id": { "type": "integer", "example": "308" }, "increase_percentage": { "type": "numeric", "example": "5.5" }, "override_low_confidence_block": { "description": "When true, bypasses the safeguard that blocks escalation of 20%-confidence estimates after 3 consecutive escalations at that confidence level. All other confidence downgrades still apply.", "type": "boolean", "example": "false" } }, "type": "object" }, "PropertyReviewDealSeasonsRequest": { "required": [ "property_id", "brand_id", "parent_line" ], "properties": { "property_id": { "type": "integer", "example": "6" }, "brand_id": { "type": "integer", "example": "357" }, "parent_line": { "type": "integer", "example": "0" } }, "type": "object" }, "RevenueDealGetDealDataBySeasonsRequest": { "required": [ "property_id", "brand_id", "parent_line" ], "properties": { "property_id": { "type": "integer", "example": "6" }, "brand_id": { "type": "integer", "example": "357" }, "parent_line": { "type": "integer", "example": "0" } }, "type": "object" }, "RevenueDealGetDealRevenueInSeasonRequest": { "required": [ "property_id", "brand_id", "season" ], "properties": { "property_id": { "type": "integer", "example": "6" }, "brand_id": { "type": "integer", "example": "357" }, "season": { "type": "integer", "example": "2020" }, "parent_line": { "type": "integer", "example": "false" } }, "type": "object" }, "RevenueDealGetPropertyDealRevenuesRequest": { "required": [ "season_id", "property_id" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "property_id": { "type": "integer", "example": "6" } }, "type": "object" }, "RevenueDealUpdateDealRevenuesRequest": { "required": [ "revenues" ], "properties": { "brand_id": { "type": "integer", "example": "1596" }, "property_id": { "type": "integer", "example": "6" }, "parent_line": { "type": "boolean", "example": "false" }, "revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDeal" } }, "multi_year_revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDeal" } } }, "type": "object" }, "UpdatedSubcategoryRevenuesRequest": { "required": [ "season_id", "league_id", "revenuesSubcategory" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "3" }, "revenuesSubcategory": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueSubcategory" } }, "revenueDeals": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDeal" } } }, "type": "object" }, "SubcategoryRevenueFactorsUpdateRequest": { "required": [ "season_id", "league_id", "factors" ], "properties": { "season_id": { "type": "integer", "example": "298" }, "league_id": { "type": "integer", "example": "1" }, "factors": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueSubcategoryFactor" } } }, "type": "object" }, "StatsMappingUpdateRequest": { "title": "Stats Mapping Update Request", "description": "Request schema for updating a stats perform mapping", "required": [ "su_team_id" ], "properties": { "su_team_id": { "description": "SponsorUnited team/property ID to map to", "type": "integer", "example": 456 } }, "type": "object" }, "StatsMappingsGetRequest": { "title": "Stats Mappings Get Request", "description": "Request schema for filtering stats perform mappings", "properties": { "property_id": { "description": "Filter mappings by property id (suTeamId) mapped with StatsPerform", "type": "integer", "example": "123", "nullable": true }, "sport": { "description": "Filter mappings by sport type", "type": "string", "example": "basketball", "nullable": true }, "league_id": { "description": "Filter mappings by league id", "type": "string", "example": "2343h343h23", "nullable": true }, "league_abbreviation": { "description": "Filter mappings by league abbreviation", "type": "string", "example": "nba", "nullable": true }, "league_name": { "description": "Filter mappings by league name (partial match)", "type": "string", "example": "nba", "nullable": true }, "team_name": { "description": "Filter mappings by team name (partial match)", "type": "string", "example": "Lakers", "nullable": true }, "api": { "description": "Filter mappings by StatsPerform API type", "type": "string", "enum": [ "stats_api", "sdapi" ], "example": "stats_api", "nullable": true } }, "type": "object" }, "StatsMappingsLeaguesRequest": { "title": "Stats Mappings Leagues Request", "description": "Request schema for filtering stats perform leagues by sport and api type", "properties": { "sport": { "description": "Filter mappings by sport type", "type": "string", "example": "basketball", "nullable": true }, "api": { "description": "Filter mappings by StatsPerform API type", "type": "string", "enum": [ "stats_api", "sdapi" ], "example": "stats_api", "nullable": true } }, "type": "object" }, "StatsMappingsSportsRequest": { "title": "Stats Mappings Sports Request", "description": "Request schema for filtering stats perform requests by api type", "properties": { "api": { "description": "Filter mappings by StatsPerform API type", "type": "string", "enum": [ "stats_api", "sdapi" ], "example": "stats_api", "nullable": true } }, "type": "object" }, "SuLanguageRequest": { "required": [ "fields" ], "properties": { "fields": { "type": "array", "items": { "$ref": "#/components/schemas/SuLanguage" } } }, "type": "object" }, "SubcategoryIndexRequest": { "properties": { "name": { "description": "Filter subcategories by name (prefix match)", "type": "string", "example": "Car", "nullable": true } }, "type": "object" }, "SubcategoryStoreRequest": { "required": [ "category_id" ], "properties": { "name": { "description": "Name of the subcategory", "type": "string", "example": "Electric Vehicles", "nullable": true }, "category_id": { "description": "ID of the parent category", "type": "string", "example": "1" }, "synopsis": { "description": "Brief description of the subcategory", "type": "string", "example": "Electric and hybrid vehicle manufacturers", "nullable": true }, "always_in_social_review": { "description": "Whether this subcategory is always included in social review", "type": "boolean", "example": false }, "leagues_social_review": { "description": "Array of league IDs for social review", "type": "array", "items": { "type": "integer", "example": 1 } }, "always_in_social_reject": { "description": "Whether brands in this subcategory are always auto-rejected in social scans", "type": "boolean", "example": false }, "leagues_social_reject": { "description": "Array of league IDs for social auto-reject", "type": "array", "items": { "type": "integer", "example": 1 } } }, "type": "object" }, "SubcategoryUpdateRequest": { "properties": { "name": { "description": "Name of the subcategory", "type": "string", "example": "Electric Vehicles", "nullable": true }, "synopsis": { "description": "Brief description of the subcategory", "type": "string", "example": "Electric and hybrid vehicle manufacturers", "nullable": true }, "always_in_social_review": { "description": "Whether this subcategory is always included in social review", "type": "boolean", "example": false }, "leagues_social_review": { "description": "Array of league IDs for social review", "type": "array", "items": { "type": "integer", "example": 1 } }, "always_in_social_reject": { "description": "Whether brands in this subcategory are always auto-rejected in social scans", "type": "boolean", "example": false }, "leagues_social_reject": { "description": "Array of league IDs for social auto-reject", "type": "array", "items": { "type": "integer", "example": 1 } } }, "type": "object" }, "SwapPlanRequest": { "required": [ "billable_id", "subscription_plan_id", "contract_monthly_spend" ], "properties": { "billable_id": { "description": "The billable entity whose plan is swapped. Soft-deleted billables are rejected.", "type": "integer", "example": 17 }, "subscription_plan_id": { "description": "The Stripe price ID to swap to.", "type": "string", "example": "price_1PmxYxC7D8t3rP7mSia7osJP" }, "contract_monthly_spend": { "description": "The contracted monthly spend for the new plan. Stored against the billable's organization.", "type": "number", "format": "float", "example": 313.75 } }, "type": "object" }, "AdminUserSurfaceContextUpdateRequest": { "required": [ "context" ], "properties": { "context": { "description": "Freeform administrator-set context for the target user, injected into Surface LLM prompts alongside the user's own context. Formatting (markdown / line breaks) is preserved verbatim. Send null or an empty string to clear it.", "type": "string", "maxLength": 20000, "nullable": true } }, "type": "object" }, "SurfaceUserContextUpdateRequest": { "required": [ "context" ], "properties": { "context": { "description": "Freeform user context injected into Surface LLM prompts. Formatting (markdown / line breaks) is preserved verbatim. Send null or an empty string to clear it.", "type": "string", "maxLength": 20000, "nullable": true } }, "type": "object" }, "TagIndexRequest": { "properties": { "search": { "type": "string" } }, "type": "object" }, "TagUpdateRequest": { "properties": { "old_tag": { "type": "string" }, "new_tag": { "type": "string" } }, "type": "object" }, "TaskStoreRequest": { "properties": { "scraping_session_id": { "type": "integer" }, "type": { "type": "string" }, "entity_id": { "type": "integer" }, "entity_type": { "type": "string" }, "invalid_data": { "type": "string" } }, "type": "object" }, "TaskUpdateRequest": { "properties": { "session_id": { "type": "integer" }, "type": { "type": "string" }, "entity_id": { "type": "integer" }, "entity_type": { "type": "string" }, "invalid_data": { "type": "string" } }, "type": "object" }, "StorePropertyContactRequest": { "required": [ "name" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" } }, "type": "object" }, "UpdatePropertyContactEmailStatusRequest": { "required": [ "id", "email_status", "email_status_updated" ], "properties": { "id": { "type": "integer" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" } }, "type": "object" }, "UpdatePropertyContactRequest": { "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "position": { "type": "string" }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "notes": { "type": "string" }, "suggested": { "type": "boolean" }, "previous_suggested": { "type": "boolean" }, "linkedin_data": { "type": "object" } }, "type": "object" }, "TranscriptionWebhookRequest": { "required": [ "request_id", "task_id", "status" ], "properties": { "event_id": { "type": "string", "format": "uuid" }, "correlation_id": { "description": "Echoed audio id used for tracing", "type": "string", "maxLength": 255, "nullable": true }, "request_id": { "type": "string" }, "task_id": { "type": "string" }, "type": { "type": "string", "example": "transcription" }, "status": { "type": "string", "enum": [ "transcribe-in-progress", "transcribe-job-creation-failed", "matching-in-progress", "transcribe-matching-failed", "matching-finished" ] }, "timestamp": { "type": "string", "format": "date-time" }, "result": { "type": "object" }, "error": { "type": "object" } }, "type": "object" }, "DealManagerReassignRequest": { "required": [ "to_user_id" ], "properties": { "to_user_id": { "description": "Id of the user that will receive the Deal Manager profiles and contacts.", "type": "integer" } }, "type": "object" }, "OrgAdminUserCreateRequest": { "required": [ "name", "email" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "role_orientation_id": { "type": "integer", "nullable": true }, "person_profile_job_role_id": { "type": "integer", "nullable": true }, "job_title": { "type": "string", "nullable": true }, "phone_country": { "type": "string", "nullable": true }, "phone_number": { "type": "string", "nullable": true }, "mfa_preference": { "type": "integer", "default": 1, "enum": [ 1, 2 ] }, "linkedin_url": { "type": "string", "format": "uri", "nullable": true }, "facebook_url": { "type": "string", "format": "uri", "nullable": true }, "twitter_url": { "type": "string", "format": "uri", "nullable": true }, "instagram_url": { "type": "string", "format": "uri", "nullable": true }, "permissions": { "description": "Permission slugs to grant to the new user. Slugs with a truthy value are attached as direct user permissions; falsy values are ignored.", "type": "object", "example": { "deal-tracker-manager": true, "edit-billing": false }, "nullable": true, "additionalProperties": { "type": "boolean" } } }, "type": "object" }, "OrgAdminUserUpdateRequest": { "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "email": { "type": "string", "format": "email" } }, "type": "object" }, "UserAllRequest": { "properties": { "name": { "description": "Filter by user name", "type": "string" }, "role": { "description": "Filter by role IDs", "type": "array", "items": { "type": "integer" } }, "organization": { "description": "Filter by organization IDs", "type": "array", "items": { "type": "integer" } }, "contract_status": { "description": "Filter by contract status", "type": "array", "items": { "type": "string" } }, "external": { "description": "Filter by external status (0 or 1)", "type": "integer", "enum": [ 0, 1 ] }, "active": { "description": "Filter by active status (0 or 1)", "type": "integer", "enum": [ 0, 1 ] }, "order_by": { "description": "Field to order results by", "type": "string" }, "order": { "description": "Sort order direction", "type": "string", "enum": [ "asc", "desc" ] }, "page": { "description": "Page number for pagination", "type": "integer" } }, "type": "object" }, "UserCookiesRequest": { "properties": { "user_linkedin_cookie": { "description": "LinkedIn cookie data", "properties": { "user_id": { "description": "User ID", "type": "integer" }, "cookie": { "description": "LinkedIn session cookie (min 15 chars)", "type": "string", "minLength": 15 }, "user_agent": { "description": "Browser user agent string", "type": "string" } }, "type": "object" }, "user_facebook_cookie": { "description": "Facebook cookie data array", "type": "array", "items": { "properties": { "user_id": { "description": "User ID", "type": "integer" }, "user_cookie": { "description": "Facebook user cookie", "type": "string", "minLength": 3 }, "session_cookie": { "description": "Facebook session cookie", "type": "string", "minLength": 3 } }, "type": "object" } } }, "type": "object" }, "UserCreateRequest": { "required": [ "name", "email", "password", "role" ], "properties": { "name": { "description": "User's full name", "type": "string" }, "email": { "description": "User's email address", "type": "string", "format": "email" }, "password": { "description": "Password (min 8 chars, mixed case, letters, symbols)", "type": "string", "format": "password" }, "role": { "description": "Role ID to assign to user", "type": "integer" }, "person_profile_job_role_id": { "description": "Job role ID from person profiles", "type": "integer" }, "job_title": { "description": "User's job title", "type": "string" }, "linkedin_url": { "description": "LinkedIn profile URL", "type": "string" }, "facebook_url": { "description": "Facebook profile URL", "type": "string" }, "twitter_url": { "description": "Twitter/X profile URL", "type": "string" }, "instagram_url": { "description": "Instagram profile URL", "type": "string" }, "organizations": { "description": "Organization IDs to associate", "type": "array", "items": { "type": "integer" } }, "permissions": { "description": "Permission strings to assign", "type": "array", "items": { "type": "string" } }, "is_external": { "description": "Whether user is external", "type": "boolean" }, "force_new_password": { "description": "Force password change on first login", "type": "boolean" }, "send_credentials": { "description": "Send credentials email to user", "type": "boolean" }, "template": { "description": "Email template to use for credentials", "type": "string" }, "role_orientation_id": { "description": "Role orientation ID (1=sell_side, 2=buy_side, 3=student)", "type": "integer" } }, "type": "object" }, "UserDownloadFileRequest": { "required": [ "command" ], "properties": { "command": { "description": "Export command: TasksExportInvalidLinkedin, TasksExportInvalidSocial, or TasksExportInvalidEmails", "type": "string", "enum": [ "TasksExportInvalidLinkedin", "TasksExportInvalidSocial", "TasksExportInvalidEmails" ] }, "payload": { "description": "Optional payload (e.g. filters)", "type": "object" } }, "type": "object" }, "UserExportRequest": { "properties": { "active": { "description": "Filter by active status (0 or 1)", "type": "integer", "enum": [ 0, 1 ] }, "order_by": { "description": "Field to order results by", "type": "string" }, "order": { "description": "Sort order direction", "type": "string", "enum": [ "asc", "desc" ] } }, "type": "object" }, "UserForReportSharingRequest": { "properties": { "role_orientation": { "description": "Filter by role orientation IDs. Array or comma-separated string." }, "user_job_role": { "description": "Filter by person profile job role IDs. Array or comma-separated string." }, "user_role": { "description": "Filter by user role IDs. Array or comma-separated string." }, "organization": { "description": "Filter by organization IDs. Array or comma-separated string." }, "organization_type": { "description": "Filter by organization type IDs. Array or comma-separated string." }, "organization_product": { "description": "Filter by organization product IDs. Array or comma-separated string." }, "organization_account_manager": { "description": "Filter by organization account manager user IDs. Array or comma-separated string." }, "representative": { "description": "Filter by representative IDs. Array or comma-separated string." }, "league": { "description": "Filter by league IDs (property/team representatives). Array or comma-separated string." }, "subcategory": { "description": "Filter by subcategory IDs ({company} representatives). Array or comma-separated string." }, "genre": { "description": "Filter by genre IDs (via property/team representative leagues). Array or comma-separated string." }, "subgenre": { "description": "Filter by subgenre IDs (via property/team representative leagues). Array or comma-separated string." }, "category": { "description": "Filter by category IDs (via {company} representative subcategories). Array or comma-separated string." }, "user_name": { "description": "Search by user name (partial match).", "type": "string" }, "job_title": { "description": "Search by job title (partial match).", "type": "string" }, "last_activity_from": { "description": "Filter by last activity on or after this date.", "type": "string", "format": "date-time" }, "last_activity_to": { "description": "Filter by last activity on or before this date.", "type": "string", "format": "date-time" }, "reports_received_min": { "description": "Filter by minimum number of reports received.", "type": "integer" }, "last_received_date_from": { "description": "Filter by last received report date on or after this date.", "type": "string", "format": "date-time" }, "last_received_date_to": { "description": "Filter by last received report date on or before this date.", "type": "string", "format": "date-time" }, "reports_opened_min": { "description": "Filter by minimum number of reports opened.", "type": "integer" }, "last_opened_date_from": { "description": "Filter by last opened report date on or after this date.", "type": "string", "format": "date-time" }, "last_opened_date_to": { "description": "Filter by last opened report date on or before this date.", "type": "string", "format": "date-time" }, "page": { "description": "Page number for pagination", "type": "integer" }, "per_page": { "description": "Items per page (max 1000)", "type": "integer", "maximum": 1000 } }, "type": "object" }, "UserGetByEmailRequest": { "required": [ "email" ], "properties": { "email": { "description": "Email address to search for", "type": "string", "format": "email" } }, "type": "object" }, "UserIntercomSyncRequest": { "properties": { "user_ids": { "description": "Array of user IDs to sync. If not provided, all users will be synced.", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "UserProfileUpdateRequest": { "required": [ "name", "email", "id" ], "properties": { "name": { "type": "string" }, "avatar": { "type": "string" }, "email": { "type": "email" }, "phone": { "type": "string" }, "work_phone": { "type": "string" }, "email_status": { "type": "string" }, "email_status_updated": { "type": "boolean" }, "manual_email_status": { "type": "string" }, "manual_email_status_updated_at": { "type": "string", "format": "date-time" }, "linkedin": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "id": { "type": "integer" } }, "type": "object" }, "UserRepresentativeRequest": { "properties": { "search_term": { "type": "string" } }, "type": "object" }, "UserSearchRequest": { "required": [ "search" ], "properties": { "search": { "type": "string" }, "is_external": { "type": "boolean" }, "organization": { "type": "string" }, "with_deleted": { "type": "boolean" } }, "type": "object" }, "UserUpdateMfaPreferenceRequest": { "required": [ "mfa_preference" ], "properties": { "mfa_preference": { "type": "integer" } }, "type": "object" }, "UserUpdateRequest": { "required": [ "name", "email", "role" ], "properties": { "name": { "type": "string" }, "avatar": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "integer" }, "person_profile_job_role_id": { "type": "integer" }, "job_title": { "type": "string" }, "linkedin_url": { "type": "string" }, "facebook_url": { "type": "string" }, "twitter_url": { "type": "string" }, "instagram_url": { "type": "string" }, "organization": { "type": "array", "items": { "$ref": "#/components/schemas/Organization" } }, "is_external": { "type": "boolean" }, "force_new_password": { "type": "boolean" }, "role_orientation_id": { "description": "Role orientation ID (1=sell_side, 2=buy_side, 3=student)", "type": "integer" } }, "type": "object" }, "ValidateUserEmailRequest": { "required": [ "email" ], "properties": { "email": { "type": "string" } }, "type": "object" }, "ValidateUserPhoneNumberRequest": { "required": [ "phone_country", "phone_number" ], "properties": { "phone_country": { "type": "string" }, "phone_number": { "type": "string" } }, "type": "object" }, "VerifyUserPhoneNumberRequest": { "required": [ "pin", "e164_phone_number" ], "properties": { "pin": { "type": "string" }, "e164_phone_number": { "type": "string" } }, "type": "object" }, "UserCustomReportRenameRequest": { "required": [ "name" ], "properties": { "name": { "description": "New report name", "type": "string", "maxLength": 255 } }, "type": "object" }, "UserEventAllRequest": { "required": [ "page" ], "properties": { "page": { "description": "Page number for pagination", "type": "integer" }, "per_page": { "description": "Number of items per page", "type": "integer" }, "status": { "description": "Filter by event status codes", "type": "array", "items": { "type": "integer" } }, "user": { "description": "Filter by user IDs", "type": "array", "items": { "type": "integer" } }, "scouting_groups": { "description": "Filter by scouting group IDs", "type": "array", "items": { "type": "integer" } }, "season": { "description": "Filter by season IDs", "type": "array", "items": { "type": "integer" } }, "type": { "description": "Filter by event type codes", "type": "array", "items": { "type": "integer" } }, "property_id": { "description": "Filter by property ID", "type": "integer" }, "scouting_priority": { "description": "Filter by scouting priority levels", "type": "array", "items": { "type": "integer" } }, "leagues": { "description": "Filter by league IDs", "type": "array", "items": { "type": "integer" } }, "league_owner": { "description": "Filter by league owner ID", "type": "integer" }, "scouting_markets": { "description": "Filter by scouting market IDs", "type": "array", "items": { "type": "integer" } }, "property_name": { "description": "Filter by property name", "type": "string" }, "division_name": { "description": "Filter by division name", "type": "string" }, "scout_name": { "description": "Filter by scout name", "type": "string" }, "order_by": { "description": "Field to order results by", "type": "string" }, "order": { "description": "Sort order direction", "type": "string", "enum": [ "asc", "desc" ] }, "has_past_due_date": { "description": "Filter by past due date status", "type": "boolean" } }, "type": "object" }, "UserEventCreateOrUpdateRequest": { "required": [ "status" ], "properties": { "status": { "description": "Event status code", "type": "integer" }, "type": { "description": "Event type code", "type": "integer" }, "due_date": { "description": "Event due date", "type": "string", "format": "date-time" }, "attended_date": { "description": "Date event was attended", "type": "string", "format": "date-time" }, "initial_note": { "description": "Initial note for the event", "type": "string" }, "new_user_id": { "description": "New user ID to reassign event to", "type": "integer" } }, "type": "object" }, "UserEventUploadsStoreRequest": { "properties": { "media_id": { "type": "integer" }, "media_type": { "type": "string" } }, "type": "object" }, "UserSettingCreateRequest": { "required": [ "type", "payload" ], "properties": { "type": { "description": "Setting type identifier", "type": "string" }, "payload": { "description": "Setting payload data", "type": "object" }, "userAgent": { "description": "Browser user agent string", "type": "string" } }, "type": "object" }, "UserSettingUpdateRequest": { "required": [ "payload" ], "properties": { "payload": { "description": "Setting payload data", "type": "object" }, "userAgent": { "description": "Browser user agent string", "type": "string" } }, "type": "object" }, "VortexBulkAddRequest": { "required": [ "user_id", "companies", "properties", "items" ], "properties": { "user_id": { "description": "ID of the user submitting the scouting session", "type": "integer" }, "isQuickAdd": { "description": "Whether this is a quick-add session (always true for vortex)", "type": "boolean", "default": true }, "companies": { "description": "Brands with resolved core-api IDs", "type": "array", "items": { "required": [ "id" ], "properties": { "id": { "description": "Brand ID", "type": "integer" } }, "type": "object" } }, "properties": { "description": "Properties with their associated events", "type": "array", "items": { "required": [ "id", "events" ], "properties": { "id": { "description": "Property / team ID", "type": "integer" }, "events": { "type": "array", "items": { "required": [ "id", "season", "event_type", "scheduled" ], "properties": { "id": { "description": "Event ID (must pre-exist)", "type": "integer" }, "season": { "description": "Season year", "type": "integer" }, "event_type": { "type": "string", "enum": [ "season", "single", "multi", "social", "twitter_scan", "facebook_scan", "instagram_scan", "tiktok_scan" ] }, "scheduled": { "type": "string", "format": "date-time", "nullable": true }, "startDate": { "type": "string", "format": "date", "nullable": true }, "endDate": { "type": "string", "format": "date", "nullable": true } }, "type": "object" } } }, "type": "object" } }, "items": { "description": "Placement items with counts", "type": "array", "items": { "required": [ "id" ], "properties": { "id": { "description": "Item ID", "type": "integer" }, "frequency": { "description": "Occurrence count", "type": "integer" }, "value": { "type": "number", "format": "float", "nullable": true } }, "type": "object" } } }, "type": "object" }, "VortexCreateEventRequest": { "required": [ "user_id", "hometeam_id", "name", "event_type", "season" ], "properties": { "user_id": { "description": "ID of the user to assign this event to", "type": "integer" }, "hometeam_id": { "description": "ID of the home team / property", "type": "integer" }, "awayteam_id": { "description": "ID of the away team (defaults to hometeam_id if omitted)", "type": "integer", "nullable": true }, "name": { "description": "Event name", "type": "string" }, "event_type": { "description": "Type of event", "type": "string", "enum": [ "season", "single", "multi", "social" ] }, "season": { "description": "Season year (e.g. 2026)", "type": "integer" }, "scheduled": { "description": "ISO 8601 scheduled datetime", "type": "string", "format": "date-time", "nullable": true }, "venue_id": { "description": "Venue ID", "type": "integer", "nullable": true }, "attended_date": { "description": "When the scout was demonstrably on site \u2014 the earliest photo capture time. Falls back to scheduled when omitted.", "type": "string", "format": "date-time", "nullable": true } }, "type": "object" }, "VortexUserEventNotesStoreRequest": { "required": [ "user_id", "event_id", "property_id", "notes" ], "properties": { "user_id": { "description": "ID of the scout the notes belong to", "type": "integer" }, "event_id": { "description": "Event ID (must pre-exist)", "type": "integer" }, "property_id": { "description": "Property / team ID being scouted", "type": "integer" }, "notes": { "description": "Notes to attach to the user event", "type": "array", "items": { "required": [ "content" ], "properties": { "content": { "description": "Note body", "type": "string" } }, "type": "object" } } }, "type": "object" }, "VortexUserEventUploadsStoreRequest": { "required": [ "user_id", "event_id", "property_id", "uploads" ], "properties": { "user_id": { "description": "ID of the scout the session belongs to", "type": "integer" }, "event_id": { "description": "Event ID (must pre-exist)", "type": "integer" }, "property_id": { "description": "Property / team ID being scouted", "type": "integer" }, "uploads": { "description": "Session-level media to attach to the user event (e.g. scouting photos uploaded via POST /api/vortex/upload-image-from-url)", "type": "array", "items": { "required": [ "media_id", "media_type" ], "properties": { "media_id": { "description": "Image / Video / Audio ID", "type": "integer" }, "media_type": { "type": "string", "enum": [ "image", "video", "audio" ] } }, "type": "object" } } }, "type": "object" }, "GetBrandClipTimingsRequest": { "description": "Request parameters for retrieving brand clip timings", "properties": { "user_event_id": { "description": "User event ID to retrieve brand clip timings for. Returns the most recent link if multiple exist.", "type": "integer", "example": 123 }, "scouting_youtube_link_id": { "description": "Scouting YouTube link ID to retrieve brand clip timings for", "type": "integer", "example": 456 } }, "type": "object" }, "AgencyLightResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" } }, "type": "object" }, "AgencyServicesIndexResource": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "service_type": { "type": "array", "items": { "$ref": "#/components/schemas/AgencyServicesTypeResource" } } }, "type": "object" } }, "AgencyServicesResource": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Type 1" }, "service_type": { "type": "array", "items": { "$ref": "#/components/schemas/AgencyServicesTypeResource" } } }, "type": "object" }, "AgencyServicesTypeIndexResource": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "AgencyServicesTypeResource": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Type 1" } }, "type": "object" }, "AgencyShowStoreUpdateResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Agency" }, { "properties": { "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSlim" } } }, "type": "object" }, { "properties": { "companies": { "type": "array", "items": { "$ref": "#/components/schemas/CompanySlim" } } }, "type": "object" }, { "properties": { "properties": { "type": "array", "items": { "$ref": "#/components/schemas/PropertySlim" } } }, "type": "object" } ] }, "AssetGroupingIndexResource": { "type": "array", "items": { "$ref": "#/components/schemas/AssetGroupingResource" } }, "AssetGroupingResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "icon": { "type": "string" }, "media_order": { "type": "integer" }, "subgroupings_count": { "type": "integer" } }, "type": "object" }, "AssetIndexResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Item" }, { "type": "string", "property": "subplatformName" }, { "type": "string", "property": "platformName" } ] }, "AssetResource": { "properties": { "id": { "description": "Asset ID", "type": "integer" }, "name": { "description": "Asset name", "type": "string" }, "description": { "description": "Asset description", "type": "string", "nullable": true }, "default_rank": { "description": "Default rank for the asset", "type": "integer" }, "item_platform_id": { "description": "Platform ID", "type": "integer" }, "item_subplatform_id": { "description": "Subplatform ID", "type": "integer" }, "item_grouping_id": { "description": "Grouping ID", "type": "integer" }, "hasFrequency": { "description": "Whether the asset has frequency", "type": "boolean" }, "hasDescription": { "description": "Whether the asset has description", "type": "boolean" }, "hasImages": { "description": "Whether the asset has images", "type": "boolean" }, "hasVideos": { "description": "Whether the asset has videos", "type": "boolean" }, "hasSocialMediaValue": { "description": "Whether the asset has social media value", "type": "boolean" }, "hasAmount": { "description": "Whether the asset has amount", "type": "boolean" }, "is_premium": { "description": "Whether the asset is premium", "type": "boolean" }, "isSponsor": { "description": "Whether the asset is sponsor", "type": "boolean" }, "isTv": { "description": "Whether the asset is TV", "type": "boolean" }, "isRadio": { "description": "Whether the asset is radio", "type": "boolean" }, "isVendor": { "description": "Whether the asset is vendor", "type": "boolean" }, "isSocial": { "description": "Whether the asset is social", "type": "boolean" }, "isDigital": { "description": "Whether the asset is digital", "type": "boolean" }, "isPrint": { "description": "Whether the asset is print", "type": "boolean" }, "isOutOfHome": { "description": "Whether the asset is out of home", "type": "boolean" }, "definition": { "description": "Asset definition name", "type": "string", "nullable": true }, "synonyms": { "description": "Array of synonym strings", "type": "array", "items": { "type": "string" } } }, "type": "object" }, "AssetSubgroupingIndexResource": { "properties": { "groupings": { "type": "object", "example": [ "tag1", "tag2", "tag3" ] }, "subgroupings": { "$ref": "#/components/schemas/AssetSubgroupingResource" } }, "type": "object" }, "AssetSubgroupingIntentResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "icon": { "type": "string" }, "tag": { "type": "string" }, "media_order": { "type": "integer" }, "items_count": { "type": "integer" }, "item_values_count": { "type": "integer" }, "audits_count": { "type": "integer" } }, "type": "object" }, "AssetSubgroupingResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "icon": { "type": "string" }, "tag": { "type": "string" }, "media_order": { "type": "integer" }, "grouping": { "$ref": "#/components/schemas/AssetGroupingResource" } }, "type": "object" }, "AttendanceResource": { "properties": { "id": { "type": "integer" }, "property_id": { "type": "integer" }, "season_id": { "type": "integer" }, "season": { "type": "string" }, "league_name": { "type": "string" }, "attendance_average": { "type": "integer" }, "attendance_total": { "type": "integer" }, "is_added_by_api": { "type": "boolean" }, "stats_mapping_id": { "type": "integer", "nullable": true }, "stats_sport": { "type": "string", "nullable": true }, "stats_sport_id": { "type": "integer", "nullable": true }, "stats_league_id": { "type": "integer", "nullable": true }, "stats_league_abbreviation": { "type": "string", "nullable": true }, "stats_league_name": { "type": "string", "nullable": true }, "stats_team_id": { "type": "integer", "nullable": true }, "stats_team_name": { "type": "string", "nullable": true }, "stats_api": { "type": "string", "nullable": true } }, "type": "object" }, "AudioResource": { "properties": { "id": { "type": "integer", "example": 1 }, "original_name": { "type": "string", "example": "test.mp3" }, "stored_name": { "type": "string", "example": "test-1111-2222.mp3" }, "vtt_url": { "type": "string", "example": "processed/test-1111-2222.vtt" }, "processed_json_file_url": { "type": "string", "example": "processed/test-1111-2222.json" }, "original_file_size": { "type": "string", "example": "123456" }, "item_subplatform_id": { "description": "Restricts asset matching to this subplatform during transcription", "type": "integer", "nullable": true } }, "type": "object" }, "AudioDownloadLinkResource": { "properties": { "id": { "description": "Audio download link ID", "type": "integer", "example": 1 }, "url": { "description": "Audio download URL", "type": "string", "example": "https://example.com/audio/download.mp3" }, "createdAt": { "description": "Creation timestamp", "type": "string", "format": "date-time", "example": "2023-01-01T12:00:00.000000Z" }, "updatedAt": { "description": "Last update timestamp", "type": "string", "format": "date-time", "example": "2023-01-01T12:00:00.000000Z" } }, "type": "object" }, "ReviewMetadataResource": { "properties": { "brands": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "platforms": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "subplatforms": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "assets": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" }, "AuditSynonymCollection": { "description": "List of audit synonyms.", "type": "array", "items": { "$ref": "#/components/schemas/AuditSynonymResource" } }, "AuditSynonymResource": { "properties": { "id": { "type": "integer" }, "brand": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "synonym": { "type": "string" }, "transcription": { "type": "string" } }, "type": "object" }, "BrandCompetitorReviewItemResource": { "properties": { "id": { "type": "integer", "example": 12345 }, "raw_competitor_name": { "type": "string", "example": "Pepsi Inc." }, "normalized_name": { "type": "string", "example": "pepsi" }, "suggested_score": { "type": "integer", "example": 87, "nullable": true }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "superseded" ], "example": "pending" }, "rejection_reason": { "type": "string", "enum": [ "not_a_brand", "not_on_platform", "scraper_noise", "other" ], "example": null, "nullable": true }, "note": { "type": "string", "example": null, "nullable": true }, "ingestion_run_id": { "type": "string", "example": "01HFK8MZ4Y3R6XPC8KH3D2VVPS", "nullable": true }, "first_seen_at": { "type": "string", "format": "date-time", "example": "2026-05-20T14:32:11+00:00" }, "last_seen_at": { "type": "string", "format": "date-time", "example": "2026-05-24T08:11:02+00:00" }, "resolved_at": { "type": "string", "format": "date-time", "example": null, "nullable": true }, "source_brand": { "properties": { "id": { "type": "integer", "example": 4711 }, "name": { "type": "string", "example": "Coca-Cola Company" }, "logo": { "type": "string", "example": null, "nullable": true } }, "type": "object" }, "suggested_target": { "properties": { "id": { "type": "integer", "example": 9001 }, "name": { "type": "string", "example": "Pepsi" }, "logo": { "type": "string", "example": null, "nullable": true } }, "type": "object", "nullable": true }, "resolution_brand": { "properties": { "id": { "type": "integer", "example": 9001 }, "name": { "type": "string", "example": "Pepsi" }, "logo": { "type": "string", "example": null, "nullable": true } }, "type": "object", "nullable": true }, "resolved_by": { "properties": { "id": { "type": "integer", "example": 42 }, "name": { "type": "string", "example": "Jane Reviewer", "nullable": true }, "email": { "type": "string", "example": "jane@sponsorunited.com", "nullable": true } }, "type": "object", "nullable": true }, "candidates": { "description": "Re-hydrated from candidates_payload using the current companies state.", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 9001 }, "name": { "type": "string", "example": "Pepsi" }, "logo": { "type": "string", "example": null, "nullable": true }, "score": { "type": "integer", "example": 87 }, "relationship": { "type": "string", "enum": [ "parent", "subsidiary", "sibling" ], "example": null, "nullable": true }, "exists": { "description": "False when the candidate id no longer points to an active brand.", "type": "boolean", "example": true } }, "type": "object" } }, "matcher_version": { "type": "string", "example": "v1", "nullable": true } }, "type": "object" }, "BrandSynonymIndexResource": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "synonym": { "type": "string" } }, "type": "object" } }, "BrandSynonymResource": { "properties": { "id": { "type": "integer" }, "brand_id": { "type": "integer" }, "synonym": { "type": "string" } }, "type": "object" }, "BrandFinancialDataResource": { "description": "A brand's financial data for one fiscal year", "properties": { "id": { "type": "integer" }, "revenue_tier": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object", "nullable": true }, "revenue_range_low_usd": { "description": "Lower bound of the revenue range in USD. Equal to revenue_range_high_usd for public companies (the single reported figure); private companies may carry a real spread", "type": "string", "nullable": true }, "revenue_range_high_usd": { "description": "Upper bound of the revenue range in USD", "type": "string", "nullable": true }, "most_recent_fiscal_year": { "type": "string" }, "estimate_type": { "type": "string", "nullable": true }, "is_public": { "type": "boolean", "nullable": true }, "ticker": { "description": "Stock ticker symbol; only set for public companies", "type": "string", "nullable": true } }, "type": "object" }, "CompanyIndexResource": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "CompanyLightResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" }, "subcategories": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "categories": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" }, "CompanyResource": { "description": "Brand details with related data (agencies, organizations, primary/secondary profiles)", "type": "object" }, "ActiveCuratedNewsResource": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/CuratedNews" }, { "properties": { "companies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "subcategory_id": { "type": "integer" }, "approved": { "type": "boolean" } }, "type": "object" } } }, "type": "object" }, { "properties": { "teams": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "league_id": { "type": "integer" } }, "type": "object" } } }, "type": "object" }, { "properties": { "agencies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } } }, "type": "object" }, { "properties": { "reporter": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer" }, "person_profile": { "$ref": "#/components/schemas/PersonProfile" } }, "type": "object" } ] } }, "type": "object" }, { "properties": { "tags": { "type": "array", "items": { "$ref": "#/components/schemas/NewsTags" } } }, "type": "object" } ] } }, "AnalyseCuratedNewsResource": { "properties": { "url": { "type": "string" }, "status": { "description": "`success` = newly queued for analysis; `already_exists` = the article was already in the queue (the submitter is attached as a reporter, nothing re-dispatched); `failed` = could not be processed.", "type": "string", "enum": [ "success", "already_exists", "failed" ] }, "is_new": { "description": "True only when this submission created and queued a new article. False for `already_exists` and `failed`.", "type": "boolean" }, "curated_news": { "properties": { "id": { "type": "integer" }, "url": { "type": "string" }, "status": { "type": "string" }, "reporter_id": { "type": "integer" }, "ingestion_request_id": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time" } }, "type": "object", "nullable": true }, "error": { "type": "string", "nullable": true } }, "type": "object" }, "AnalyseCuratedNewsResultsResource": { "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/AnalyseCuratedNewsResource" } } }, "type": "object" }, "CuratedNewsArticlePreviewResource": { "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "image": { "type": "string" } }, "type": "object" }, "NewsAssetResource": { "properties": { "id": { "description": "Serialises a {@see NewsAsset} row for the Article Analysis view's\nassets table. Hydrates the `item` payload (canonical catalog row,\nincl. platform/subplatform ids) when set and always emits\n`match_candidates` (as `[]` when no top-K available).", "type": "integer" }, "curated_news_id": { "type": "integer" }, "suggested_name": { "type": "string" }, "confidence": { "type": "number", "format": "float" }, "match_status": { "type": "string", "enum": [ "pending", "auto_match", "needs_review", "no_match", "confirmed", "dismissed" ] }, "source": { "type": "string", "enum": [ "extracted", "manual" ] }, "context": { "type": "string", "nullable": true }, "match_candidates": { "type": "array", "items": { "type": "object" } }, "item": { "properties": { "id": { "type": "integer" }, "name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "item_platform_id": { "type": "integer" }, "item_subplatform_id": { "type": "integer" } }, "type": "object", "nullable": true }, "created_by": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "NewsContactAddResultsResource": { "properties": { "results": { "type": "array", "items": { "properties": { "news_contact_id": { "description": "Per-row outcome of an \"Add contacts selected\" request.\n\nAlways one entry per selected id, in the order the rows were read, so a partial\nfailure is visible rather than swallowed by a single overall status.", "type": "integer", "example": 4711 }, "status": { "description": "A row the reviewer selected that did not end up added is `failed`, with the reason in `message`. The stored add_status is retryable, so re-selecting it tries again.", "type": "string", "enum": [ "created", "updated", "processing", "needs_review", "already_added", "forbidden", "failed" ] }, "contact_id": { "description": "The platform contact this row resolved to.", "type": "integer", "nullable": true }, "message": { "description": "Readable reason, present on forbidden and failed.", "type": "string", "nullable": true } }, "type": "object" } } }, "type": "object" }, "NewsMatchStatsResource": { "properties": { "days": { "description": "Serialises the admin news contact/quote match-status observability report\n(OP-969): the look-back window plus the contact and quote stat blocks.", "type": "integer" }, "since": { "type": "string", "format": "date-time" }, "news_contacts": { "type": "object" }, "news_quotes": { "type": "object" } }, "type": "object" }, "NewsReResolveResource": { "properties": { "tracking_id": { "description": "Serialises the admin re-resolve acknowledgement (OP-969): the tracking id\nfor the dispatched (or already in-flight) resolve run. Always responds 202\nAccepted since the work is queued, not completed inline.", "type": "string", "format": "uuid" }, "curated_news_id": { "type": "integer" }, "status": { "type": "string", "enum": [ "queued", "already_in_progress" ] } }, "type": "object" }, "NewsSubmissionResource": { "properties": { "id": { "type": "integer" }, "url": { "type": "string" }, "title": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "image": { "description": "Thumbnail URL", "type": "string", "nullable": true }, "status": { "type": "string", "enum": [ "pending", "analysed", "published", "unpublished", "declined", "failed" ] }, "error_message": { "description": "Failure reason for a failed submission, sourced from the failed data-ingestion task; null unless status is failed.", "type": "string", "nullable": true }, "is_active": { "type": "boolean", "nullable": true }, "reporter_id": { "type": "integer" }, "submitted_by": { "description": "The user who submitted the article (sourced from reporter_id). Present when the reporter relation is loaded.", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object", "nullable": true }, "content_markdown": { "type": "string", "nullable": true }, "ingestion_request_id": { "type": "string", "nullable": true }, "logo_id": { "type": "integer", "nullable": true }, "published_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time", "nullable": true }, "updated_at": { "type": "string", "format": "date-time", "nullable": true }, "companies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "approved": { "type": "boolean" } }, "type": "object" } }, "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "league_id": { "type": "integer" } }, "type": "object" } }, "agencies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "tags": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "extracted_contacts": { "description": "People extracted from the article, ordered by extraction confidence DESC. Present only on the show endpoint.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "title": { "type": "string", "nullable": true }, "company": { "type": "string", "nullable": true }, "role_context": { "type": "string", "nullable": true }, "confidence": { "type": "number", "format": "float" }, "match": { "$ref": "#/components/schemas/NewsExtractionMatch" }, "current": { "$ref": "#/components/schemas/NewsExtractionMatchedContact" }, "add": { "$ref": "#/components/schemas/NewsExtractionAdd" } }, "type": "object" } }, "extracted_quotes": { "description": "Quotes extracted from the article, ordered by extraction confidence DESC. Present only on the show endpoint.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "title": { "type": "string", "nullable": true }, "company": { "type": "string", "nullable": true }, "context": { "type": "string", "nullable": true }, "confidence": { "type": "number", "format": "float" }, "quote_text": { "type": "string" }, "quote_type": { "type": "string" }, "match": { "$ref": "#/components/schemas/NewsExtractionMatch" }, "current": { "$ref": "#/components/schemas/NewsExtractionMatchedContact" } }, "type": "object" } }, "extracted_assets": { "description": "Assets extracted from the article (dismissed rows excluded), ordered by extraction confidence DESC. Present only on the show endpoint.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "suggested_name": { "type": "string" }, "confidence": { "type": "number", "format": "float" }, "match_status": { "type": "string", "enum": [ "pending", "auto_match", "needs_review", "no_match", "confirmed" ] }, "source": { "type": "string", "enum": [ "extracted", "manual" ] }, "context": { "type": "string", "nullable": true }, "item": { "description": "Canonical catalog row when the asset has been resolved (auto_match/confirmed).", "properties": { "id": { "type": "integer" }, "name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "item_platform_id": { "type": "integer" }, "item_subplatform_id": { "type": "integer" } }, "type": "object", "nullable": true } }, "type": "object" } } }, "type": "object" }, "NewsExtractionMatch": { "description": "Entity-mapping resolver verdict for one extracted person (OP-966/967/968).", "properties": { "status": { "type": "string", "enum": [ "pending", "auto_match", "needs_review", "no_match" ] }, "confidence": { "type": "number", "format": "float", "nullable": true }, "resolved_at": { "type": "string", "format": "date-time", "nullable": true }, "person_profile_id": { "type": "integer", "nullable": true }, "contact_id": { "type": "integer", "nullable": true }, "contactable_type": { "description": "Morph alias of the resolved entity; pairs with contactable_id to open the Administration Contacts context.", "type": "string", "enum": [ "agency", "brand", "property" ], "nullable": true }, "contactable_id": { "type": "integer", "nullable": true }, "entity_name": { "description": "Name of the resolved agency / brand / property.", "type": "string", "nullable": true }, "candidates": { "description": "Resolver top-K candidates; empty when the row was never resolved.", "type": "array", "items": { "type": "object" } } }, "type": "object" }, "NewsExtractionMatchedContact": { "description": "Present-day platform values of the matched contact, for side-by-side comparison against the extracted ones. Null when the extraction resolved to no contact.", "properties": { "id": { "type": "integer" }, "name": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true }, "position": { "type": "string", "nullable": true }, "linkedin": { "type": "string", "nullable": true } }, "type": "object", "nullable": true }, "NewsExtractionAdd": { "description": "Outcome of adding this extracted person to the platform. Contacts only \u2014 a quote becomes a note on a contact, never a contact of its own. `not_added` is the only selectable state; `needs_review` means the sourcing agent found profiles but could not choose between them.", "properties": { "status": { "type": "string", "enum": [ "not_added", "processing", "needs_review", "created", "updated", "failed" ] }, "added_at": { "description": "When the reviewer clicked Add contacts selected.", "type": "string", "format": "date-time", "nullable": true }, "contact_id": { "description": "The platform contact this row produced.", "type": "integer", "nullable": true }, "error": { "description": "Readable failure reason when status is failed.", "type": "string", "nullable": true }, "linkedin_url": { "description": "The profile in play for this row: the one it was created from when status is created, or the one last tried when status is processing or failed. With `candidates` still populated, a failed row can offer the same pick again instead of re-running the search.", "type": "string", "nullable": true }, "candidates": { "description": "Profiles the agent found but could not choose between. Present when status is needs_review; the reviewer picks one and posts it to the resolve endpoint.", "type": "array", "items": { "properties": { "slug": { "type": "string" }, "linkedin_url": { "type": "string" }, "title": { "type": "string" }, "snippet": { "type": "string" }, "position": { "type": "integer" } }, "type": "object" } } }, "type": "object" }, "CustomReportLightCollection": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CustomReportLightResource" } }, "links": { "properties": { "first": { "type": "string" }, "last": { "type": "string" }, "prev": { "type": "string", "nullable": true }, "next": { "type": "string", "nullable": true } }, "type": "object" }, "meta": { "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } }, "type": "object" } }, "type": "object" }, "CustomReportLightResource": { "properties": { "id": { "type": "integer", "example": 123 }, "name": { "type": "string", "example": "Q4 Sponsorship Report" }, "description": { "type": "string", "example": "Report description", "nullable": true }, "type": { "type": "string", "example": "Custom Report" }, "url": { "type": "string", "example": "https://s3.amazonaws.com/...", "nullable": true }, "created_at": { "type": "string", "example": "2 days ago" }, "is_viewed": { "type": "boolean", "example": false, "nullable": true } }, "type": "object" }, "CustomReportResource": { "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "description": { "type": "string", "nullable": true }, "report_file_id": { "type": "integer", "nullable": true }, "thumbnail_url": { "type": "string", "nullable": true }, "published_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time", "nullable": true }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } }, "brands": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/Property" } }, "agencies": { "type": "array", "items": { "$ref": "#/components/schemas/Agency" } }, "organization_users": { "description": "Organizations with their users who have access to the report", "type": "array", "items": { "properties": { "id": { "description": "Organization ID", "type": "integer" }, "name": { "description": "Organization name", "type": "string" }, "users": { "description": "Users from this organization with access", "type": "array", "items": { "properties": { "id": { "description": "User ID", "type": "integer" }, "name": { "description": "User name", "type": "string" } }, "type": "object" } } }, "type": "object" } }, "file": { "oneOf": [ { "$ref": "#/components/schemas/FileUpload" } ], "nullable": true, "type": "object" }, "sent_count": { "description": "Number of users this report was shared with", "type": "integer" }, "opened_count": { "description": "Number of recipients who have viewed the report", "type": "integer" } }, "type": "object" }, "IngestionJobResource": { "properties": { "uuid": { "type": "string", "format": "uuid" }, "source_url": { "type": "string" }, "status": { "type": "string" }, "correlation_id": { "type": "string", "format": "uuid", "nullable": true }, "completed_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time", "nullable": true }, "updated_at": { "type": "string", "format": "date-time", "nullable": true }, "tasks": { "type": "array", "items": { "$ref": "#/components/schemas/IngestionTaskResource" } } }, "type": "object" }, "IngestionTaskResource": { "properties": { "uuid": { "type": "string", "format": "uuid" }, "task_type": { "type": "string" }, "status": { "type": "string" }, "ingestion_task_id": { "type": "string", "nullable": true }, "task_options": { "type": "object", "nullable": true }, "result_payload": { "type": "object", "nullable": true }, "error_code": { "type": "string", "nullable": true }, "error_message": { "type": "string", "nullable": true }, "completed_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time", "nullable": true }, "updated_at": { "type": "string", "format": "date-time", "nullable": true } }, "type": "object" }, "AgencyContactIndexResource": { "type": "array", "items": {}, "allOf": [ { "$ref": "#/components/schemas/PropertyContact" } ] }, "AgencyContactShowStoreUpdateResource": { "properties": { "id": { "type": "integer" }, "agency_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "companies_count": { "description": "Number of companies to which the agency contact is associated.", "type": "integer" }, "properties_count": { "description": "Number of properties to which the agency contact is associated.", "type": "integer" }, "companies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" } }, "type": "object" }, "AsyncEmployeeFilteringResource": { "title": "AsyncEmployeeFilteringResource", "description": "Response when AI filtering is being processed asynchronously (HTTP 202 Accepted)", "properties": { "entity_type": { "description": "Type of entity", "type": "string", "example": "agency" }, "entity_id": { "description": "ID of the entity", "type": "integer", "example": 123 }, "new_employees_pending": { "description": "Number of new employees pending AI filtering", "type": "integer", "example": 10 }, "employees": { "description": "Employees that already exist in the system (returned immediately)", "type": "array", "items": { "properties": { "profile_url": { "type": "string", "example": "https://www.linkedin.com/in/johndoe/" }, "full_name": { "type": "string", "example": "John Doe" }, "profile_image_url": { "type": "string", "nullable": true }, "department": { "type": "string", "nullable": true }, "existing_contact_url": { "type": "string", "nullable": true } }, "type": "object" } }, "message": { "description": "Message informing user about async processing", "type": "string", "example": "AI filtering is taking longer than expected. You will be notified when processing completes." } }, "type": "object" }, "BadEmailReportResource": { "properties": { "id": { "type": "integer" }, "contact_id": { "type": "integer" }, "status": { "type": "string" }, "reported_email": { "type": "string" }, "resolved_email": { "type": "string", "nullable": true }, "resolved_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "BrandContactIndexResource": { "type": "array", "items": {}, "allOf": [ { "$ref": "#/components/schemas/PropertyContact" } ] }, "BrandContactShowStoreUpdateResource": { "properties": { "id": { "type": "integer" }, "company_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "tasks": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" } }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" } }, "type": "object" }, "ContactEmailStatusFileIndexResource": { "type": "array", "items": { "properties": { "user_name": { "type": "string" }, "filename": { "type": "string" }, "original_filename": { "type": "string" }, "created_at": { "type": "string" } }, "type": "object" } }, "ContactEmailStatusFileMetadataResource": { "properties": { "users": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer" }, "text": { "type": "string" } }, "type": "object" } ] } } }, "type": "object" }, "ContactEmailStatusFileResource": { "type": "array", "items": { "properties": { "email": { "type": "string" }, "email_status": { "type": "string" } }, "type": "object" } }, "AgencyContact": { "properties": { "id": { "type": "integer" }, "agency_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "companies_count": { "description": "Number of companies to which the agency contact is associated.", "type": "integer" }, "properties_count": { "description": "Number of properties to which the agency contact is associated.", "type": "integer" }, "companies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" } }, "type": "object" }, "BrandContact": { "properties": { "id": { "type": "integer" }, "company_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" }, "brand_name": { "description": "The brand to which the contact belongs, when showing contacts for parent brand.", "type": "string" }, "brand_logo": { "description": "The logo of the brand to which the contact belongs, when showing contacts for parent brand.", "type": "string" }, "brand_contact": { "description": "True when showing contacts for parent brand.", "type": "boolean" }, "agencies": { "description": "An array with agencies to which a contact that represents the current brand belongs.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" }, "brands": { "description": "An array with brands represented by the current contact.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" }, "PropertyContact": { "properties": { "id": { "type": "integer" }, "property_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" }, "agencies": { "description": "An array with agencies to which a contact that represents the current property belongs.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" }, "properties": { "description": "An array with properties represented by the current contact.", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" }, "ContactInformationCheckResource": { "oneOf": [ { "required": [ "message" ], "properties": { "message": { "type": "string", "example": "The given email is not linked to any contacts." } }, "type": "object" }, { "required": [ "person_profile_ids", "count", "message", "duplicates" ], "properties": { "person_profile_ids": { "type": "array", "items": { "type": "integer" } }, "count": { "type": "integer", "example": 2 }, "message": { "type": "string", "example": "The given email is already linked to other contacts." }, "duplicates": { "type": "array", "items": { "required": [ "person_profile_id", "name", "contactable_type", "contactable_id" ], "properties": { "person_profile_id": { "type": "integer", "example": 123 }, "name": { "type": "string", "example": "Jane Doe" }, "contactable_type": { "type": "string", "example": "brand" }, "contactable_id": { "type": "integer", "example": 45 }, "contactable_ulid": { "type": "string", "example": "01HXYZ1234567890", "nullable": true } }, "type": "object" } } }, "type": "object" } ] }, "ContactLinkedinScrapedDataResource": { "title": "ContactLinkedinScrapedDataResource", "required": [ "name", "position", "profile_picture", "location", "linkedin", "twitter", "work_phone", "email", "email_status", "linkedin_data" ], "properties": { "name": { "type": "string", "example": "John Doe" }, "position": { "type": "string", "example": "Software Engineer" }, "company_name": { "type": "string", "example": "Company Inc." }, "company_url": { "type": "string", "example": "https://company.com" }, "profile_picture": { "type": "string", "example": "https://image.com/johndoe.jpg" }, "location": { "type": "string", "example": "New York, USA" }, "linkedin": { "type": "string", "example": "https://www.linkedin.com/in/johndoe/" }, "twitter": { "type": "string", "example": "https://twitter.com/johndoe/" }, "work_phone": { "type": "string", "example": "+1234567890" }, "email": { "type": "string", "example": "john.doe@email.com" }, "email_status": { "type": "string", "example": "valid" }, "current_jobs": { "type": "array", "items": { "properties": { "companyUrl": { "type": "string", "example": "https://www.linkedin.com/company/123456/" }, "companyName": { "type": "string", "example": "Company Inc." }, "logoUrl": { "type": "string", "example": "https://image.com/company.jpg" }, "jobTitle": { "type": "string", "example": "Software Engineer" }, "dateRange": { "type": "string", "example": "Aug 2022 - Present" }, "startedSince": { "type": "string", "example": "2022-08-01" }, "isCurrent": { "type": "boolean", "example": true }, "duration": { "type": "string", "example": "1 yr 8 mos" }, "description": { "type": "string" }, "location": { "type": "string", "example": "New York, USA" } }, "type": "object" } }, "linkedin_data": { "description": "Data fetched from Linkedin, with jobs, schools, skills, general data etc.", "type": "array", "items": { "type": "string" } } }, "type": "object" }, "ContactSearchByEmailResource": { "type": "array", "items": { "allOf": [ { "anyOf": [ { "$ref": "#/components/schemas/AgencyContact" }, { "$ref": "#/components/schemas/PropertyContact" }, { "$ref": "#/components/schemas/BrandContact" } ] }, { "properties": { "contact_type": { "type": "string" }, "related_entity_id": { "type": "integer" }, "related_entity_name": { "type": "string" }, "related_entity_logo": { "type": "string" } }, "type": "object" } ] } }, "LinkedinEmployeeSearchResource": { "title": "LinkedinEmployeeSearchResource", "description": "LinkedIn employee search results with contact links, including both new and existing employees", "properties": { "employees": { "description": "Array of employees found in the search", "type": "array", "items": { "required": [ "profile_url", "full_name" ], "properties": { "profile_url": { "description": "LinkedIn profile URL", "type": "string", "example": "https://www.linkedin.com/in/johndoe/" }, "full_name": { "description": "Full name of the employee", "type": "string", "example": "John Doe" }, "profile_image_url": { "description": "Profile image URL", "type": "string", "example": "https://media.licdn.com/profile.jpg", "nullable": true }, "department": { "description": "Department of the employee (only for new employees filtered by AI)", "type": "string", "example": "Accounting", "nullable": true }, "existing_contact_url": { "description": "Frontend URL to view the existing contact for THIS entity (only if contact is linked to the current entity)", "type": "string", "example": "http://localhost:4200/profile/property/1032?highlight=27901", "nullable": true } }, "type": "object" } }, "message": { "description": "Message informing the user how many new profiles are being processed and that they will receive a notification when complete", "type": "string", "example": "The number of new profiles being processed is 3. You will receive a notification when completed." } }, "type": "object" }, "OngoingEmployeeScrapingResource": { "title": "OngoingEmployeeScrapingResource", "description": "Response when an employee scraping operation is already in progress for the entity", "properties": { "is_ongoing": { "description": "Indicates that a scraping operation is in progress", "type": "boolean", "example": true }, "entity_type": { "description": "Type of entity being scraped", "type": "string", "example": "agency" }, "entity_id": { "description": "ID of the entity being scraped", "type": "integer", "example": 123 }, "entity_name": { "description": "Name of the entity being scraped", "type": "string", "example": "Test Agency" }, "job_title": { "description": "Job title being searched", "type": "string", "example": "Chief Executive Officer" }, "started_at": { "description": "ISO 8601 timestamp of when the scrape started", "type": "string", "format": "date-time", "example": "2025-12-04T10:30:00+00:00" }, "started_by": { "description": "User who initiated the scrape", "properties": { "user_id": { "type": "integer", "example": 456 }, "user_name": { "type": "string", "example": "John Doe" } }, "type": "object" }, "progress": { "description": "Progress statistics for the ongoing scrape", "properties": { "total": { "description": "Total contacts being processed", "type": "integer", "example": 15 }, "completed": { "description": "Number of completed jobs", "type": "integer", "example": 10 }, "successful": { "description": "Number of successful jobs", "type": "integer", "example": 8 }, "failed": { "description": "Number of failed jobs", "type": "integer", "example": 2 }, "pending": { "description": "Number of pending jobs", "type": "integer", "example": 5 } }, "type": "object" }, "message": { "description": "Human-readable message about the ongoing scrape", "type": "string", "example": "An employee scraping operation is already in progress for this agency." } }, "type": "object" }, "PropertyContactIndexResource": { "type": "array", "items": {}, "allOf": [ { "$ref": "#/components/schemas/PropertyContact" } ] }, "PropertyContactShowStoreUpdateResource": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "tasks": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" } }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" } }, "type": "object" }, "SaleContactIndexResource": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "sale_id": { "type": "integer" }, "company_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "contact_status_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" } }, "type": "object" }, "allOf": [ { "$ref": "#/components/schemas/PropertyContact" } ] }, "SaleContactShowStoreUpdateResource": { "properties": { "id": { "type": "integer" }, "sale_id": { "type": "integer" }, "company_id": { "type": "integer" }, "contact_status_id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "string" }, "suggested": { "type": "integer" }, "previous_suggested": { "type": "integer" }, "approved": { "type": "boolean" }, "notes": { "type": "string" }, "birthday": { "type": "string", "deprecated": true }, "profile_picture": { "type": "string" }, "work_phone": { "type": "string" }, "work_phone_ext": { "type": "string" }, "email": { "type": "string" }, "previous_email_status": { "type": "string" }, "previous_email_status_updated_at": { "type": "string", "format": "date-time" }, "email_status": { "type": "string" }, "email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "linkedin": { "description": "Linkedin profile url", "type": "string" }, "facebook": { "description": "Facebook profile url", "type": "string" }, "twitter": { "description": "Twitter profile url", "type": "string" }, "instagram": { "description": "Instagram profile url", "type": "string" }, "synopsys": { "type": "string", "deprecated": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "linkedin_data": { "$ref": "#/components/schemas/ContactLinkedinData" } }, "type": "object" }, "FileUploadCollection": { "description": "List of file uploads.", "type": "array", "items": { "$ref": "#/components/schemas/FileUploadResource" } }, "FileUploadResource": { "description": "File upload details.", "properties": { "id": { "description": "Unique identifier of the file upload", "type": "integer", "example": 1 }, "original_name": { "description": "The original name of the file", "type": "string", "example": "document.pdf" }, "stored_name": { "description": "The stored name of the file", "type": "string", "example": "202101_document.pdf" }, "mime_type": { "description": "The MIME type of the file", "type": "string", "example": "application/pdf" }, "file_size": { "description": "The size of the file in bytes", "type": "integer", "example": 204800 }, "file_hash": { "description": "A hash of the file for integrity verification", "type": "string", "example": "abcdef123456" }, "url": { "description": "The URL where the file can be accessed", "type": "string", "example": "https://example.com/files/document.pdf" }, "created_at": { "description": "Timestamp when the file was created", "type": "string", "format": "date-time" }, "updated_at": { "description": "Timestamp when the file was last updated", "type": "string", "format": "date-time" }, "user": { "description": "The user who uploaded the file", "properties": { "id": { "description": "Unique identifier of the user", "type": "integer", "example": 1 }, "name": { "description": "Name of the user", "type": "string", "example": "John Doe" } }, "type": "object" }, "thumbnail": { "description": "Thumbnail of the file", "properties": { "id": { "description": "Unique identifier of the thumbnail", "type": "integer", "example": 2 }, "original_url": { "description": "Original URL of the thumbnail", "type": "string", "example": "https://example.com/thumbnails/original.png" }, "image_url": { "description": "Image URL of the thumbnail", "type": "string", "example": "https://example.com/thumbnails/image.png" }, "resized_image_url": { "description": "Resized image URL of the thumbnail", "type": "string", "example": "https://example.com/thumbnails/resized.png" }, "extension": { "description": "File extension of the thumbnail", "type": "string", "example": "png" }, "mime_type": { "description": "MIME type of the thumbnail", "type": "string", "example": "image/png" }, "file_size": { "description": "File size of the thumbnail in bytes", "type": "integer", "example": 10240 }, "width": { "description": "Width of the thumbnail in pixels", "type": "integer", "example": 100 }, "height": { "description": "Height of the thumbnail in pixels", "type": "integer", "example": 100 } }, "type": "object" } }, "type": "object" }, "ErrorResource": { "properties": { "error": { "type": "string", "example": "An error occurred" } }, "type": "object" }, "HubspotSegmentResource": { "properties": { "id": { "description": "HubSpot list/segment ID", "type": "string" }, "name": { "description": "Segment name", "type": "string" } }, "type": "object" }, "InfographicsCollection": { "description": "List of infographics.", "type": "array", "items": { "$ref": "#/components/schemas/InfographicsResource" } }, "InfographicsResource": { "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "description": { "type": "string" }, "original_url": { "type": "string" }, "resized_url": { "type": "string" }, "thumbnail_url": { "type": "string" }, "published_at": { "type": "integer" }, "tags": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "brands": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "properties": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "agencies": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "type": "object" }, "SalesforceAccessTokenResource": { "properties": { "access_token": { "type": "string" } }, "type": "object" }, "ItemValueUpdateResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/ItemValue" }, { "properties": { "item_images": { "type": "array", "items": { "$ref": "#/components/schemas/ItemImage" } } }, "type": "object" }, { "properties": { "item_videos": { "type": "array", "items": { "$ref": "#/components/schemas/ItemVideo" } } }, "type": "object" }, { "properties": { "item_audios": { "type": "array", "items": { "$ref": "#/components/schemas/ItemAudio" } } }, "type": "object" } ] }, "KeywordIndexResource": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "keyword": { "type": "string" }, "image_id": { "type": "integer" }, "position": { "type": "integer" }, "image": { "$ref": "#/components/schemas/Image" } }, "type": "object" } }, "KeywordShowStoreUpdateResource": { "properties": { "id": { "type": "integer" }, "keyword": { "type": "string" }, "image_id": { "type": "integer" }, "position": { "type": "integer" }, "image": { "$ref": "#/components/schemas/Image" } }, "type": "object" }, "LeagueDemographics": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "value": { "type": "string" }, "type": { "type": "string" }, "league_id": { "type": "integer" } }, "type": "object" }, "LeagueItemForItemResource": { "type": "array", "items": { "properties": { "league_id": { "type": "integer" }, "is_key_asset": { "type": "integer" } }, "type": "object" } }, "LeagueItemForLeagueResource": { "type": "array", "items": { "properties": { "item_id": { "type": "integer" }, "is_key_asset": { "type": "integer" } }, "type": "object" } }, "LocationForSmartSearchOnBrandsShowResource": { "properties": { "company_id": { "type": "integer" }, "company_logo": { "type": "string" }, "company_name": { "type": "string" }, "subcategory_id": { "type": "integer" }, "subcategory_name": { "type": "string" }, "category_id": { "type": "integer" }, "category_name": { "type": "string" }, "street": { "type": "string" }, "is_hq": { "type": "integer" }, "city_name": { "type": "string" }, "city_id": { "type": "integer" }, "state_name": { "type": "string" }, "state_id": { "type": "integer" }, "county_name": { "type": "string" }, "county_id": { "type": "integer" }, "country_name": { "type": "string" }, "country_id": { "type": "integer" } }, "type": "object" }, "LocationLabelResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" } }, "type": "object" }, "LocationResource": { "properties": { "id": { "type": "integer" }, "is_us_hq": { "description": "Omitted from the response when the owning property is an individual (athlete / influencer).", "type": "boolean", "nullable": true }, "street": { "type": "string" }, "city_id": { "type": "integer" }, "zip": { "type": "string" }, "phone": { "type": "string" }, "label": { "oneOf": [ { "$ref": "#/components/schemas/LocationLabelResource" } ], "nullable": true, "description": "Present only when this location is serialized in the context of an individual property; resolved from the `location_properties.label_id` pivot." } }, "type": "object" }, "MarketGroupingManagementResource": { "properties": { "id": { "description": "Market grouping ID", "type": "integer" }, "level": { "description": "Territory level (country, continent, generic)", "type": "string" }, "level_id": { "description": "ID of the territory (country or continent)", "type": "integer" }, "name": { "description": "Market grouping name", "type": "string" }, "slug": { "description": "Market grouping slug", "type": "string" }, "editable": { "description": "Whether the market grouping is editable", "type": "boolean" }, "supports": { "description": "Array of supported territory types", "type": "array", "items": { "properties": { "id": { "description": "Territory type ID", "type": "integer" }, "type": { "description": "Territory type (city, county, state, country, continent)", "type": "string" }, "name": { "description": "Territory type name", "type": "string" }, "enabled": { "description": "Whether this territory type is enabled", "type": "boolean" }, "multi": { "description": "Whether multiple selections are allowed", "type": "boolean" } }, "type": "object" } }, "state_alias": { "description": "State alias (only for country level)", "type": "string", "nullable": true }, "state_count": { "description": "Number of states (only for country level)", "type": "integer", "nullable": true }, "county_count": { "description": "Number of counties (only for country level)", "type": "integer", "nullable": true }, "city_count": { "description": "Number of cities (only for country level)", "type": "integer", "nullable": true }, "created_at": { "description": "Creation timestamp", "type": "string", "format": "date-time" }, "updated_at": { "description": "Last update timestamp", "type": "string", "format": "date-time" } }, "type": "object" }, "OrganizationAccessResource": { "properties": { "property_types": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSyncPropertyTypeResource" } }, "markets": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSyncMarketsResource" } }, "limit_access_type": { "oneOf": [ { "$ref": "#/components/schemas/OrganizationLimitAccessTypeResource" } ], "nullable": true, "description": "The organization's access-limiting mode, or null when no restriction." }, "subcategories": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSubcategoryAccessResource" } } }, "type": "object" }, "OrganizationContractResource": { "properties": { "contract_status_id": { "type": "integer" }, "contract_payment_type_id": { "type": "integer" }, "contract_monthly_spend": { "type": "integer" }, "contract_file_url": { "type": "string" }, "contract_onboarding_date": { "type": "string" }, "contract_start_date": { "type": "string" }, "contract_end_date": { "type": "string" }, "contract_auto_renew": { "type": "integer" }, "max_user_seats": { "description": "Seat cap for org-admin user management. `null` means the feature is disabled, `-1` means unlimited seats, a positive value is the number of active users allowed.", "type": "integer", "minimum": -1, "nullable": true }, "sales_user_id": { "type": "integer" }, "salesforce_id": { "type": "string" }, "account_manager_id": { "type": "integer" }, "default_user_subscription_plan_id": { "type": "string" }, "default_user_subscription_product_name": { "type": "string" }, "default_user_subscription_cancel_date": { "type": "string" }, "user_email_domain": { "type": "string" }, "billable": { "type": "array", "items": {} }, "sales_user": { "allOf": [ { "$ref": "#/components/schemas/User" }, { "$ref": "#/components/schemas/PersonProfile" } ] }, "account_manager": { "allOf": [ { "$ref": "#/components/schemas/User" }, { "$ref": "#/components/schemas/PersonProfile" } ] }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserOrganizationResource" } }, "surface_monthly_limit": { "type": "integer", "example": 500 }, "surface_limit_type": { "type": "string", "enum": [ "user", "organization" ], "example": "organization" }, "surface_monthly_balance": { "type": "string", "example": "47/500" } }, "type": "object" }, "OrganizationLimitAccessTypeResource": { "properties": { "id": { "type": "integer", "format": "int64", "example": 2 }, "name": { "type": "string", "example": "SPND Agency" }, "slug": { "type": "string", "example": "spnd_agency" } }, "type": "object" }, "CredentialsSalesforceResource": { "properties": { "client_id": { "type": "integer" }, "client_secret": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "OrganizationSubcategoryAccessResource": { "properties": { "id": { "type": "integer", "example": 14 }, "name": { "type": "string", "example": "Banking" } }, "type": "object" }, "OrganizationSyncMarketsResource": { "properties": { "id": { "type": "integer", "example": 3 }, "country_id": { "type": "integer", "example": 1 }, "region_id": { "type": "integer", "example": 2 }, "subregion_id": { "type": "integer", "example": 3 }, "name": { "type": "string", "example": "Ontario" }, "market_category_id": { "type": "integer", "example": 5 }, "created_at": { "type": "string", "example": "2017-08-17T15:12:45.000000Z" }, "updated_at": { "type": "string", "example": "2017-08-17T15:12:45.000000Z" }, "deleted_at": { "type": "string", "example": "2017-08-17T15:12:45.000000Z" } }, "type": "object" }, "OrganizationSyncPropertyTypeResource": { "properties": { "id": { "type": "integer", "example": 1 }, "uuid": { "type": "string", "example": "1bdefe12-6cb2-4d6a-b208-b04602ae79c3" }, "genre_id": { "type": "integer", "example": 1 }, "subgenre_id": { "type": "integer", "example": 1 }, "label_id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "" }, "is_continuous": { "type": "integer", "example": "null" }, "sport_id": { "type": "integer", "example": 1 }, "owner_id": { "type": "integer", "example": 1 }, "scouting_priority": { "type": "integer", "example": 4 }, "name": { "type": "string", "example": "National Football League" }, "short_name": { "type": "string", "example": "NFL" }, "governing_body": { "type": "string", "example": "" }, "grouping": { "type": "string", "example": "" }, "website_url": { "type": "string", "example": "https://www.nfl.com/" }, "created_at": { "type": "string", "example": "2017-05-08T22:03:49.000000Z" }, "updated_at": { "type": "string", "example": "2017-05-08T22:03:49.000000Z" }, "deleted_at": { "type": "string", "example": "2017-05-08T22:03:49.000000Z" } }, "type": "object" }, "OrganizationSyncStatusResource": { "properties": { "id": { "type": "integer", "example": 1 }, "organization_id": { "type": "integer", "example": 123 }, "status": { "type": "string", "example": "success", "nullable": true } }, "type": "object" }, "OrganizationTypeIndexResource": { "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "Mixed Agency" }, "properties": { "type": "boolean", "example": true }, "brands": { "type": "boolean", "example": false }, "agencies": { "type": "boolean", "example": false }, "organizations_count": { "type": "integer", "format": "int64", "example": 1 }, "product_type": { "$ref": "#/components/schemas/ProductType" } }, "type": "object" }, "OrganizationUsersResource": { "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserOrganizationResource" } }, "organization_user_count": { "description": "Total number of users matching the current filters", "type": "integer" }, "surface_monthly_prompts": { "description": "Surface AI prompts used by this user in the current month", "type": "integer" } }, "type": "object" }, "PartnershipReportCollection": { "description": "List of partnership reports.", "type": "array", "items": { "$ref": "#/components/schemas/PartnershipReportResource" } }, "PartnershipReportResource": { "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "description": { "type": "string" }, "report_external_url": { "type": "string" }, "thumbnail_url": { "type": "string" }, "resized_url": { "type": "string" }, "original_url": { "type": "string" }, "published_at": { "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "brands": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "properties": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "agencies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "file": { "$ref": "#/components/schemas/FileUploadResource" } }, "type": "object" }, "PermissionShowResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "display_name": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ProductResource": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Product 1" }, "badge": { "type": "string", "example": "su" }, "export_limit": { "type": "integer", "example": "100" }, "organization_surface_limit": { "type": "integer", "example": 500, "nullable": true }, "user_surface_limit": { "type": "integer", "example": 100, "nullable": true }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/RoleResource" } } }, "type": "object" }, "PropertyLightResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" }, "league_id": { "type": "integer" }, "sport_id": { "type": "integer" }, "instagram_url": { "type": "string" }, "linkedin_url": { "type": "string" }, "facebook_url": { "type": "string" }, "twitter_url": { "type": "string" }, "league": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo_url": { "type": "string" }, "is_continuous": { "type": "integer" }, "subgenre_id": { "type": "integer" }, "subgenre": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "genre": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "main_markets": { "type": "array", "items": { "$ref": "#/components/schemas/Market" } }, "inactive": { "type": "boolean" } }, "type": "object" }, "PropertyResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Property" }, { "properties": { "parent": { "$ref": "#/components/schemas/Property" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/Property" } }, "sport": { "$ref": "#/components/schemas/Sport" }, "league": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/League" }, { "properties": { "subgenere": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Subgenere" }, { "properties": { "genere": { "$ref": "#/components/schemas/Genre" } }, "type": "object" } ] } }, "type": "object" } ] }, "genere": { "$ref": "#/components/schemas/Genre" }, "markets": { "type": "array", "items": { "$ref": "#/components/schemas/Market" } }, "main_markets": { "type": "array", "items": { "$ref": "#/components/schemas/Market" } }, "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationSlim" } }, "rejected_brands": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "hashtags": { "type": "array", "items": { "$ref": "#/components/schemas/TeamHashtag" } }, "twitter_handle": { "$ref": "#/components/schemas/TeamTwitterHandle" }, "twitter_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamTwitterHandle" } }, "facebook_handle": { "$ref": "#/components/schemas/TeamFacebookHandle" }, "facebook_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamFacebookHandle" } }, "instagram_handle": { "$ref": "#/components/schemas/TeamInstagramHandle" }, "instagram_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamInstagramHandle" } }, "tiktok_handle": { "$ref": "#/components/schemas/TeamTiktokHandle" }, "tiktok_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamTiktokHandle" } }, "twitch_handle": { "$ref": "#/components/schemas/TeamTwitchHandle" }, "twitch_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamTwitchHandle" } }, "youtube_handle": { "$ref": "#/components/schemas/TeamYoutubeHandle" }, "youtube_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamYoutubeHandle" } }, "agencies": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" } }, "birthplace": { "description": "Present only for individual properties (`type_id = 8`). One key per `location_labels.slug`; locations labeled `birthplace`.", "type": "array", "items": { "$ref": "#/components/schemas/LocationResource" } }, "current_city": { "description": "Present only for individual properties. Locations labeled `current_city`.", "type": "array", "items": { "$ref": "#/components/schemas/LocationResource" } }, "key_location": { "description": "Present only for individual properties. Locations labeled `key_location`.", "type": "array", "items": { "$ref": "#/components/schemas/LocationResource" } }, "college": { "description": "Present only for individual properties. Locations labeled `college`.", "type": "array", "items": { "$ref": "#/components/schemas/LocationResource" } } }, "type": "object" } ] }, "PropertyShowSocialResource": { "properties": { "website_url": { "type": "string" }, "exclude_from_social_scan": { "type": "boolean" }, "inactive": { "type": "boolean" }, "rejected_brands": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "hashtags": { "type": "array", "items": { "$ref": "#/components/schemas/TeamHashtag" } }, "linkedin_url": { "type": "string" }, "youtube_url": { "type": "string" }, "facebook_url": { "type": "string" }, "twitter_url": { "type": "string" }, "instagram_url": { "type": "string" }, "twitch_url": { "type": "string" }, "tiktok_url": { "type": "string" }, "twitter_handle": { "$ref": "#/components/schemas/TeamTwitterHandle" }, "twitter_handles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TeamTwitterHandle" }, { "properties": { "followers_count": { "type": "integer" } }, "type": "object" } ] } }, "twitter_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamTwitterHandle" } }, "facebook_handle": { "$ref": "#/components/schemas/TeamFacebookHandle" }, "facebook_handles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TeamFacebookHandle" }, { "properties": { "followers_count": { "type": "integer" } }, "type": "object" } ] } }, "facebook_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamFacebookHandle" } }, "instagram_handle": { "$ref": "#/components/schemas/TeamInstagramHandle" }, "instagram_handles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TeamInstagramHandle" }, { "properties": { "followers_count": { "type": "integer" } }, "type": "object" } ] } }, "instagram_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamInstagramHandle" } }, "tiktok_handle": { "$ref": "#/components/schemas/TeamTiktokHandle" }, "tiktok_handles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TeamTiktokHandle" }, { "properties": { "followers_count": { "type": "integer" } }, "type": "object" } ] } }, "tiktok_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamTiktokHandle" } }, "twitch_handle": { "$ref": "#/components/schemas/TeamTwitchHandle" }, "twitch_handles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TeamTwitchHandle" }, { "properties": { "followers_count": { "type": "integer" } }, "type": "object" } ] } }, "twitch_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamTwitchHandle" } }, "youtube_handle": { "$ref": "#/components/schemas/TeamYoutubeHandle" }, "youtube_handles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/TeamYoutubeHandle" }, { "properties": { "followers_count": { "type": "integer" } }, "type": "object" } ] } }, "youtube_extra_handles": { "type": "array", "items": { "$ref": "#/components/schemas/TeamYoutubeHandle" } } }, "type": "object" }, "ReportSharingRecipientResource": { "properties": { "userName": { "type": "string" }, "organizationName": { "type": "string" }, "isViewed": { "type": "boolean" }, "dateReceived": { "type": "string", "format": "date-time", "nullable": true }, "dateOpened": { "type": "string", "format": "date-time", "nullable": true }, "sharedByUserName": { "type": "string", "nullable": true } }, "type": "object" }, "ReportSharingReportResource": { "properties": { "reportName": { "type": "string" }, "reportType": { "type": "string" }, "isViewed": { "type": "boolean" }, "dateReceived": { "type": "string", "format": "date-time", "nullable": true }, "dateOpened": { "type": "string", "format": "date-time", "nullable": true }, "sharedByUserName": { "type": "string", "nullable": true } }, "type": "object" }, "ReportSharingRepresentativeResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "type": "string", "enum": [ "agency", "brand", "property" ] } }, "type": "object" }, "ReportSharingSavedReportResource": { "properties": { "report_id": { "type": "integer" }, "report_name": { "type": "string" }, "report_description": { "type": "string", "nullable": true }, "report_type": { "type": "string" }, "report_url": { "type": "string" }, "created_at": { "type": "string", "example": "2026-03-17 10:00:00" }, "shared_by_user_id": { "type": "integer" }, "shared_by_user_name": { "type": "string", "nullable": true }, "recipients": { "type": "array", "items": { "properties": { "user_id": { "type": "integer" }, "user_name": { "type": "string", "nullable": true }, "organization_id": { "type": "integer", "nullable": true }, "organization_name": { "type": "string", "nullable": true }, "is_viewed": { "type": "boolean" } }, "type": "object" } }, "sent_count": { "type": "integer" }, "open_count": { "type": "integer" } }, "type": "object" }, "RepresentationResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "controlling_property_id": { "type": "integer" }, "controlled_property_id": { "type": "integer" }, "linkage_type": { "type": "string" }, "control_value": { "type": "integer" }, "is_asset_based_subplatform": { "type": "boolean" }, "notes": { "type": "string" }, "season_id": { "type": "integer" } }, "type": "object" }, "RoleOrientationResource": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "sell_side" } }, "type": "object" }, "RoleIndexResource": { "properties": { "roles": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/Role" }, { "properties": { "permissions": { "$ref": "#/components/schemas/PermissionsGroupedByLabel" } }, "type": "object" } ] } }, "all_permissions": { "$ref": "#/components/schemas/PermissionsGroupedByLabel" } }, "type": "object" }, "RoleResource": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "admin" }, "display_name": { "type": "string", "example": "Administrator" }, "description": { "type": "string", "example": "Administrator" } }, "type": "object" }, "RoleStoreUpdateResource": { "properties": { "role": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Role" }, { "properties": { "permissions": { "$ref": "#/components/schemas/PermissionsGroupedByLabel" } }, "type": "object" } ] }, "all_permissions": { "$ref": "#/components/schemas/PermissionsGroupedByLabel" } }, "type": "object" }, "SavedReportLightCollection": { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SavedReportLightResource" } }, "links": { "properties": { "first": { "type": "string" }, "last": { "type": "string" }, "prev": { "type": "string", "nullable": true }, "next": { "type": "string", "nullable": true } }, "type": "object" }, "meta": { "properties": { "current_page": { "type": "integer" }, "from": { "type": "integer" }, "last_page": { "type": "integer" }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "to": { "type": "integer" }, "total": { "type": "integer" } }, "type": "object" } }, "type": "object" }, "SavedReportLightResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "type": { "type": "string" }, "url": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "SavedReportResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "type": { "type": "string" }, "url": { "type": "string" }, "payload": { "type": "string" }, "is_viewed": { "type": "boolean" }, "source_user_id": { "type": "integer" }, "source_report_id": { "type": "integer" } }, "type": "object" }, "ScoutingGroupsIndex": { "allOf": [ { "$ref": "#/components/schemas/ScoutingGroup" }, { "properties": { "members_count": { "type": "integer" }, "owner": { "allOf": [ { "$ref": "#/components/schemas/User" }, { "$ref": "#/components/schemas/PersonProfile" } ] }, "members": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/User" }, { "properties": { "person_profile": { "$ref": "#/components/schemas/PersonProfile" }, "pivot": { "allOf": [ { "properties": { "scouting_group_id": { "type": "integer" }, "user_id": { "type": "integer" } }, "type": "object" } ] } }, "type": "object" } ] } } }, "type": "object" } ] }, "BrandClipTimingResource": { "properties": { "start": { "description": "Start timestamp in the video (format: HH:MM:SS.MS)", "type": "string", "example": "00:00:06.640" }, "end": { "description": "End timestamp in the video (format: HH:MM:SS.MS)", "type": "string", "example": "00:00:17.160" }, "text": { "description": "Transcribed or related text for the clip section", "type": "string", "example": "you don't miss any of our great football content this season. This episode is presented by Uber Eats. When football" }, "asset": { "description": "Asset description", "type": "string", "example": "Pre/Post Game Naming Rights: Show Presented by" }, "brand": { "description": "Brand name", "type": "string", "example": "Uber Eats" }, "asset_id": { "description": "Asset ID", "type": "integer", "example": 296 }, "brand_id": { "description": "Brand ID", "type": "integer", "example": 8851 } }, "type": "object" }, "ScoutingYoutubeLinkResource": { "properties": { "id": { "description": "YouTube link ID", "type": "integer", "example": 1 }, "youtube_url": { "description": "YouTube URL", "type": "string", "example": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }, "user_event_id": { "description": "User Event ID", "type": "integer", "example": 123 }, "created_at": { "description": "Creation timestamp", "type": "string", "format": "date-time", "example": "2023-01-01T12:00:00.000000Z" }, "updated_at": { "description": "Last update timestamp", "type": "string", "format": "date-time", "example": "2023-01-01T12:00:00.000000Z" }, "deleted_at": { "description": "Soft delete timestamp", "type": "string", "format": "date-time", "example": null } }, "type": "object" }, "SearchByIdGroupedResource": { "type": "array", "items": { "$ref": "#/components/schemas/GenericEntity" } }, "SearchEntityResource": { "type": "array", "items": { "$ref": "#/components/schemas/GenericEntity" } }, "SearchIndexedResource": { "properties": { "items": { "type": "array", "items": { "description": "Shape varies by indexed entity; only the core fields are guaranteed, the rest depend on the matched model and requested relationships.", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "description": "Set only for company/team/agency/contact entities; absent for all other indexed types.", "type": "string", "nullable": true }, "ulid": { "type": "string" }, "logo": { "type": "string", "nullable": true }, "is_primary_profile": { "type": "boolean" } }, "type": "object" } }, "total": { "type": "integer" } }, "type": "object" }, "BrandLatestSocialScrapingSessionResource": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "brand_id": { "type": "integer" }, "platform": { "type": "string" }, "handle": { "type": "string" }, "before": { "type": "string" }, "after": { "type": "string" }, "status": { "type": "string" }, "error": { "type": "string" } }, "type": "object" }, "BrandSocialScrapingSessionsResource": { "properties": { "metadata": { "properties": { "total": { "type": "integer" }, "currentPageNumber": { "type": "integer" }, "nextPageNumber": { "type": "integer" } }, "type": "object" }, "data": { "type": "array", "items": { "properties": { "session_id": { "type": "integer" }, "brand_id": { "type": "integer" }, "platform": { "type": "string" }, "handle": { "type": "string" }, "after": { "type": "string", "format": "date-time" }, "before": { "type": "string", "format": "date-time" }, "status": { "type": "string" }, "matched_entities_count": { "type": "integer" }, "posts_count": { "type": "integer" }, "user": { "type": "object" }, "reviewer": { "type": "object" }, "brand": { "$ref": "#/components/schemas/Company" }, "unmatched_handles": { "type": "array", "items": { "properties": { "_id": { "type": "integer" }, "unmatchedHandle": { "type": "string" }, "entityName": { "type": "string" } }, "type": "object" } }, "socialMediaValues": { "type": "array", "items": { "properties": { "": { "type": "string" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" }, "BrandSocialScrapingSessionPropertiesResource": { "properties": { "id": { "type": "integer" }, "ulid": { "type": "string", "nullable": true }, "name": { "type": "string" }, "logo_id": { "type": "integer" }, "logo": { "type": "string" }, "league_id": { "type": "string" }, "league": { "type": "string" }, "is_continuous": { "type": "boolean" }, "posts_count": { "type": "integer" }, "posts": { "type": "array", "items": { "properties": { "_id": { "type": "string" }, "entityType": { "type": "string" }, "entityId": { "type": "integer" }, "platform": { "type": "string" }, "postId": { "type": "string" }, "created_at": { "type": "string" }, "text": { "type": "string" }, "socialScrapingSessionId": { "type": "integer" }, "matchedEntities": { "type": "array", "items": { "type": "integer" } }, "stats": { "type": "object" } }, "type": "object" } } }, "type": "object" }, "SocialScrapingSessionLatestScansPerLeagueResource": { "type": "array", "items": { "properties": { "session_id": { "type": "integer" }, "property_id": { "type": "integer" }, "property_name": { "type": "string" }, "league_name": { "type": "string" }, "handle": { "type": "string" }, "status": { "type": "string" }, "posts_scraped_up_to": { "type": "string", "format": "date-time" }, "scrape_date": { "type": "string", "format": "date-time" } }, "type": "object" } }, "PredictionAccuracyResource": { "type": "object", "allOf": [ { "properties": { "classification": { "type": "integer", "example": "1" }, "percentage": { "type": "number", "example": "24,38" }, "exceeding": { "type": "boolean", "example": "true" } }, "type": "object" } ] }, "AccuracyMetricsResultResource": { "properties": { "accepted": { "type": "object", "allOf": [ { "properties": { "accuracyMetrics": { "type": "array", "items": { "properties": { "label": { "type": "string", "example": "Within 25% of actual" }, "classification": { "type": "string", "example": "0-25" }, "deals_count": { "type": "integer", "example": "103" }, "percent_of_total": { "type": "string", "example": "26,79" } }, "type": "object" } } }, "type": "object" }, { "properties": { "averageOff": { "type": "string", "example": "24,38" }, "averageOffExcludingReds": { "type": "string", "example": "99,109" } }, "type": "object" } ] }, "wip": { "type": "object", "allOf": [ { "properties": { "accuracyMetrics": { "type": "array", "items": { "properties": { "label": { "type": "string", "example": "Within 25% of actual" }, "classification": { "type": "string", "example": "0-25" }, "deals_count": { "type": "integer", "example": "103" }, "percent_of_total": { "type": "string", "example": "26,79" } }, "type": "object" } } }, "type": "object" }, { "properties": { "averageOff": { "type": "string", "example": "24,38" }, "averageOffExcludingReds": { "type": "string", "example": "99,109" } }, "type": "object" } ] } }, "type": "object" }, "AssetBucketResource": { "properties": { "id": { "type": "integer", "example": "1" }, "name": { "type": "string", "example": "D - Exclusive/Venue/Property Services" }, "weight": { "type": "number", "example": "3,5" }, "droplets": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDropletResource" } } }, "type": "object" }, "AssetBucketsCollection": { "type": "array", "items": { "$ref": "#/components/schemas/AssetBucketResource" } }, "AssetDropletResource": { "properties": { "id": { "type": "integer", "example": "3" }, "bucket_id": { "type": "integer", "example": "1" }, "drop_id": { "type": "integer", "example": "598" }, "drop_name": { "type": "string", "example": "Stage: Rotating Logo or Name Cutout" }, "drop_description": { "type": "string", "example": "Lower Bowl Stage Rotating Logo / Name" }, "item_platform": { "type": "string", "example": "VENUE: Signage" }, "item_subplatform": { "type": "string", "example": "LOWER BOWL: Rotating" }, "item_grouping": { "type": "string", "example": "Signage - Interior (Other)" } }, "type": "object" }, "CalculateLeagueMinimumsResource": { "type": "object" }, "CalculateMarginOfErrorResource": { "properties": { "deal_revenues": { "properties": { "standard_deviation": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "margin_of_error": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDealResource" } } }, "type": "object" }, "predicted_deal_revenues": { "properties": { "standard_deviation": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "margin_of_error": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDealPredictedResource" } } }, "type": "object" } }, "type": "object" }, "SpendTrackerChangeLogShowResource": { "properties": { "activity": { "type": "array", "items": { "properties": { "date": { "type": "string", "format": "date-time" }, "user": { "type": "string" }, "action": { "type": "string" }, "details": { "type": "string" } }, "type": "object" } } }, "type": "object" }, "ClientFacingAssetsRevenueCollection": { "type": "array", "items": { "$ref": "#/components/schemas/ClientFacingAssetsRevenueResource" } }, "ClientFacingAssetsRevenueResource": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer", "example": "433" }, "property_id": { "type": "integer", "example": "22" }, "brand_id": { "type": "integer", "example": "117050" }, "season_id": { "type": "integer", "example": "298" }, "midpoint": { "type": "integer", "example": "4600000" }, "currency": { "type": "string", "example": "USD" }, "parent_line": { "type": "boolean", "example": "true" } }, "type": "object" } ] }, "ClientFacingDealRevenueCollection": { "type": "array", "items": { "$ref": "#/components/schemas/ClientFacingDealRevenueResource" } }, "ClientFacingDealRevenueResource": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer", "example": "433" }, "property_id": { "type": "integer", "example": "22" }, "brand_id": { "type": "integer", "example": "117050" }, "season_id": { "type": "integer", "example": "298" }, "min": { "type": "integer", "example": "3991142" }, "max": { "type": "integer", "example": "4988928" }, "midpoint": { "type": "integer", "example": "4600000" }, "currency": { "type": "string", "example": "USD" }, "parent_line": { "type": "boolean", "example": "true" } }, "type": "object" } ] }, "CurrencyExchangeRateResource": { "properties": { "id": { "type": "integer", "example": 1 }, "season_id": { "type": "integer", "example": 292 }, "from": { "type": "string", "example": "EUR" }, "to": { "type": "string", "example": "USD" }, "rate": { "type": "number", "format": "float", "example": 1.0478 } }, "type": "object" }, "DealAssetAuditResource": { "properties": { "asset_id": { "type": "integer", "example": "3" }, "asset_name": { "type": "string", "example": "Stage: Rotating Logo or Name Cutout" }, "asset_description": { "type": "string", "example": "Lower Bowl Stage Rotating Logo / Name" }, "isSponsor": { "type": "integer", "example": "1" }, "item_platform": { "type": "string", "example": "VENUE: Signage" }, "item_grouping": { "type": "string", "example": "Signage - Interior (Other)" }, "item_images_count": { "type": "integer", "example": "2" }, "item_videos_count": { "type": "integer", "example": "0" }, "item_social_media_count": { "type": "integer", "example": "0" }, "description": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer", "example": "16" }, "description": { "type": "string", "example": "Terrace" } }, "type": "object" } ] } } }, "type": "object" }, "DealBucketAssetsGetDealAssetsByBucketsResource": { "type": "object", "allOf": [ { "properties": { "deal": { "allOf": [ { "properties": { "property_id": { "type": "integer", "example": "4" }, "property_name": { "type": "string", "example": "Arizona Diamondbacks" }, "brand_id": { "type": "integer", "example": "16857" }, "brand_name": { "type": "string", "example": "Michelob Ultra" }, "season_id": { "type": "integer", "example": "298" }, "season_season": { "type": "string", "example": "2021" }, "season_name": { "type": "string", "example": "2021" } }, "type": "object" } ] }, "bucketsWithDealAssets": { "type": "array", "items": { "$ref": "#/components/schemas/LeagueAssetBucketResource" } } }, "type": "object" } ] }, "DealLevelsResource": { "$ref": "#/components/schemas/DealLevel" }, "DealNotesResource": { "type": "object", "allOf": [ { "properties": { "property_id": { "type": "integer", "example": "22" }, "brand_id": { "type": "integer", "example": "117050" }, "season_id": { "type": "integer", "example": "298" }, "internal": { "type": "string", "example": "internal note" }, "questions": { "type": "string", "example": "questions for property" } }, "type": "object" } ] }, "DealTypesResource": { "$ref": "#/components/schemas/DealType" }, "AccuracySelectionResource": { "properties": { "deal_size_ranges": { "properties": { "fifty_thousand": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "one_hundred_thousand": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "two_hundred_fifty_thousand": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "five_hundred_thousand": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "one_million": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "three_million": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "five_million": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "ten_million": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "twenty_million": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" }, "over_twenty_million": { "properties": { "dollar_off": { "properties": { "ten_thousand": { "type": "boolean" }, "twenty_thousand": { "type": "boolean" }, "fifty_thousand": { "type": "boolean" }, "one_hundred_thousand": { "type": "boolean" }, "two_hundred_thousand": { "type": "boolean" }, "five_hundred_thousand": { "type": "boolean" }, "one_million": { "type": "boolean" }, "three_million": { "type": "boolean" }, "five_million": { "type": "boolean" }, "over_five_million": { "type": "boolean" } }, "type": "object" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "LeagueDollarOffMetricsResource": {}, "DollarOffMetricsResource": { "type": "object" }, "LeagueAssetBucketResource": { "properties": { "id": { "type": "integer", "example": "1" }, "league_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "296" }, "name": { "type": "string", "example": "D - Exclusive/Venue/Property Services" }, "weight": { "type": "number", "example": "3,5" }, "droplets": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDropletResource" } }, "revenue": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "dealAssets": { "$ref": "#/components/schemas/DealAssetAuditResource" } }, "type": "object" }, "LeagueAssetBucketsCollection": { "type": "object", "allOf": [ { "properties": { "spendTrackerLeague": { "allOf": [ { "properties": { "league_id": { "type": "integer", "example": "1" }, "league_name": { "type": "string", "example": "NFL - National Football League" }, "season_id": { "type": "integer", "example": "296" }, "season_name": { "type": "string", "example": "2021-22" } }, "type": "object" } ] }, "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/LeagueAssetBucketResource" } } }, "type": "object" } ] }, "LeagueAssetDropletResource": { "properties": { "id": { "type": "integer", "example": "3" }, "bucket_id": { "type": "integer", "example": "1" }, "drop_id": { "type": "integer", "example": "598" }, "drop_name": { "type": "string", "example": "Stage: Rotating Logo or Name Cutout" }, "drop_description": { "type": "string", "example": "Lower Bowl Stage Rotating Logo / Name" }, "item_platform": { "type": "string", "example": "VENUE: Signage" }, "item_subplatform": { "type": "string", "example": "LOWER BOWL: Rotating" }, "item_grouping": { "type": "string", "example": "Signage - Interior (Other)" }, "is_key_asset": { "type": "integer", "example": "1" }, "active": { "type": "boolean", "example": "true" }, "audits_count": { "type": "integer", "example": "16" }, "deals_count": { "type": "integer", "example": "10" }, "deal_revenues_count": { "type": "integer", "example": "8" } }, "type": "object" }, "BucketLeaguePropertyResource": { "properties": { "id": { "type": "integer", "example": "1" }, "league_id": { "type": "integer", "example": "3" }, "season_id": { "type": "integer", "example": "298" }, "name": { "type": "string", "example": "Highest" }, "droplets": { "type": "array", "items": { "$ref": "#/components/schemas/DropletLeaguePropertyResource" } }, "revenue": { "$ref": "#/components/schemas/RevenueResource" }, "meta": { "allOf": [ { "properties": { "revenue_calculated": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "revenue_ignored": { "$ref": "#/components/schemas/RevenueCalculatedResource" } }, "type": "object" } ] } }, "type": "object" }, "DropletLeaguePropertyResource": { "properties": { "id": { "type": "integer", "example": "3" }, "bucket_id": { "type": "integer", "example": "3" }, "drop_id": { "type": "integer", "example": "12" }, "drop_name": { "type": "string", "example": "Boston Red Sox" }, "total_followers": { "type": "integer", "example": "9051435" }, "primary_market": { "type": "string", "example": "Boston" }, "market_rank": { "type": "integer", "example": "1" }, "revenue": { "$ref": "#/components/schemas/RevenueResource" } }, "type": "object" }, "LeaguePropertyBucketsShowResource": { "type": "object", "allOf": [ { "properties": { "spendTrackerLeague": { "allOf": [ { "properties": { "league_id": { "type": "integer", "example": "1" }, "league_name": { "type": "string", "example": "NFL - National Football League" }, "season_id": { "type": "integer", "example": "296" }, "season_name": { "type": "string", "example": "2021-22" } }, "type": "object" } ] }, "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/BucketLeaguePropertyResource" } }, "revenue": { "oneOf": [ { "$ref": "#/components/schemas/RevenueLeagueResource" }, { "$ref": "#/components/schemas/RevenueCalculatedResource" } ] }, "meta": { "allOf": [ { "properties": { "revenue_calculated": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "revenue_ignored": { "$ref": "#/components/schemas/RevenueCalculatedResource" } }, "type": "object" } ] } }, "type": "object" } ] }, "LeagueStatusCollection": { "properties": { "spendTrackerLeagues": { "type": "array", "items": { "$ref": "#/components/schemas/LeagueStatusResource" } } }, "type": "object" }, "LeagueStatusResource": { "properties": { "league_id": { "type": "integer", "example": "1" }, "league_name": { "type": "string", "example": "NFL - National Football League" } }, "type": "object" }, "OrphanRevenuesCollection": { "$ref": "#/components/schemas/RevenueDealResource" }, "PredictChildDealResource": { "properties": { "brand_id": { "type": "integer" }, "brand_ulid": { "type": "string" }, "brand_name": { "type": "string" }, "brand_logo": { "type": "string" }, "revenue": { "$ref": "#/components/schemas/RevenueDealResource" }, "accepted_predicted_revenue": { "$ref": "#/components/schemas/RevenueDealPredictedResource" } }, "type": "object" }, "PredictDealCollection": { "$ref": "#/components/schemas/PredictDealResource" }, "PredictDealResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/PredictChildDealResource" }, { "properties": { "brand_id": { "type": "integer" }, "brand_ulid": { "type": "string" }, "brand_name": { "type": "string" }, "brand_logo": { "type": "string" }, "revenue": { "$ref": "#/components/schemas/RevenueDealResource" }, "accepted_predicted_revenue": { "$ref": "#/components/schemas/RevenueDealPredictedResource" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/PropertyDealRevenueChildResource" } } }, "type": "object" } ] }, "PropertyDealRevenuesGetPredictedResource": { "type": "object", "allOf": [ { "properties": { "propertyRevenue": { "$ref": "#/components/schemas/RevenuePropertyResource" } }, "type": "object" }, { "properties": { "dealsWithPredictedRevenues": { "type": "array", "items": { "$ref": "#/components/schemas/PredictDealCollection" } } }, "type": "object" } ] }, "PropertyDealRevenueChildResource": { "properties": { "brand_id": { "type": "integer" }, "brand_ulid": { "type": "string" }, "brand_name": { "type": "string" }, "brand_logo": { "type": "string" }, "category_id": { "type": "integer" }, "category_name": { "type": "string" }, "subcategory_id": { "type": "integer" }, "subcategory_name": { "type": "string" }, "total_assets_count": { "type": "integer" }, "sponsor_assets_count": { "type": "integer" }, "vendor_assets_count": { "type": "integer" }, "tv_assets_count": { "type": "integer" }, "radio_assets_count": { "type": "integer" }, "digital_assets_count": { "type": "integer" }, "other_assets_count": { "type": "integer" }, "deal_level": { "type": "string", "example": "vendor" }, "revenue": { "$ref": "#/components/schemas/RevenueDealResource" }, "accepted_predicted_revenue": { "$ref": "#/components/schemas/RevenueDealPredictedResource" } }, "type": "object" }, "PropertyDealRevenueResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/PropertyDealRevenueChildResource" }, { "properties": { "brand_id": { "type": "integer" }, "brand_ulid": { "type": "string" }, "brand_name": { "type": "string" }, "brand_logo": { "type": "string" }, "category_id": { "type": "integer" }, "category_name": { "type": "string" }, "subcategory_id": { "type": "integer" }, "subcategory_name": { "type": "string" }, "total_assets_count": { "type": "integer" }, "sponsor_assets_count": { "type": "integer" }, "vendor_assets_count": { "type": "integer" }, "tv_assets_count": { "type": "integer" }, "radio_assets_count": { "type": "integer" }, "digital_assets_count": { "type": "integer" }, "other_assets_count": { "type": "integer" }, "deal_level": { "type": "string", "example": "vendor" }, "revenue": { "$ref": "#/components/schemas/RevenueDealResource" }, "accepted_predicted_revenue": { "$ref": "#/components/schemas/RevenueDealPredictedResource" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/PropertyDealRevenueChildResource" } } }, "type": "object" } ] }, "PropertyDealRevenuesGetActualResource": { "type": "object", "allOf": [ { "properties": { "leagueAssetBuckets": { "$ref": "#/components/schemas/LeagueAssetBucketsCollection" } }, "type": "object" }, { "properties": { "propertyRevenue": { "$ref": "#/components/schemas/RevenuePropertyResource" } }, "type": "object" }, { "properties": { "dealsWithPredictedRevenues": { "type": "array", "items": { "$ref": "#/components/schemas/PropertyDealRevenuesCollection" } } }, "type": "object" } ] }, "PropertyDealRevenuesGetResource": { "type": "object", "allOf": [ { "properties": { "propertyRevenue": { "$ref": "#/components/schemas/RevenuePropertyResource" } }, "type": "object" }, { "properties": { "deals": { "type": "array", "items": { "$ref": "#/components/schemas/PropertyDealRevenuesCollection" } } }, "type": "object" } ] }, "PropertyDealRevenuesCollection": { "$ref": "#/components/schemas/PropertyDealRevenueResource" }, "PublishedSeasonResource": { "$ref": "#/components/schemas/PublishedSeasonResource" }, "RevenueCalculatedMidpointResource": { "properties": { "midpoint": { "type": "integer", "example": "3568790" }, "currency": { "type": "string", "example": "USD" }, "is_calculated": { "type": "boolean", "example": "true" } }, "type": "object" }, "RevenueCalculatedResource": { "properties": { "min": { "type": "integer", "example": "3568790" }, "max": { "type": "integer", "example": "3632160" }, "currency": { "type": "string", "example": "USD" }, "is_calculated": { "type": "boolean", "example": "true" }, "is_predicted": { "type": "boolean", "example": "true" }, "accuracy": { "$ref": "#/components/schemas/PredictionAccuracyResource" } }, "type": "object" }, "RevenueDealGetDealDataBySeasonsCollection": { "properties": { "seasons_with_deal_data": { "type": "array", "items": { "$ref": "#/components/schemas/SeasonsWithDealDataResource" } } }, "type": "object" }, "RevenueDealGetDealRevenueInSeasonResource": { "type": "object", "allOf": [ { "properties": { "deal_revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDealResource" } } }, "type": "object" }, { "properties": { "predicted_deal_revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDealPredictedResource" } } }, "type": "object" } ] }, "RevenueDealGetPropertyDealRevenuesResource": { "type": "object", "allOf": [ { "properties": { "revenues": { "$ref": "#/components/schemas/RevenueDealCollection" } }, "type": "object" }, { "properties": { "accepted_predicted_revenues": { "type": "object", "allOf": [ { "properties": { "non_parent_line": { "$ref": "#/components/schemas/RevenueDealPredictedCollection" }, "parent_line": { "$ref": "#/components/schemas/RevenueDealPredictedCollection" } }, "type": "object" } ] } }, "type": "object" }, { "properties": { "client_facing_revenues": { "type": "object", "allOf": [ { "properties": { "non_parent_line": { "$ref": "#/components/schemas/ClientFacingDealRevenueCollection" }, "parent_line": { "$ref": "#/components/schemas/ClientFacingDealRevenueCollection" } }, "type": "object" } ] } }, "type": "object" }, { "properties": { "dealsTotalRevenue": { "type": "array", "items": { "$ref": "#/components/schemas/PropertyDealRevenuesCollection" } } }, "type": "object" }, { "properties": { "propertyRevenue": { "type": "array", "items": { "$ref": "#/components/schemas/RevenuePropertyResource" } } }, "type": "object" }, { "properties": { "propertyBucketRevenue": { "type": "object", "allOf": [ { "title": "BrandAgency", "properties": { "currency": { "type": "string" }, "is_calculated": { "type": "boolean" }, "min": { "type": "integer" }, "max": { "type": "string" } }, "type": "object" } ] } }, "type": "object" } ] }, "SeasonsWithDealDataResource": { "properties": { "season_id": { "type": "integer", "example": "293" }, "season_season": { "type": "integer", "example": "2020" }, "revenue": { "$ref": "#/components/schemas/RevenueDealResource" }, "deal_level": { "type": "string", "example": "parent" }, "deal_type": { "type": "boolean", "example": "vendor" }, "has_child_revenues": { "type": "boolean", "example": "false" }, "has_prent_revenue": { "type": "boolean", "example": "true" } }, "type": "object" }, "RevenueDealCollection": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDealResource" } }, "RevenueDealMultiYearResource": { "$ref": "#/components/schemas/RevenueDealMultiYear" }, "RevenueDealPredictedCollection": { "properties": { "revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDealPredictedResource" } } }, "type": "object" }, "RevenueDealPredictedResource": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer", "example": "433" }, "property_id": { "type": "integer", "example": "22" }, "brand_id": { "type": "integer", "example": "117050" }, "season_id": { "type": "integer", "example": "298" }, "is_accepted": { "type": "boolean", "example": "true" }, "is_final": { "type": "boolean", "example": "true" }, "min": { "type": "integer", "example": "3991142" }, "max": { "type": "integer", "example": "4988928" }, "subcategory_factored_min": { "type": "integer", "example": "3991142" }, "subcategory_factored_max": { "type": "integer", "example": "4988928" }, "currency": { "type": "string", "example": "USD" }, "parent_line": { "type": "boolean", "example": "true" }, "is_predicted": { "type": "boolean", "example": "true" }, "accuracy": { "$ref": "#/components/schemas/PredictionAccuracyResource" }, "accuracy_subcategory_factored": { "$ref": "#/components/schemas/PredictionAccuracyResource" }, "accuracy_margin_of_error": { "$ref": "#/components/schemas/PredictionAccuracyResource" } }, "type": "object" } ] }, "RevenueDealResource": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer", "example": "433" }, "property_id": { "type": "integer", "example": "22" }, "brand_id": { "type": "integer", "example": "117050" }, "season_id": { "type": "integer", "example": "298" }, "min": { "type": "integer", "example": "3991142" }, "max": { "type": "integer", "example": "4988928" }, "min_margin_of_error": { "type": "integer", "example": "3991142" }, "max_margin_of_error": { "type": "integer", "example": "4988928" }, "currency": { "type": "string", "example": "USD" }, "parent_line": { "type": "boolean", "example": "true" }, "is_actual": { "type": "boolean", "example": "true" }, "source": { "type": "integer", "example": "4" }, "escalations_count": { "type": "integer", "example": "4" }, "escalation_percentage": { "type": "number", "format": "float", "example": "5.00" }, "public_url": { "type": "string", "example": "https://www.sponsorunited.com/" }, "multi_year_id": { "type": "integer", "example": "23" }, "revenue_multi_year": { "$ref": "#/components/schemas/RevenueDealMultiYear" } }, "type": "object" } ] }, "RevenueLeagueResource": { "$ref": "#/components/schemas/RevenueLeague" }, "RevenuePropertyResource": { "$ref": "#/components/schemas/RevenueProperty" }, "RevenueResource": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer" }, "recipient_id": { "type": "integer" }, "season_id": { "type": "integer" }, "min": { "type": "integer" }, "max": { "type": "integer" }, "is_actual": { "type": "integer" }, "public_url": { "type": "string" }, "currency": { "type": "string" } }, "type": "object" } ] }, "RevenueSubcategoryFactorResource": { "properties": { "id": { "type": "integer", "example": "91" }, "subcategory_id": { "type": "integer", "example": "19" }, "league_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "286" }, "factor": { "type": "number", "example": "-10,3" } }, "type": "object" }, "RevenueSubcategoryResource": { "properties": { "id": { "type": "integer", "example": "91" }, "recipient_id": { "type": "integer", "example": "41" }, "season_id": { "type": "integer", "example": "298" }, "is_total": { "type": "integer", "example": "1" }, "is_actual": { "type": "integer", "example": "0" }, "public_url": { "type": "string", "example": "https://www.sponsorunited.com/" }, "min": { "type": "integer", "example": "83700" }, "max": { "type": "integer", "example": "83700" }, "currency": { "type": "string", "example": "USD" }, "notes": { "type": "string", "example": "a note" }, "midpoint": { "type": "integer", "example": "83700" } }, "type": "object" }, "SubcategoryRevenueFactorsUpdateResource": { "properties": { "factors": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueSubcategoryFactorResource" } } }, "type": "object" }, "SubcategoryRevenuesDealsBySubcategoryResource": { "type": "object", "allOf": [ { "properties": { "league_key_figures": { "type": "object", "allOf": [ { "properties": { "league_revenue": { "$ref": "#/components/schemas/RevenueLeagueResource" }, "league_subcategories_total_revenue": { "type": "integer", "example": "20500000" }, "league_subcategories_average_revenue": { "type": "integer", "example": "10250000" }, "currency": { "type": "string", "example": "USD" } }, "type": "object" } ] } }, "type": "object" }, { "properties": { "subcategory_deals": { "type": "array", "items": { "$ref": "#/components/schemas/SubcategoryRevenuesReportResource" } } }, "type": "object" } ] }, "SubcategoryRevenuesReportResource": { "type": "object", "allOf": [ { "properties": { "subcategory": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer", "example": "19" }, "name": { "type": "string", "example": "Beer (Import & Domestic)" } }, "type": "object" } ] }, "category": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer", "example": "12" }, "name": { "type": "string", "example": "Beverage - Alcohol" } }, "type": "object" } ] }, "revenue_subcategory_factor": { "type": "object", "allOf": [ { "properties": { "saved": { "$ref": "#/components/schemas/RevenueSubcategoryFactorResource" }, "calculated": { "type": "number", "example": "-44.35" } }, "type": "object" } ] }, "deals_count": { "type": "integer", "example": "94" }, "subcategory_revenue": { "type": "object", "allOf": [ { "properties": { "total": { "$ref": "#/components/schemas/RevenueSubcategoryResource" }, "average": { "type": "object", "allOf": [ { "properties": { "midpoint": { "type": "integer", "example": "20212" }, "currency": { "type": "string", "example": "USD" } }, "type": "object" } ] } }, "type": "object" } ] }, "revenue_deal_predicted": { "type": "object", "allOf": [ { "properties": { "total": { "$ref": "#/components/schemas/RevenueCalculatedResource" }, "average": { "$ref": "#/components/schemas/RevenueCalculatedResource" } }, "type": "object" } ] } }, "type": "object" } ] }, "SubcategoryRevenuesShowResource": { "type": "object", "allOf": [ { "properties": { "totalRevenue": { "$ref": "#/components/schemas/RevenueSubcategoryResource" } }, "type": "object" }, { "properties": { "averageRevenue": { "$ref": "#/components/schemas/RevenueSubcategoryResource" } }, "type": "object" } ] }, "UpdateSubcategoryRevenuesResource": { "type": "object", "allOf": [ { "properties": { "revenuesSubcategory": { "$ref": "#/components/schemas/SubcategoryRevenuesShowResource" } }, "type": "object" } ] }, "SuLanguageCollection": { "type": "array", "items": { "$ref": "#/components/schemas/SuLanguageResource" } }, "SuLanguageResource": { "properties": { "domain": { "type": "string", "example": "spend_tracker" }, "field_name": { "type": "string", "example": "deal_level_parent" }, "content": { "type": "string", "example": "lorem ipsum" } }, "type": "object" }, "SurfaceUsageRecordResource": { "properties": { "allowed": { "description": "Whether the user is allowed to submit the prompt", "type": "boolean", "example": true }, "usage": { "properties": { "limit": { "description": "Monthly prompt limit (0 = unlimited)", "type": "integer", "example": 500 }, "used": { "description": "Prompts used this month", "type": "integer", "example": 47 }, "remaining": { "description": "Prompts remaining this month", "type": "integer", "example": 453 }, "limit_type": { "description": "Whether limit applies per user or per organization", "type": "string", "enum": [ "user", "organization" ], "example": "user" }, "reset_date": { "description": "First day of next month when usage resets", "type": "string", "format": "date", "example": "2026-05-01" }, "threshold_warning": { "description": "Non-null only on first crossing of 75% or 100% threshold", "type": "string", "enum": [ "75", "100" ], "example": null, "nullable": true } }, "type": "object" } }, "type": "object" }, "SurfaceUsageResource": { "properties": { "usage": { "properties": { "limit": { "description": "Monthly prompt limit (0 = unlimited)", "type": "integer", "example": 500 }, "used": { "description": "Prompts used this month", "type": "integer", "example": 47 }, "remaining": { "description": "Prompts remaining this month", "type": "integer", "example": 453 }, "limit_type": { "description": "Whether limit applies per user or per organization", "type": "string", "enum": [ "user", "organization" ], "example": "user" }, "reset_date": { "description": "First day of next month when usage resets", "type": "string", "format": "date", "example": "2026-05-01" }, "threshold_warning": { "description": "Non-null only on first crossing of 75% or 100% threshold", "type": "string", "enum": [ "75", "100" ], "example": null, "nullable": true } }, "type": "object" } }, "type": "object" }, "TagIndexResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "TagResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "ContactTaskIndexResource": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/Task" }, { "properties": { "contact_type": { "type": "string" }, "related_entity_id": { "type": "integer" }, "related_entity_name": { "type": "string" }, "related_entity_logo": { "type": "string" }, "related_entity_ulid": { "type": "string" }, "contact": { "type": "object", "oneOf": [ { "$ref": "#/components/schemas/AgencyContactIndexResource" }, { "$ref": "#/components/schemas/PropertyContactIndexResource" }, { "$ref": "#/components/schemas/BrandContactIndexResource" } ] } }, "type": "object" } ] } }, "TaskIndexResource": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/Task" }, { "properties": { "entity_ulid": { "type": "string" }, "entity_logo": { "type": "string" }, "league_id": { "type": "integer" }, "league_name": { "type": "string" }, "league_manager_id": { "type": "integer" }, "league_manager_name": { "type": "string" } }, "type": "object" } ] } }, "TaskIndexMetadataResource": { "properties": { "type": { "type": "array", "items": { "allOf": [ { "properties": { "text": { "type": "string" }, "name": { "type": "string" } }, "type": "object" } ] } }, "entity": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer" }, "text": { "type": "string" }, "league_id": { "type": "integer" }, "league_manager_id": { "type": "integer" } }, "type": "object" } ] } }, "league": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer" }, "text": { "type": "string" }, "league_manager_id": { "type": "integer" } }, "type": "object" } ] } }, "league_manager": { "type": "array", "items": { "allOf": [ { "properties": { "id": { "type": "integer" }, "text": { "type": "string" } }, "type": "object" } ] } } }, "type": "object" }, "TaskShowStoreUpdateResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Task" }, { "properties": { "entity_logo": { "type": "string" }, "league_id": { "type": "integer" }, "league_name": { "type": "string" } }, "type": "object" } ] }, "UserSyncStatusResource": { "properties": { "id": { "type": "integer", "example": 1 }, "user_id": { "type": "integer", "example": 123 }, "status": { "type": "string", "example": "success", "nullable": true } }, "type": "object" }, "UserCustomReportCollection": { "type": "array", "items": { "$ref": "#/components/schemas/UserCustomReportResource" } }, "UserCustomReportResource": { "properties": { "id": { "type": "integer", "example": 123 }, "name": { "type": "string", "example": "Q4 Sponsorship Report" }, "description": { "type": "string", "example": "Report description", "nullable": true }, "type": { "type": "string", "example": "Custom Report" }, "url": { "type": "string", "example": "https://s3.amazonaws.com/...", "nullable": true }, "created_at": { "type": "string", "example": "2 days ago" }, "is_viewed": { "type": "boolean", "example": false, "nullable": true } }, "type": "object" }, "UserEventUploadsIndexResource": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/UserEventUploads" }, { "properties": { "media": { "type": "object", "oneOf": [ { "$ref": "#/components/schemas/Audio" }, { "$ref": "#/components/schemas/Image" }, { "$ref": "#/components/schemas/Video" } ] } }, "type": "object" } ] } }, "UserEventUploadsStoreResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/UserEventUploads" }, { "properties": { "media": { "type": "object", "oneOf": [ { "$ref": "#/components/schemas/Audio" }, { "$ref": "#/components/schemas/Image" }, { "$ref": "#/components/schemas/Video" } ] } }, "type": "object" } ] }, "LoginResource": { "required": [ "token", "session" ], "properties": { "token": { "description": "JWT authentication token", "type": "string" }, "session": { "description": "Session signature", "type": "string" }, "mfa_enabled": { "description": "Whether MFA verification is required", "type": "boolean" }, "user_id": { "description": "User ID (returned when MFA is enabled)", "type": "integer" }, "has_phone": { "description": "Whether user has phone number for SMS MFA", "type": "boolean" }, "force_new_password": { "description": "Whether user must reset password", "type": "integer" }, "reset_token": { "description": "Password reset token (when force_new_password is set)", "type": "string" } }, "type": "object" }, "NeedsConfirmationResource": { "properties": { "message": { "type": "string" }, "mfa": { "type": "string" } }, "type": "object" }, "ProfileFieldMfaResource": { "description": "MFA field validation response", "properties": { "field": { "description": "Field being validated", "type": "string" }, "valid": { "description": "Whether the field is valid", "type": "boolean" }, "message": { "description": "Validation message", "type": "string" } }, "type": "object" }, "ProfileMfaUpdateResource": { "properties": { "mfa_reference": { "type": "integer" } }, "type": "object" }, "ProfilePhoneCheckResource": { "properties": { "phone_country": { "type": "string" }, "phone": { "type": "string" }, "valid": { "type": "boolean" }, "phone_number": { "type": "string" } }, "type": "object" }, "UserAccessResource": { "description": "User access permissions by entity type", "properties": { "teams": { "description": "Team IDs user has access to", "type": "array", "items": { "type": "integer" } }, "brands": { "description": "Brand IDs user has access to", "type": "array", "items": { "type": "integer" } }, "agencies": { "description": "Agency IDs user has access to", "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "UserDownloadFileResource": { "properties": { "status": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "UserForReportSharingResource": { "properties": { "id": { "description": "API resource for a user in the report-sharing selection list.", "type": "integer" }, "userName": { "type": "string" }, "email": { "type": "string", "nullable": true }, "jobTitle": { "type": "string", "nullable": true }, "roleOrientation": { "type": "string", "nullable": true }, "userJobRole": { "type": "string", "nullable": true }, "userRole": { "type": "string", "nullable": true }, "organization": { "type": "string", "nullable": true }, "organizationType": { "type": "string", "nullable": true }, "organizationProduct": { "type": "string", "nullable": true }, "organizationAccountManager": { "type": "string", "nullable": true }, "representatives": { "type": "string", "nullable": true }, "representativesFull": { "type": "array", "items": { "type": "string" } }, "representativesCount": { "type": "integer" }, "leagueAndPlatform": { "type": "string", "nullable": true }, "leaguesFull": { "type": "array", "items": { "type": "string" } }, "leaguesCount": { "type": "integer" }, "subcategory": { "type": "string", "nullable": true }, "subcategoriesFull": { "type": "array", "items": { "type": "string" } }, "subcategoriesCount": { "type": "integer" }, "genre": { "type": "string", "nullable": true }, "subgenre": { "type": "string", "nullable": true }, "category": { "type": "string", "nullable": true }, "lastActivity": { "type": "string", "format": "date-time", "nullable": true }, "reportsReceived": { "type": "integer" }, "lastReceivedDate": { "type": "string", "format": "date-time", "nullable": true }, "reportsOpened": { "type": "integer" }, "lastOpenedDate": { "type": "string", "format": "date-time", "nullable": true } }, "type": "object" }, "UserLightResource": { "properties": { "user": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "email": { "type": "string" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" } }, "is_external": { "type": "boolean" }, "force_new_password": { "type": "integer" }, "verified": { "type": "integer" }, "settings": { "type": "array", "items": { "$ref": "#/components/schemas/UserSetting" } } }, "type": "object" } ] } }, "type": "object" }, "UserMeResponse": { "description": "Complete response for authenticated user profile with permissions, access, entities, and settings", "type": "object", "allOf": [ { "$ref": "#/components/schemas/UserResource" }, { "properties": { "user_permissions": { "description": "List of permission names granted to the user. Includes all user permissions with special handling for VIEW_INTERCOM, BETA, and RELEASE_V3_0 permissions based on subscription status.", "type": "array", "items": { "type": "string", "example": "EDIT_USERS" }, "example": [ "EDIT_USERS", "CREATE_CONTACTS", "VIEW_INTERCOM", "BETA" ] }, "representative": { "description": "Main representative entity for the user", "properties": { "id": { "type": "integer" }, "ulid": { "type": "string", "nullable": true }, "type": { "type": "string", "enum": [ "brand", "property", "agency" ] }, "name": { "type": "string" }, "logo": { "type": "string", "nullable": true }, "market": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object", "nullable": true }, "league_id": { "type": "integer", "nullable": true }, "league_name": { "type": "string", "nullable": true }, "genre_id": { "type": "integer", "nullable": true }, "subgenre_id": { "type": "integer", "nullable": true }, "category_id": { "type": "integer", "nullable": true }, "category_name": { "type": "string", "nullable": true }, "subcategory_id": { "type": "integer", "nullable": true }, "leagues": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "nullable": true } }, "type": "object" }, "representatives": { "description": "All representative entities for the user", "type": "array", "items": { "properties": { "id": { "type": "integer" }, "ulid": { "type": "string", "nullable": true }, "type": { "type": "string", "enum": [ "brand", "property", "agency" ] }, "name": { "type": "string" }, "logo": { "type": "string", "nullable": true }, "is_main": { "type": "boolean" } }, "type": "object" } }, "teams": { "description": "Properties/teams the user has access to", "type": "array", "items": { "type": "object" } }, "agencies": { "description": "Agencies the user has access to", "type": "array", "items": { "type": "object" } }, "brands": { "description": "Brands/companies the user has access to", "type": "array", "items": { "type": "object" } }, "teams_count": { "description": "Total teams count", "type": "integer" }, "agencies_count": { "description": "Total agencies count", "type": "integer" }, "brands_count": { "description": "Total brands count", "type": "integer" }, "access": { "description": "User access permissions", "properties": { "markets": { "type": "array", "items": { "type": "object" } }, "property_types": { "type": "array", "items": { "type": "object" } } }, "type": "object" }, "viewEntity": { "description": "Currently selected view entity", "properties": { "type": { "type": "string", "enum": [ "team", "brand", "agency" ] }, "entity": { "type": "object" } }, "type": "object", "nullable": true }, "active_subscription": { "description": "Whether user has active subscription", "type": "boolean" }, "refreshed_token": { "description": "Refreshed JWT token if applicable", "type": "string", "nullable": true } }, "type": "object" } ] }, "UserOrganizationAgenciesResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "integer" } }, "type": "object" }, "UserOrganizationBrandsResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "integer" } }, "type": "object" }, "UserOrganizationPropertiesResource": { "properties": { "id": { "type": "integer" }, "name": { "type": "integer" } }, "type": "object" }, "UserOrganizationResource": { "properties": { "user": { "type": "object", "allOf": [ { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "email": { "type": "string" }, "avatar": { "type": "string" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" } }, "is_external": { "type": "string" }, "user_permissions": { "type": "array", "items": {} }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/UserOrganizationPropertiesResource" } }, "brands": { "type": "array", "items": { "$ref": "#/components/schemas/UserOrganizationBrandsResource" } }, "agencies": { "type": "array", "items": { "$ref": "#/components/schemas/UserOrganizationAgenciesResource" } }, "created_at": { "type": "string" }, "last_active_at": { "type": "string" }, "deleted_at": { "type": "string" }, "billable": { "type": "array", "items": {} } }, "type": "object" } ] } }, "type": "object" }, "UserProfileResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/User" }, { "properties": { "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" } }, "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/Organization" } }, "person_profile": { "$ref": "#/components/schemas/PersonProfile" }, "user_permissions": { "type": "array", "items": {} } }, "type": "object" } ] }, "UserRepresentativeResource": { "description": "User representative information", "properties": { "id": { "description": "Representative ID", "type": "integer" }, "is_main": { "description": "Whether this is the main representative", "type": "boolean" }, "name": { "description": "Representative name", "type": "string" }, "representative_type": { "description": "Type of representative", "type": "string" } }, "type": "object" }, "UserResource": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/User" }, { "properties": { "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" } }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/Property" } }, "agencies": { "type": "array", "items": { "$ref": "#/components/schemas/Agency" } }, "brands": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "organization": { "type": "array", "items": { "$ref": "#/components/schemas/Organization" } }, "person_profile": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/PersonProfile" }, { "properties": { "contact_details": { "$ref": "#/components/schemas/PersonProfileContactDetail" }, "social_details": { "$ref": "#/components/schemas/PersonProfileSocialDetail" } }, "type": "object" } ] }, "user_permissions": { "type": "array", "items": {} }, "role_orientation": { "oneOf": [ { "$ref": "#/components/schemas/RoleOrientationResource" } ], "nullable": true } }, "type": "object" } ] }, "UserSalesforceIntegrationResource": { "description": "User Salesforce integration status and configuration", "properties": { "has_set_salesforce_integration": { "description": "Whether Salesforce integration is configured", "type": "boolean" }, "access_token": { "description": "Salesforce access token", "type": "string", "nullable": true }, "export_contact": { "description": "Whether contact export is enabled", "type": "boolean" }, "export_lead": { "description": "Whether lead export is enabled", "type": "boolean" }, "user_monthly_limit": { "description": "User's monthly export limit", "type": "integer" }, "user_annual_limit": { "description": "User's annual export limit", "type": "integer" }, "monthly_limit": { "description": "Organization monthly limit", "type": "integer" }, "annual_limit": { "description": "Annual balance remaining", "type": "integer" }, "authorization_url": { "description": "Salesforce OAuth authorization URL", "type": "string" }, "should_alert_download_limits": { "description": "Whether to show download limit alerts", "type": "boolean" } }, "type": "object" }, "UserSearchResource": { "type": "array", "items": { "$ref": "#/components/schemas/GenericEntity" } }, "YoutubeBrandAssetCombinationResource": { "properties": { "brand_name": { "description": "Brand name", "type": "string", "example": "Nike" }, "asset_name": { "description": "Asset name", "type": "string", "example": "Jersey Sleeve Logo" } }, "type": "object" }, "AdministrativeLevel": { "properties": { "id": { "type": "integer" }, "country_id": { "type": "integer" }, "name": { "type": "string" }, "type": { "type": "string" }, "hc_key": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Agency": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "synopsis": { "type": "string" }, "logo": { "type": "string" }, "no_of_employees": { "type": "integer" }, "corporate_phone": { "type": "string" }, "website": { "type": "string" }, "linkedin": { "type": "string" }, "linkedin_id_url": { "type": "string" }, "linkedin_employees": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "twitch": { "type": "string" }, "tiktok": { "type": "string" }, "youtube": { "type": "string" }, "feed_url": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "AgencyService": { "properties": { "id": { "type": "integer" }, "service_type_id": { "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "AgencyServicesType": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Audio": { "properties": { "id": { "type": "integer" }, "original_name": { "type": "string" }, "stored_name": { "type": "string" }, "vtt_url": { "type": "string" }, "processed_json_file_url": { "type": "string" }, "transcribe_job_id": { "type": "string" }, "transcribe_job_status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "item_subplatform_id": { "type": "integer", "nullable": true } }, "type": "object" }, "Company": { "properties": { "id": { "type": "integer" }, "parent_company_id": { "type": "integer" }, "subcategory_id": { "type": "integer" }, "categories_id": { "type": "integer" }, "name": { "type": "string" }, "synopsis": { "type": "string" }, "corporate_phone": { "type": "string" }, "website": { "type": "string" }, "linkedin": { "type": "string" }, "linkedin_id_url": { "type": "string" }, "linkedin_employees": { "type": "string" }, "facebook": { "type": "string" }, "twitter": { "type": "string" }, "instagram": { "type": "string" }, "twitch": { "type": "string" }, "tiktok": { "type": "string" }, "youtube": { "type": "string" }, "exclude_from_social_scan": { "type": "boolean" }, "exclude_from_transcribe": { "type": "boolean" }, "feed_url": { "type": "string" }, "statistics": { "type": "string" }, "no_of_employees": { "type": "string" }, "priority_markets": { "type": "string" }, "parent_company": { "type": "string" }, "ad_agency": { "type": "string" }, "existing": { "type": "string" }, "owned_by": { "type": "string" }, "approved": { "type": "boolean" }, "approved_by": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "CompanySlim": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" }, "PersonProfile": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "avatar_id": { "type": "integer", "nullable": true }, "person_profile_job_role_id": { "type": "integer", "nullable": true }, "market_id": { "type": "integer", "nullable": true }, "name": { "type": "string" }, "job_title": { "type": "string", "nullable": true }, "location": { "type": "string", "nullable": true }, "school": { "type": "string", "nullable": true }, "info": { "type": "string", "nullable": true }, "suggested": { "type": "integer", "nullable": true }, "previous_suggested": { "type": "integer", "nullable": true }, "approved": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "PersonProfileContactDetail": { "properties": { "id": { "type": "integer" }, "person_profile_id": { "type": "integer" }, "primary_email": { "type": "string" }, "secondary_email": { "type": "string" }, "previous_primary_email_status": { "type": "string" }, "previous_primary_email_status_updated_at": { "type": "string", "format": "date-time" }, "primary_email_status": { "type": "string" }, "primary_email_status_updated_at": { "type": "string", "format": "date-time" }, "manual_primary_email_status": { "type": "string" }, "manual_primary_email_status_updated_at": { "type": "string", "format": "date-time" }, "mail_code": { "type": "string" }, "phone": { "type": "string" }, "phone_country": { "type": "string" }, "phone_number": { "type": "string" }, "phone_extension": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "PersonProfileSocialDetail": { "properties": { "id": { "type": "integer" }, "person_profile_id": { "type": "integer" }, "linkedin_profile_url": { "type": "string" }, "facebook_profile_url": { "type": "string" }, "twitter_profile_url": { "type": "string" }, "instagram_profile_url": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ContactEmailStatusFile": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "filename": { "type": "string" }, "original_filename": { "type": "string" }, "processed": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ContactLinkedinData": { "properties": { "id": { "type": "integer" }, "person_profile_id": { "type": "integer" }, "type": { "type": "string", "example": "agency|company|property" }, "data": { "description": "JSON data fetched from Linkedin, with jobs, schools, skills, general data etc.", "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "CuratedNews": { "properties": { "id": { "type": "integer" }, "url": { "type": "string" }, "is_active": { "type": "integer" }, "reporter_id": { "type": "integer" }, "title": { "type": "string" }, "description": { "type": "string" }, "image": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "content_markdown": { "type": "string" }, "ingestion_request_id": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "published_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "CustomReport": { "properties": { "id": { "description": "Custom Report Model", "type": "integer" }, "user_id": { "description": "Owner user ID", "type": "integer", "nullable": true }, "title": { "type": "string" }, "description": { "type": "string" }, "report_file_id": { "description": "Associated report file ID", "type": "integer", "nullable": true }, "thumbnail_url": { "description": "Thumbnail image URL", "type": "string", "nullable": true }, "published_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time", "nullable": true }, "owner": { "oneOf": [ { "$ref": "#/components/schemas/User" } ], "nullable": true, "description": "Report owner" }, "tags": { "description": "Associated tags", "type": "array", "items": { "$ref": "#/components/schemas/Tag" } }, "brands": { "description": "Associated brands", "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "properties": { "description": "Associated properties", "type": "array", "items": { "$ref": "#/components/schemas/Property" } }, "agencies": { "description": "Associated agencies", "type": "array", "items": { "$ref": "#/components/schemas/Agency" } }, "organizations": { "description": "Organizations with access (when assigned to all users in org)", "type": "array", "items": { "$ref": "#/components/schemas/Organization" } }, "users": { "description": "Individually assigned users", "type": "array", "items": { "$ref": "#/components/schemas/User" } } }, "type": "object" }, "FileUpload": { "properties": { "id": { "description": "The FileUpload model represents an uploaded file record, including its metadata and relation to a user and thumbnail image.", "type": "integer" }, "user_id": { "description": "The ID of the user who uploaded the file", "type": "integer", "example": 1 }, "original_name": { "description": "The original name of the uploaded file", "type": "string", "example": "document.pdf" }, "stored_name": { "description": "The stored name of the file in the filesystem", "type": "string", "example": "2023_01_document.pdf" }, "mime_type": { "description": "The MIME type of the file", "type": "string", "example": "application/pdf" }, "file_size": { "description": "The size of the file in bytes", "type": "integer", "example": 2048 }, "file_hash": { "description": "A hash of the file for integrity verification", "type": "string", "example": "5fghjk234ghj234gj234g234" }, "url": { "description": "The URL where the file can be accessed", "type": "string", "example": "https://example.com/files/2023_01_document.pdf" }, "thumbnail_id": { "description": "The ID of the thumbnail image associated with the file", "type": "integer", "example": 2 }, "created_at": { "description": "Timestamp when the file upload was created", "type": "string", "format": "date-time" }, "updated_at": { "description": "Timestamp when the file upload was last updated", "type": "string", "format": "date-time" }, "deleted_at": { "description": "Timestamp when the file upload was deleted, if applicable", "type": "string", "format": "date-time", "nullable": true } }, "type": "object" }, "FollowedEntity": { "properties": { "id": { "type": "integer" }, "entity_type": { "type": "string", "enum": [ "brand", "property", "agency" ] }, "entity_ulid": { "type": "string" }, "followed_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Genre": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "display_column": { "type": "string" }, "display_order": { "type": "string" }, "zilliz_id": { "type": "integer", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Image": { "properties": { "id": { "type": "integer" }, "storage": { "type": "string" }, "folder": { "type": "string" }, "original_name": { "type": "string" }, "stored_name": { "type": "string" }, "needs_check": { "type": "integer" }, "blurhash": { "type": "string" }, "hammhash": { "type": "string" }, "original_url": { "type": "string" }, "image_url": { "type": "string" }, "resized_image_url": { "type": "string" }, "enhanced_image_url": { "type": "string" }, "extension": { "type": "string" }, "mime_type": { "type": "string" }, "exif": { "type": "string" }, "file_size": { "type": "string" }, "width": { "type": "string" }, "height": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Infographics": { "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "original_url": { "type": "string" }, "resized_url": { "type": "string" }, "thumbnail_url": { "type": "string" }, "published_at": { "type": "string" }, "brands": { "type": "object" }, "properties": { "type": "object" }, "agencies": { "type": "object" } }, "type": "object" }, "OrganizationSalesforceIntegration": { "properties": { "id": { "type": "integer" }, "organization_id": { "type": "integer" }, "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "url": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "UserIntegration": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "access_token": { "type": "string" }, "salesforce_user_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Item": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string" }, "default_rank": { "type": "integer" }, "item_platform_id": { "type": "integer" }, "item_subplatform_id": { "type": "integer" }, "item_grouping_id": { "type": "integer" }, "hasFrequency": { "type": "integer" }, "hasDescription": { "type": "integer" }, "hasImages": { "type": "integer" }, "hasVideos": { "type": "integer" }, "hasSocialMediaValue": { "type": "integer" }, "hasAmount": { "type": "integer" }, "is_premium": { "type": "integer" }, "isSponsor": { "type": "integer" }, "isTv": { "type": "integer" }, "isRadio": { "type": "integer" }, "isVendor": { "type": "integer" }, "isSocial": { "type": "integer" }, "isDigital": { "type": "integer" }, "isPrint": { "type": "integer" }, "isOutOfHome": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ItemAudio": { "properties": { "id": { "type": "integer" }, "audio_id": { "type": "integer" }, "item_value_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ItemAudioFragment": { "properties": { "id": { "type": "integer" }, "item_audio_id": { "type": "integer" }, "start": { "type": "integer" }, "end": { "type": "integer" }, "transcription": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ItemImage": { "properties": { "id": { "type": "integer" }, "image_id": { "type": "integer" }, "item_value_id": { "type": "integer" }, "rank": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ItemValue": { "properties": { "id": { "type": "integer" }, "item_id": { "type": "integer" }, "audit_id": { "type": "integer" }, "value": { "type": "integer" }, "social_media_type": { "type": "integer" }, "social_media_value": { "type": "string" }, "frequency": { "type": "integer" }, "description": { "type": "string" }, "retained_at": { "type": "string", "format": "date-time" }, "issued_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ItemVideo": { "properties": { "id": { "type": "integer" }, "video_id": { "type": "integer" }, "item_value_id": { "type": "integer" }, "rank": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Keyword": { "properties": { "id": { "type": "integer" }, "keyword": { "type": "string" }, "image_id": { "type": "integer" }, "position": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Sport": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "League": { "properties": { "id": { "type": "integer" }, "uuid": { "type": "string" }, "genere_id": { "type": "integer" }, "subgenere_id": { "type": "integer" }, "label_id": { "type": "integer" }, "type": { "type": "string" }, "is_continuous": { "type": "integer" }, "sport_id": { "type": "integer" }, "owner_id": { "type": "integer" }, "scouting_priority": { "type": "integer" }, "platforms_scouted": { "type": "integer" }, "times_scouted_per_year": { "type": "integer" }, "name": { "type": "string" }, "short_name": { "type": "string" }, "currency": { "type": "string" }, "governing_body": { "type": "string" }, "grouping": { "type": "string" }, "website_url": { "type": "string" }, "notes": { "type": "array", "items": { "$ref": "#/components/schemas/Note" } }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "LoginPin": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "pin": { "type": "string" }, "expires_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Market": { "properties": { "id": { "type": "integer" }, "country_id": { "type": "integer" }, "region_id": { "type": "integer" }, "subregion_id": { "type": "integer" }, "name": { "type": "string" }, "market_category_id": { "type": "integer" }, "market_grouping_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "MarketGrouping": { "properties": { "id": { "type": "integer" }, "level": { "type": "string" }, "level_id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" }, "editable": { "type": "integer" }, "has_city": { "type": "integer" }, "multi_city": { "type": "integer" }, "has_county": { "type": "integer" }, "multi_county": { "type": "integer" }, "has_state": { "type": "integer" }, "multi_state": { "type": "integer" }, "has_country": { "type": "integer" }, "multi_country": { "type": "integer" }, "has_continent": { "type": "integer" }, "multi_continent": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "NewsAsset": { "properties": { "id": { "type": "integer" }, "curated_news_id": { "type": "integer" }, "ingestion_task_id": { "type": "integer", "nullable": true }, "item_id": { "type": "integer", "nullable": true }, "suggested_name": { "type": "string" }, "confidence": { "type": "number", "format": "float" }, "match_status": { "type": "string", "enum": [ "pending", "auto_match", "needs_review", "no_match", "confirmed", "dismissed" ] }, "match_candidates": { "type": "array", "items": { "type": "object" }, "nullable": true }, "context": { "type": "string", "nullable": true }, "source": { "type": "string", "enum": [ "extracted", "manual" ] }, "created_by_user_id": { "type": "integer", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "NewsContact": { "properties": { "id": { "type": "integer" }, "curated_news_id": { "type": "integer" }, "ingestion_task_id": { "type": "integer", "nullable": true }, "name": { "type": "string" }, "title": { "type": "string", "nullable": true }, "company": { "type": "string", "nullable": true }, "role_context": { "type": "string", "nullable": true }, "confidence": { "type": "number", "format": "float" }, "matched_person_profile_id": { "type": "integer", "nullable": true }, "matched_contactable_type": { "type": "string", "nullable": true }, "matched_contactable_id": { "type": "integer", "nullable": true }, "matched_contact_id": { "type": "integer", "nullable": true }, "match_status": { "type": "string", "enum": [ "pending", "auto_match", "needs_review", "no_match" ] }, "match_confidence": { "type": "number", "format": "float", "nullable": true }, "match_resolved_at": { "type": "string", "format": "date-time", "nullable": true }, "match_candidates": { "type": "array", "items": { "type": "object" }, "nullable": true }, "add_status": { "type": "string", "enum": [ "not_added", "processing", "needs_review", "created", "updated", "failed" ] }, "added_at": { "type": "string", "format": "date-time", "nullable": true }, "added_by_user_id": { "type": "integer", "nullable": true }, "platform_contact_id": { "type": "integer", "nullable": true }, "add_completed_at": { "type": "string", "format": "date-time", "nullable": true }, "add_error": { "type": "string", "nullable": true }, "sourced_linkedin_url": { "type": "string", "nullable": true }, "sourced_candidates": { "type": "array", "items": { "type": "object" }, "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "NewsQuote": { "properties": { "id": { "type": "integer" }, "curated_news_id": { "type": "integer" }, "ingestion_task_id": { "type": "integer", "nullable": true }, "name": { "type": "string" }, "quote_text": { "type": "string" }, "quote_type": { "type": "string" }, "title": { "type": "string", "nullable": true }, "company": { "type": "string", "nullable": true }, "context": { "type": "string", "nullable": true }, "confidence": { "type": "number", "format": "float" }, "matched_person_profile_id": { "type": "integer", "nullable": true }, "matched_contactable_type": { "type": "string", "nullable": true }, "matched_contactable_id": { "type": "integer", "nullable": true }, "matched_contact_id": { "type": "integer", "nullable": true }, "match_status": { "type": "string", "enum": [ "pending", "auto_match", "needs_review", "no_match" ] }, "match_confidence": { "type": "number", "format": "float", "nullable": true }, "match_resolved_at": { "type": "string", "format": "date-time", "nullable": true }, "match_candidates": { "type": "array", "items": { "type": "object" }, "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "NewsTags": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "Note": { "properties": { "id": { "type": "integer" }, "notable_id": { "type": "integer" }, "notable_type": { "type": "string" }, "user_id": { "type": "integer" }, "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Organization": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "logo": { "type": "string" }, "mfa_enabled": { "type": "integer" }, "intercom_company_id": { "type": "string" }, "intercom_company_company_id": { "type": "string" }, "contract_status_id": { "type": "integer" }, "contract_payment_type_id": { "type": "integer" }, "contract_monthly_spend": { "type": "integer" }, "contract_file_url": { "type": "string" }, "contract_onboarding_date": { "type": "string", "format": "date-time" }, "contract_start_date": { "type": "string", "format": "date-time" }, "contract_end_date": { "type": "string", "format": "date-time" }, "contract_auto_renew": { "type": "integer" }, "product_id": { "type": "integer" }, "sales_user_id": { "type": "integer" }, "salesforce_id": { "type": "string" }, "account_manager_id": { "type": "integer" }, "default_user_subscription_plan_id": { "type": "string" }, "default_user_subscription_product_name": { "type": "string" }, "default_user_subscription_cancel_date": { "type": "string", "format": "date-time" }, "user_email_domain": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "OrganizationSlim": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "type": "integer", "example": "agency" }, "logo": { "type": "string" } }, "type": "object" }, "OrganizationRepresentative": { "properties": { "organization_id": { "type": "integer" }, "representative_id": { "type": "integer" }, "representative_type": { "type": "string" } }, "type": "object" }, "OrganizationType": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "properties": { "type": "boolean" }, "brands": { "type": "boolean" }, "agencies": { "type": "boolean" } }, "type": "object" }, "PartnershipReport": { "properties": { "id": { "description": "Partnership Report Model", "type": "integer" }, "title": { "type": "string" }, "description": { "type": "string" }, "report_file_id": { "description": "Associated file ID", "type": "integer", "nullable": true }, "report_external_url": { "description": "External URL to the report", "type": "string", "nullable": true }, "thumbnail_url": { "type": "string" }, "resized_url": { "type": "string", "nullable": true }, "original_url": { "type": "string", "nullable": true }, "published_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time", "nullable": true }, "tags": { "description": "Associated tags", "type": "array", "items": { "$ref": "#/components/schemas/Tag" } }, "brands": { "description": "Associated brands", "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "properties": { "description": "Associated properties", "type": "array", "items": { "$ref": "#/components/schemas/Property" } }, "agencies": { "description": "Associated agencies", "type": "array", "items": { "$ref": "#/components/schemas/Agency" } } }, "type": "object" }, "Permission": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "display_name": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Product": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "badge": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "ProductType": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "PropertyFollowersCount": { "properties": { "id": { "type": "integer" }, "session_id": { "type": "integer" }, "property_id": { "type": "integer" }, "handle": { "type": "string" }, "platform": { "type": "string" }, "main": { "type": "boolean" }, "count": { "type": "integer" }, "manual_update": { "type": "boolean" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "PropertySocialMediaDetails": { "properties": { "id": { "type": "integer" }, "session_id": { "type": "integer" }, "total_followers": { "type": "integer" }, "team_id": { "type": "integer" }, "twitter_handle": { "type": "string" }, "twitter_followers": { "type": "integer" }, "last_twitter_update_at": { "type": "string", "format": "date-time" }, "manual_twitter_update": { "type": "boolean" }, "facebook_handle": { "type": "string" }, "facebook_followers": { "type": "integer" }, "last_facebook_update_at": { "type": "string", "format": "date-time" }, "manual_facebook_update": { "type": "boolean" }, "instagram_handle": { "type": "string" }, "instagram_followers": { "type": "integer" }, "last_instagram_update_at": { "type": "string", "format": "date-time" }, "manual_instagram_update": { "type": "boolean" }, "linkedin_handle": { "type": "string" }, "linkedin_followers": { "type": "integer" }, "last_linkedin_update_at": { "type": "string", "format": "date-time" }, "manual_linkedin_update": { "type": "boolean" }, "tiktok_handle": { "type": "string" }, "tiktok_followers": { "type": "integer" }, "last_tiktok_update_at": { "type": "string", "format": "date-time" }, "manual_tiktok_update": { "type": "boolean" }, "youtube_handle": { "type": "string" }, "youtube_followers": { "type": "integer" }, "last_youtube_update_at": { "type": "string", "format": "date-time" }, "manual_youtube_update": { "type": "boolean" }, "twitch_handle": { "type": "string" }, "twitch_followers": { "type": "integer" }, "last_twitch_update_at": { "type": "string", "format": "date-time" }, "manual_twitch_update": { "type": "boolean" } }, "type": "object" }, "Role": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "display_name": { "type": "string" }, "description": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "RoleOrientation": { "properties": { "id": { "type": "integer" }, "name": { "type": "string", "enum": [ "sell_side", "buy_side", "student" ] } }, "type": "object" }, "SavedReport": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "type": { "type": "string", "example": "spend-categories|\n * spend-major-assets|\n * spend-deal-builder|\n * spend-comparison|\n * categories|\n * markets|\n * leagues|\n * assets|\n * properties-comparison|\n * brands-comparison|\n * trending-topics|\n * smart-search-results|\n * proposal-evaluator|\n * smart-lists-contacts|\n * smart-lists-brands|\n * smart-lists-properties|\n * smart-lists-agencies" }, "url": { "type": "string" }, "payload": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "image_id": { "type": "integer" } }, "type": "object" }, "ScoutingGroup": { "properties": { "id": { "type": "integer" }, "owner_id": { "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "SocialScrapingSession": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "team_id": { "type": "integer" }, "company_id": { "type": "integer" }, "type": { "type": "string" }, "handle": { "type": "string" }, "before": { "type": "string", "format": "date-time" }, "after": { "type": "string", "format": "date-time" }, "status": { "type": "string" }, "error": { "type": "string" }, "retry_count": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "TeamFacebookHandle": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "is_main": { "type": "integer" }, "followers_scraping_enabled": { "type": "integer" } }, "type": "object" }, "TeamInstagramHandle": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "is_main": { "type": "integer" }, "followers_scraping_enabled": { "type": "integer" } }, "type": "object" }, "TeamTiktokHandle": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "uid": { "type": "string" }, "is_main": { "type": "integer" }, "followers_scraping_enabled": { "type": "integer" } }, "type": "object" }, "TeamTwitchHandle": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "is_main": { "type": "integer" }, "followers_scraping_enabled": { "type": "integer" } }, "type": "object" }, "TeamTwitterHandle": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "is_main": { "type": "integer" }, "followers_scraping_enabled": { "type": "integer" } }, "type": "object" }, "TeamYoutubeHandle": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" }, "is_main": { "type": "integer" }, "followers_scraping_enabled": { "type": "integer" } }, "type": "object" }, "BucketAsset": { "properties": { "id": { "type": "integer", "example": "1" }, "name": { "type": "string", "example": "D - Exclusive/Venue/Property Services" }, "weight": { "type": "number", "example": "3,50" }, "droplets": { "type": "array", "items": { "$ref": "#/components/schemas/DropletAsset" } } }, "type": "object" }, "BucketLeagueAsset": { "properties": { "id": { "type": "integer", "example": "55" }, "league_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "296" }, "name": { "type": "string", "example": "B - Naming Rights" }, "weight": { "type": "number", "example": "1.91000" }, "cap": { "type": "integer", "example": "1" }, "droplets": { "type": "array", "items": { "$ref": "#/components/schemas/DropletLeagueAsset" } } }, "type": "object" }, "BucketLeagueProperty": { "properties": { "id": { "type": "integer", "example": "55" }, "league_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "296" }, "name": { "type": "string", "example": "B - Naming Rights" }, "league_minimum_calculated": { "type": "integer", "example": "10000" }, "league_minimum_estimated": { "type": "integer", "example": "20000" }, "droplets": { "type": "array", "items": { "$ref": "#/components/schemas/DropletLeagueProperty" } }, "revenue": { "$ref": "#/components/schemas/RevenueLeagueBucket" } }, "type": "object" }, "CustomDropletLeagueAsset": { "properties": { "id": { "type": "integer", "example": "1" }, "property_id": { "type": "integer", "example": "85" }, "brand_id": { "type": "integer", "example": "476" }, "season_id": { "type": "integer", "example": "303" }, "drop_id": { "type": "integer", "example": "1" }, "parent_line": { "type": "boolean", "example": "false" }, "bucket_id": { "type": "integer", "example": "22" } }, "type": "object" }, "DealLevel": { "properties": { "id": { "type": "integer", "example": "1" }, "property_id": { "type": "integer", "example": "47" }, "brand_id": { "type": "integer", "example": "3108" }, "season_id": { "type": "integer", "example": "292" }, "level": { "type": "string", "example": "league" } }, "type": "object" }, "DealType": { "properties": { "id": { "type": "integer", "example": "1" }, "property_id": { "type": "integer", "example": "47" }, "brand_id": { "type": "integer", "example": "3108" }, "season_id": { "type": "integer", "example": "292" }, "type": { "type": "string", "example": "league" }, "parent_line": { "type": "integer", "example": "0" } }, "type": "object" }, "DropletAsset": { "properties": { "id": { "type": "integer", "example": "3" }, "drop_id": { "type": "integer", "example": "598" }, "bucket_id": { "type": "integer", "example": "1" } }, "type": "object" }, "DropletLeagueAsset": { "properties": { "id": { "type": "integer", "example": "3" }, "bucket_id": { "type": "integer", "example": "1" }, "drop_id": { "type": "integer", "example": "598" }, "season_id": { "type": "integer", "example": "303" } }, "type": "object" }, "DropletLeagueProperty": { "properties": { "id": { "type": "integer", "example": "3" }, "drop_id": { "type": "integer", "example": "598" }, "bucket_id": { "type": "integer", "example": "1" }, "bucket_name": { "type": "string", "example": "High Income Bucket" }, "revenue": { "$ref": "#/components/schemas/RevenueProperty" } }, "type": "object" }, "ExcludedPropertySeason": { "properties": { "id": { "type": "integer", "example": "1" }, "property_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "1" } }, "type": "object" }, "RevenueAssetBucket": { "properties": { "id": { "type": "integer", "example": "95" }, "bucket_id": { "type": "integer", "example": "115" }, "property_id": { "type": "integer", "example": "115" }, "season_id": { "type": "integer", "example": "298" }, "min": { "type": "integer", "example": "20000000" }, "max": { "type": "integer", "example": "22000000" }, "is_accepted": { "type": "integer", "example": "false" } }, "type": "object" }, "RevenueDeal": { "properties": { "id": { "type": "integer" }, "property_id": { "type": "integer" }, "brand_id": { "type": "integer" }, "season_id": { "type": "integer" }, "min": { "type": "integer" }, "max": { "type": "integer" }, "min_margin_of_error": { "type": "integer" }, "max_margin_of_error": { "type": "integer" }, "is_actual": { "type": "integer" }, "source": { "type": "integer" }, "public_url": { "type": "string" }, "multi_year_id": { "type": "integer" }, "parent_line": { "type": "boolean" }, "escalations_count": { "type": "integer" }, "escalation_percentage": { "type": "number", "format": "float" }, "revenue_multi_year": { "$ref": "#/components/schemas/RevenueDealMultiYear" } }, "type": "object" }, "RevenueDealAsset": { "properties": { "id": { "type": "integer" }, "property_id": { "type": "integer" }, "brand_id": { "type": "integer" }, "season_id": { "type": "integer" }, "asset_id": { "type": "integer" }, "is_accepted": { "type": "integer" }, "is_child_breakdown": { "type": "integer" }, "revenue": { "type": "integer" }, "spend_tracker_count": { "type": "number", "format": "float" } }, "type": "object" }, "RevenueDealMultiYear": { "properties": { "id": { "type": "integer" }, "min": { "type": "integer" }, "max": { "type": "integer" }, "revenues": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueDeal" } } }, "type": "object" }, "RevenueDealPredicted": { "properties": { "id": { "type": "integer" }, "property_id": { "type": "integer" }, "brand_id": { "type": "integer" }, "season_id": { "type": "integer" }, "is_accepted": { "type": "boolean" }, "is_final": { "type": "boolean" }, "is_child_breakdown": { "type": "boolean" }, "is_league_minimum": { "type": "boolean" }, "min": { "type": "integer" }, "max": { "type": "integer" }, "min_margin_of_error": { "type": "integer" }, "max_margin_of_error": { "type": "integer" }, "min_margin_of_error_capped": { "type": "integer" }, "max_margin_of_error_capped": { "type": "integer" }, "subcategory_factored_min": { "type": "integer" }, "subcategory_factored_max": { "type": "integer" }, "parent_line": { "type": "boolean" }, "total_assets_count": { "type": "integer" }, "total_assets_count_unique_and_amount": { "type": "number" }, "total_assets_count_unique_and_amount_and_capped": { "type": "number" }, "total_assets_amount": { "type": "integer" }, "total_assets_amount_values": { "type": "string" }, "total_assets_amount_values_with_asset_id": { "type": "string" }, "total_assets_amount_max_values_with_asset_id": { "type": "array", "items": { "type": "number" } }, "total_assets_frequency": { "type": "integer" }, "total_assets_frequency_values": { "type": "string" } }, "type": "object" }, "RevenueLeague": { "properties": { "id": { "type": "integer", "example": "7" }, "recipient_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "286" }, "min": { "type": "integer", "example": "1459000000" }, "max": { "type": "integer", "example": "1459000000" }, "is_actual": { "type": "boolean", "example": "true" }, "public_url": { "type": "string", "example": "https://www.sponsorunited.com/" } }, "type": "object" }, "RevenueLeagueBucket": { "properties": { "id": { "type": "integer", "example": "95" }, "recipient_id": { "type": "integer", "example": "115" }, "season_id": { "type": "integer", "example": "298" }, "min": { "type": "integer", "example": "20000000" }, "max": { "type": "integer", "example": "22000000" }, "is_actual": { "type": "integer", "example": "false" }, "notes": { "type": "string", "example": "a note" } }, "type": "object" }, "PredictionTotalUnits": { "properties": { "id": { "type": "integer" }, "property_id": { "type": "integer" }, "season_id": { "type": "integer" }, "is_accepted": { "type": "integer" }, "total_units": { "type": "integer" } }, "type": "object" }, "RevenueProperty": { "properties": { "id": { "type": "integer" }, "recipient_id": { "type": "integer" }, "season_id": { "type": "integer" }, "min": { "type": "integer" }, "max": { "type": "integer" }, "is_actual": { "type": "integer" }, "public_url": { "type": "string" }, "notes": { "type": "string" } }, "type": "object" }, "RevenueSubcategory": { "properties": { "id": { "type": "integer", "example": "91" }, "recipient_id": { "type": "integer", "example": "41" }, "season_id": { "type": "integer", "example": "298" }, "is_total": { "type": "integer", "example": "1" }, "is_actual": { "type": "integer", "example": "0" }, "public_url": { "type": "string", "example": "https://www.sponsorunited.com/" }, "min": { "type": "integer", "example": "83700" }, "max": { "type": "integer", "example": "83700" }, "notes": { "type": "string", "example": "a note" } }, "type": "object" }, "RevenueSubcategoryFactor": { "properties": { "id": { "description": "Class RevenueSubcategoryFactor", "type": "integer", "example": "91" }, "subcategory_id": { "type": "integer", "example": "41" }, "league_id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "298" }, "factor": { "type": "number", "example": "-10.3" } }, "type": "object" }, "SpendTrackerPublishedSeason": { "properties": { "id": { "type": "integer", "example": "1" }, "season_id": { "type": "integer", "example": "303" }, "is_soft_published": { "type": "integer", "example": "1" }, "is_hard_published": { "type": "integer", "example": "0" }, "soft_published_at": { "type": "Carbon", "example": "2021-07-21 09:19:46" }, "hard_published_at": { "type": "Carbon", "example": "2021-07-21 09:19:46" } }, "type": "object" }, "SuLanguage": { "properties": { "id": { "type": "integer", "example": "1" }, "domain": { "type": "string", "example": "spend_tracker" }, "field_name": { "type": "string", "example": "deal_level_parent" }, "content": { "type": "string", "example": "lorem ipsum" } }, "type": "object" }, "Subgenere": { "properties": { "id": { "type": "integer" }, "genre_id": { "type": "integer" }, "name": { "type": "string" }, "zilliz_id": { "type": "integer", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "Tag": { "properties": { "id": { "description": "Tag Model", "type": "integer" }, "name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time", "nullable": true } }, "type": "object" }, "Task": { "properties": { "id": { "type": "integer" }, "session_id": { "type": "integer", "nullable": true }, "type": { "type": "string" }, "entity_id": { "type": "integer" }, "entity_ulid": { "type": "string" }, "entity_type": { "type": "string" }, "invalid_data": { "type": "string" }, "reason": { "type": "string" }, "assigned_to": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "due_date": { "type": "string", "format": "date-time" } }, "type": "object" }, "Property": { "properties": { "id": { "type": "integer" }, "parent_id": { "type": "integer" }, "type_id": { "type": "integer" }, "uuid": { "type": "integer" }, "division_id": { "type": "integer" }, "sport_id": { "type": "integer" }, "name": { "type": "string" }, "synopsis": { "type": "string" }, "alias": { "type": "string" }, "logo": { "type": "string" }, "cover": { "type": "string" }, "is_continuous": { "type": "integer" }, "league_level_property": { "type": "integer" }, "no_of_employees": { "type": "integer" }, "email": { "type": "string" }, "website_url": { "type": "string" }, "linkedin_url": { "type": "string" }, "linkedin_id_url": { "type": "string" }, "facebook_url": { "type": "string" }, "twitter_url": { "type": "string" }, "instagram_url": { "type": "string" }, "twitch_url": { "type": "string" }, "tiktok_url": { "type": "string" }, "youtube_url": { "type": "string" }, "exclude_from_social_scan": { "type": "integer" }, "inactive": { "type": "integer" }, "market": { "type": "string" }, "state": { "type": "string" }, "city": { "type": "string" }, "geolocation": { "type": "string" }, "corporate_phone": { "type": "string" }, "linkedin_employees": { "type": "string" }, "targeted_prospects_feed_url": { "type": "string" }, "top_sponsorship_headlines_feed_url": { "type": "string" }, "headlines_feed_url": { "type": "string" }, "capacity": { "type": "string" }, "venue_uuid": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "PropertySlim": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_aor": { "type": "integer" }, "services": { "type": "string" } }, "type": "object" }, "TeamHashtag": { "properties": { "id": { "type": "integer" }, "team_id": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "User": { "properties": { "id": { "type": "integer" }, "email": { "type": "string" }, "currency": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": "string", "format": "date-time" }, "is_external": { "type": "boolean" }, "verified": { "type": "integer" }, "genuine": { "type": "integer" }, "hubspot_id": { "type": "integer" }, "hubspot_synced_on": { "type": "string", "format": "date-time" }, "force_new_password": { "type": "integer" }, "credentials_sent_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "UserCustomReport": { "properties": { "id": { "description": "User Custom Report Model\n\nStores individual user copies of custom reports, separate from admin reports.\nUsers can rename, delete, and duplicate their own copies without affecting admin reports.", "type": "integer" }, "user_id": { "description": "Owner user ID", "type": "integer" }, "source_custom_report_id": { "description": "Original admin report ID", "type": "integer", "nullable": true }, "name": { "description": "Report name (can be renamed by user)", "type": "string" }, "report_config": { "description": "Report configuration JSON", "type": "object" }, "is_viewed": { "description": "Whether the report has been viewed by the user", "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time", "nullable": true } }, "type": "object" }, "UserDownloadFile": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "command": { "type": "string" }, "payload": { "type": "string" }, "status": { "type": "string" }, "progress": { "type": "integer" }, "filename": { "type": "string" }, "url": { "type": "string" }, "expired_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "UserEventUploads": { "properties": { "id": { "type": "integer" }, "media_id": { "type": "integer" }, "media_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "UserLinkedinCookie": { "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "cookie": { "type": "string" }, "user_agent": { "type": "string" }, "scraped_profiles_count": { "type": "integer" }, "fast_scraped_profiles_count": { "type": "integer" }, "is_sales_navigator": { "type": "boolean" }, "last_used_on": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "UserRepresentative": { "properties": { "user_id": { "type": "integer" }, "representative_id": { "type": "integer" }, "representative_type": { "type": "string" } }, "type": "object" }, "UserSetting": { "properties": { "id": { "type": "integer" }, "type": { "type": "string" }, "payload": { "type": "object" } }, "type": "object" }, "Video": { "properties": { "id": { "type": "integer" }, "original_name": { "type": "string" }, "stored_name": { "type": "string" }, "input_url": { "type": "string" }, "output_url": { "type": "string" }, "thumbnail_url": { "type": "string" }, "width": { "type": "integer" }, "height": { "type": "integer" }, "duration": { "type": "integer" }, "original_file_size": { "type": "integer" }, "job_id": { "type": "string" }, "job_status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "WeeklyReport": { "properties": { "id": { "description": "App\\Models\\WeeklyReport", "type": "string" }, "week": { "type": "string" }, "report_name": { "type": "string" }, "file_name": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" }, "PermissionsGroupedByLabel": { "properties": { "Label Name": { "description": "The name of the label under which several permissions are grouped.", "type": "array", "items": { "$ref": "#/components/schemas/Permission" } } }, "type": "object" } }, "parameters": { "ContactEmailStatusFileIndexRequest-user-id": { "name": "user_id", "in": "query", "schema": { "type": "string" } }, "ContactEmailStatusFileIndexRequest-order-by": { "name": "order_by", "in": "query", "schema": { "type": "string" } }, "ContactEmailStatusFileIndexRequest-order-direction": { "name": "order", "in": "query", "schema": { "type": "string" } }, "ContactEmailStatusFileIndexRequest-page": { "name": "page", "in": "query", "schema": { "type": "integer" } }, "ContactEmailStatusFileIndexRequest-per-page": { "name": "per_page", "in": "query", "schema": { "type": "integer" } } }, "securitySchemes": { "bearerAuth": { "type": "http", "name": "JWT Authentication", "in": "header", "bearerFormat": "JWT", "scheme": "bearer" }, "apiKeyAuth": { "type": "apiKey", "description": "Service API key for external services (ai-api, chat-api). Generate with: php artisan su:api-token:generate", "name": "X-API-Key", "in": "header" } } }, "tags": [ { "name": "Admin Surface Context", "description": "Administrator-set Surface context for users and organizations" }, { "name": "Audits", "description": "Audit management endpoints for scouting reports" }, { "name": "Location", "description": "Location management and smart search endpoints" }, { "name": "Notes", "description": "Notes management endpoints for various entities" }, { "name": "Report Sharing", "description": "Report sharing tracking endpoints" }, { "name": "RoleOrientation", "description": "Role orientation management endpoints" }, { "name": "LogoRecognition", "description": "Logo recognition and brand detection endpoints" }, { "name": "Stats", "description": "Stats Performance API endpoints" }, { "name": "Surface", "description": "Surface context and usage endpoints" }, { "name": "User Actions", "description": "User activity tracking and organization statistics endpoints" }, { "name": "Vortex", "description": "Service-to-service endpoints for the Vortex mobile app. Authenticated via X-API-Key header." }, { "name": "AI Chatbot", "description": "AI Chatbot" }, { "name": "Agency", "description": "Agency" }, { "name": "AgencyServices", "description": "AgencyServices" }, { "name": "AgencyServicesType", "description": "AgencyServicesType" }, { "name": "Asset Groupings", "description": "Asset Groupings" }, { "name": "Asset Subgroupings", "description": "Asset Subgroupings" }, { "name": "Audit Review", "description": "Audit Review" }, { "name": "AuditSynonyms", "description": "AuditSynonyms" }, { "name": "Authentication", "description": "Authentication" }, { "name": "Brand Competitors", "description": "Brand Competitors" }, { "name": "Brands Social Scraping", "description": "Brands Social Scraping" }, { "name": "BrandSynonym", "description": "BrandSynonym" }, { "name": "Campaign", "description": "Campaign" }, { "name": "Category", "description": "Category" }, { "name": "Brand", "description": "Brand" }, { "name": "Contact", "description": "Contact" }, { "name": "LinkedIn", "description": "LinkedIn" }, { "name": "Webhooks", "description": "Webhooks" }, { "name": "News", "description": "News" }, { "name": "Custom Reports", "description": "Custom Reports" }, { "name": "Data Ingestion", "description": "Data Ingestion" }, { "name": "Events", "description": "Events" }, { "name": "Facebook", "description": "Facebook" }, { "name": "Feedback", "description": "Feedback" }, { "name": "FileUploads", "description": "FileUploads" }, { "name": "Brand Clip Timings", "description": "Brand Clip Timings" }, { "name": "Hubspot", "description": "Hubspot" }, { "name": "Hubspot segments", "description": "Hubspot segments" }, { "name": "Images", "description": "Images" }, { "name": "Image Enhancer", "description": "Image Enhancer" }, { "name": "Infographics", "description": "Infographics" }, { "name": "Intercom", "description": "Intercom" }, { "name": "Internal Sync", "description": "Internal Sync" }, { "name": "Item", "description": "Item" }, { "name": "Item Image", "description": "Item Image" }, { "name": "Item Platform", "description": "Item Platform" }, { "name": "Item Subplatform", "description": "Item Subplatform" }, { "name": "Item Value", "description": "Item Value" }, { "name": "Item Video", "description": "Item Video" }, { "name": "Keyword", "description": "Keyword" }, { "name": "League", "description": "League" }, { "name": "LeagueItems", "description": "LeagueItems" }, { "name": "Search", "description": "Search" }, { "name": "Market", "description": "Market" }, { "name": "Market Grouping", "description": "Market Grouping" }, { "name": "Mobile Auth", "description": "Mobile Auth" }, { "name": "Organization", "description": "Organization" }, { "name": "Partnership Reports", "description": "Partnership Reports" }, { "name": "Roles & Permissions", "description": "Roles & Permissions" }, { "name": "Product", "description": "Product" }, { "name": "Product Type", "description": "Product Type" }, { "name": "Attendance", "description": "Attendance" }, { "name": "Representation", "description": "Representation" }, { "name": "Property", "description": "Property" }, { "name": "Saved Reports", "description": "Saved Reports" }, { "name": "Audio Download Links", "description": "Audio Download Links" }, { "name": "ScoutingYoutubeLink", "description": "ScoutingYoutubeLink" }, { "name": "UserEventUploads", "description": "UserEventUploads" }, { "name": "Scouting Groups", "description": "Scouting Groups" }, { "name": "Social Scraping Sessions", "description": "Social Scraping Sessions" }, { "name": "Spend tracker", "description": "Spend tracker" }, { "name": "language", "description": "language" }, { "name": "Subcategory", "description": "Subcategory" }, { "name": "Subscription", "description": "Subscription" }, { "name": "Tags", "description": "Tags" }, { "name": "Tasks", "description": "Tasks" }, { "name": "Transcription", "description": "Transcription" }, { "name": "Follows", "description": "Follows" }, { "name": "User", "description": "User" }, { "name": "User Management", "description": "User Management" }, { "name": "Users", "description": "Users" }, { "name": "Cookies", "description": "Cookies" }, { "name": "User Authentication", "description": "User Authentication" }, { "name": "User Custom Reports", "description": "User Custom Reports" }, { "name": "YouTube Brand Assets", "description": "YouTube Brand Assets" } ] }