info:
  name: Auto-Link Unlinked Books
  type: http
  seq: 1
http:
  method: POST
  url: '{{base_url}}/sync/auto-link-books'
  auth: inherit
  body:
    type: json
    jsonBody: "{\n    \"confidence_threshold\": 0.8,\n    \"limit\": 50"
  headers:
  - key: Content-Type
    value: application/json
  - key: Authorization
    value: Bearer {{authToken

docs: |-
  ## Auto-Link Unlinked Books
  
    Automatically links unlinked books to media items based on title and author matching with a configurable confidence threshold.
  
    **Method:** POST
  
    **Endpoint:** /sync/auto-link-books
  
    **Authentication:** Bearer token
  
    **Request Body:**
    - `confidence_threshold` (number, optional): Minimum confidence score for auto-linking (0-1, default: 0.8)
    - `limit` (number, optional): Maximum number of books to auto-link (default: 50)
  
    **Response:**
    - `results` (array): Results for each auto-link attempt
    - `total` (number): Total number of books processed
    - `success` (number): Number of successful links
    - `failed` (number): Number of failed links
  
    **Status Codes:**
    - 200: Success
    - 400: Invalid request data
    - 401: Unauthorized
    - 500: Internal server error
  
    **Note:** Higher confidence thresholds produce fewer but more accurate matches. Consider the tradeoff between automation and accuracy.
