> ## Documentation Index
> Fetch the complete documentation index at: https://api-documentation.kare-app.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# Recompute the background-image calibration from 2 anchor pairs (does not touch plan items)



## OpenAPI

````yaml /api/ad/openapi.json post /ad/plans/v1/{id}/calibrate
openapi: 3.0.3
info:
  title: KARE API
  description: Backend API for the KARE platform
  version: dev
servers:
  - url: http://localhost:3000
    description: Local dev
security: []
tags:
  - name: better-auth
    description: >-
      Better Auth's own endpoints (sign-in, session, MFA, password) - generated
      from the audience's live config via `generateOpenAPISchema()`, not
      hand-written.
paths:
  /ad/plans/v1/{id}/calibrate:
    post:
      tags:
        - plans
      summary: >-
        Recompute the background-image calibration from 2 anchor pairs (does not
        touch plan items)
      operationId: calibratePlanADV1
      parameters:
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: path
          name: id
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                anchors:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          reference:
                            type: object
                            properties:
                              x:
                                type: number
                                minimum: 0
                                maximum: 100
                              'y':
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - x
                              - 'y'
                          document:
                            type: object
                            properties:
                              x:
                                type: number
                                minimum: 0
                                maximum: 100
                              'y':
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - x
                              - 'y'
                        required:
                          - reference
                          - document
                      - type: object
                        properties:
                          reference:
                            type: object
                            properties:
                              x:
                                type: number
                                minimum: 0
                                maximum: 100
                              'y':
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - x
                              - 'y'
                          document:
                            type: object
                            properties:
                              x:
                                type: number
                                minimum: 0
                                maximum: 100
                              'y':
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - x
                              - 'y'
                        required:
                          - reference
                          - document
                  minItems: 2
                  maxItems: 2
              required:
                - anchors
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  calibration:
                    type: object
                    properties:
                      scale:
                        type: number
                      rotation:
                        type: number
                      offsetX:
                        type: number
                      offsetY:
                        type: number
                      calibratedAt:
                        type: string
                        format: date-time
                    required:
                      - scale
                      - rotation
                      - offsetX
                      - offsetY
                      - calibratedAt
                    additionalProperties: false
                required:
                  - id
                  - calibration
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false

````