{ "endpoint": "/api/sync/garmin/workouts", "method": "POST", "description": "Uploads a workout from the application to Garmin Connect.", "request": { "headers": { "Authorization": "Bearer " }, "body": { "type": "object", "properties": { "workout_id": { "type": "string", "format": "uuid", "description": "The ID of the workout to upload from CentralDB." } }, "required": ["workout_id"], "additionalProperties": false } }, "response": { "202": { "description": "Workout upload process initiated successfully.", "body": { "type": "object", "properties": { "message": { "type": "string", "example": "Garmin workout upload initiated." }, "sync_job_id": { "type": "string", "format": "uuid", "description": "ID of the created synchronization job for the workout upload." } }, "required": ["message", "sync_job_id"] } }, "401": { "description": "Unauthorized: User not authenticated or Garmin Connect account not linked.", "body": { "type": "object", "properties": { "detail": { "type": "string", "example": "Not authenticated or Garmin Connect account not linked." } } } }, "404": { "description": "Not Found: Workout with the specified ID not found.", "body": { "type": "object", "properties": { "detail": { "type": "string", "example": "Workout not found." } } } }, "429": { "description": "Too Many Requests: Rate limit exceeded for Garmin Connect API.", "body": { "type": "object", "properties": { "detail": { "type": "string", "example": "Rate limit exceeded. Please try again later." } } } }, "500": { "description": "Internal Server Error: Unexpected error during workout upload initiation.", "body": { "type": "object", "properties": { "detail": { "type": "string", "example": "An unexpected error occurred during workout upload." } } } } } }