# catalog_licenses_program_update_create API View for updating existing program licenses. This endpoint allows administrators to update the properties of an existing program license. Methods: POST: Update an existing program license Request Body: A JSON object containing: - license_id (int, optional): The ID of the license to update (required if external_id not provided) - external_id (str, optional): External identifier of the license to update (required if license_id not provided) - name (str, optional): Updated display name for the license - count (int, optional): Updated number of seats purchased - started (datetime, optional): Updated date when license should begin - expired (datetime, optional): Updated date when license should expire - active (bool, optional): Updated active status - metadata (dict, optional): Updated additional license metadata - enrollment_config (dict, optional): Updated enrollment configuration - source (str, optional): Updated source identifier - change_type (str, optional): Type of change being made (default: "update") Returns: POST: A JSON response containing the updated license: { "id": 123, "created": "2023-06-15T14:30:00Z", "started": "2023-06-15T14:30:00Z", "expired": "2024-06-15T14:30:00Z", "name": "Updated Program License 2023", "count": 150, "active": true, "metadata": {"updated": true}, "source": "updated-source", "external_id": "ext-123", "platform_key": "platform1", "program_id": "program-v1:org+program+run" } Error Responses: 400 Bad Request: If required parameters are missing or invalid 401 Unauthorized: If the user is not authenticated 403 Forbidden: If the user does not have permission to update licenses 404 Not Found: If the specified license doesn't exist 500 Internal Server Error: If an unexpected error occurs during license update Access Control: - Requires IsDMAdmin permission - Available only to DM administrators Notes: - Cannot update the platform or program associated with a license - A license history record is automatically created for each update Endpoint: POST /api/catalog/licenses/program/update/ Version: 3.59.0-ai-plus Security: PlatformApiKeyAuthentication ## Request fields (application/json): - `license_id` (integer) The ID of the license to update (required if external_id not provided) - `external_id` (string) External identifier of the license to update (required if license_id not provided) - `name` (string) Updated display name for the license - `count` (integer) Updated number of seats purchased - `started` (string) Updated date when license should begin - `expired` (string,null) Updated date when license should expire - `active` (boolean) Updated active status - `metadata` (object) Updated additional license metadata - `enrollment_config` (object) Updated enrollment configuration - `source` (string) Updated source identifier - `transaction_id` (string) Transaction identifier for tracking - `change_type` (string) Type of change being made ## Response 200 fields (application/json): - `id` (integer, required) The unique identifier for the license - `created` (string, required) When the license was created - `started` (string, required) When the license becomes active - `expired` (string,null, required) When the license expires (null if no expiration) - `name` (string, required) The display name of the license - `count` (integer, required) The number of seats purchased - `active` (boolean, required) Whether the license is active - `metadata` (object, required) Additional license metadata - `source` (string, required) The source identifier for the license - `external_id` (string,null, required) External identifier for the license (null if none) - `platform_key` (string, required) The platform key associated with the license - `program_id` (string) The program ID associated with the license - `program_key` (string) The program key associated with the license - `program_name` (string) The name of the program associated with the license - `usage_count` (integer, required) Number of assignments using this license - `assignments` (object) Assignment counts by status (only included in verbose mode)