> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lanten.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a contractor



## OpenAPI

````yaml /openapi.yaml put /contractors/{contractorId}
openapi: 3.1.0
info:
  title: Lanten Open API
  version: 1.0.0
  description: >
    The Lanten Open API lets you programmatically manage tenants, units,

    landlords, contractors, and work orders for your property portfolio.


    ## Authentication


    Every request must include a valid API key, created from **Settings →
    Developers**

    inside the Lanten dashboard.


    Pass the key in the as a Bearer token:


    ```

    Authorization: Bearer lk_<your-api-key>

    ```


    ## Rate Limits


    Limits are applied **per API key** using a sliding window:


    | Scope | Limit |

    |---|---|

    | All requests | 200 / minute |

    | Write operations (POST, PUT, DELETE) | 30 / minute |


    Every response includes rate limit headers:


    | Header | Description |

    |---|---|

    | `X-RateLimit-Limit` | Maximum requests allowed in the window |

    | `X-RateLimit-Remaining` | Requests remaining in the current window |

    | `X-RateLimit-Reset` | Unix timestamp (seconds) when the window resets |


    When you exceed the limit the API responds with **429 Too Many Requests**
    and a

    `Retry-After` header indicating how many seconds to wait before retrying.
servers:
  - url: https://app.lanten.co/api/open/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tenants
    description: Manage tenants
  - name: Units
    description: Manage property units
  - name: Landlords
    description: Manage landlords (property owners)
  - name: Contractors
    description: Manage contractors (tradespeople)
  - name: Work Orders
    description: Manage maintenance work orders (issues)
paths:
  /contractors/{contractorId}:
    parameters:
      - name: contractorId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    put:
      tags:
        - Contractors
      summary: Update a contractor
      operationId: updateContractor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractorUpdateInput'
      responses:
        '200':
          description: Updated contractor
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Contractor'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    ContractorUpdateInput:
      type: object
      properties:
        companyName:
          type: string
          maxLength: 260
        contactName:
          type: string
          maxLength: 260
        email:
          type: string
          format: email
          nullable: true
        phoneNumber:
          type: string
          maxLength: 160
          nullable: true
        fullAddress:
          type: string
          maxLength: 560
          nullable: true
        status:
          $ref: '#/components/schemas/ContractorStatus'
        trades:
          type: array
          items:
            type: string
        coveragePostcodes:
          type: array
          items:
            type: string
        certifications:
          type: array
          items:
            $ref: '#/components/schemas/ContractorCertification'
        insurance:
          type: array
          items:
            $ref: '#/components/schemas/ContractorInsurance'
        notes:
          type: string
          nullable: true
    Contractor:
      type: object
      properties:
        id:
          type: string
          format: uuid
        teamId:
          type: string
          format: uuid
        companyName:
          type: string
        contactName:
          type: string
        email:
          type: string
          format: email
          nullable: true
        phoneNumber:
          type: string
          nullable: true
        fullAddress:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/ContractorStatus'
        trades:
          type: array
          items:
            type: string
        coveragePostcodes:
          type: array
          items:
            type: string
        certifications:
          type: array
          items:
            $ref: '#/components/schemas/ContractorCertification'
        insurance:
          type: array
          items:
            $ref: '#/components/schemas/ContractorInsurance'
        rating:
          type: integer
          nullable: true
        completedJobs:
          type: integer
        notes:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
    ContractorStatus:
      type: string
      enum:
        - active
        - inactive
        - on_holiday
    ContractorCertification:
      type: object
      required:
        - type
        - registrationNumber
      properties:
        type:
          type: string
          minLength: 1
        registrationNumber:
          type: string
          minLength: 1
        expiryDate:
          type: string
          format: date-time
          nullable: true
    ContractorInsurance:
      type: object
      required:
        - type
        - amount
      properties:
        type:
          type: string
          minLength: 1
        amount:
          type: number
          exclusiveMinimum: 0
        expiryDate:
          type: string
          format: date-time
          nullable: true
  responses:
    TooManyRequests:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) at which the current window resets.
      schema:
        type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````