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

# Update site

> Update an existing site's information.

Only fields included in the request will be updated. Returns the updated site details.



## OpenAPI

````yaml PATCH /entities/site/{site_id}
openapi: 3.1.0
info:
  title: Axle API Docs
  description: >-
    For full documentation please see our official docs at <a
    href='http://docs.axle.energy'>docs.axle.energy</a>
  version: 1.4.6
servers:
  - url: https://api-sandbox.axle.energy
security: []
tags:
  - name: 1. Authentication
    description: Authenticate yourself with the Axle API
  - name: 2. Meters
    description: Find key info about your sites
  - name: 3. Sites
    description: Register your sites with Axle; configure market participation
  - name: 4. Assets
    description: Register your assets with Axle
  - name: 5. Data
    description: Send asset metrics to Axle, for analysis and optimisation purposes
  - name: 6. Rewards
    description: >-
      Determine how much your users have earned by participating with Axle;
      allow balance withdrawal
  - name: 7. Validation
    description: Validate structured data against Axle's rules
  - name: 8. Examples
    description: Get example data for testing
paths:
  /entities/site/{site_id}:
    patch:
      tags:
        - 3. Sites
      summary: Update Site
      description: >-
        Update an existing site's information.


        Only fields included in the request will be updated. Returns the updated
        site details.
      operationId: update_site_entities_site__site_id__patch
      parameters:
        - required: true
          schema:
            type: string
            format: uuid
            title: Site Id
          name: site_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiteResponse'
        '404':
          description: Site not found or not authorized to access
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    SiteUpdateRequest:
      properties:
        tariff:
          allOf:
            - $ref: '#/components/schemas/TariffRequest'
          title: Tariff
          description: Tariff information to update
        address:
          type: string
          title: Address
          description: Full address for the site
        postcode:
          type: string
          title: Postcode
          description: UK postcode for the site
        mpan:
          type: string
          title: Mpan
          description: Meter Point Administration Number
        email:
          type: string
          title: Email
          description: Email address for the site
      type: object
      title: SiteUpdateRequest
      description: Request model for updating site information.
    SiteResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Axle's internal UUID for the site
        mpan:
          type: string
          title: Mpan
          description: Meter Point Administration Number for the site
        postcode:
          type: string
          title: Postcode
          description: UK postcode for the site
        address:
          type: string
          title: Address
          description: Full address for the site
        asset_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Asset Ids
          description: List of asset IDs associated with this site
          default: []
        markets:
          items:
            $ref: '#/components/schemas/MarketResponse'
          type: array
          uniqueItems: true
          description: Markets the site is participating in
        dispatch_methods:
          items:
            $ref: '#/components/schemas/DispatchMethodResponse'
          type: array
          uniqueItems: true
          description: Dispatch methods allowed for the site
        tariff:
          allOf:
            - $ref: '#/components/schemas/TariffResponse'
          title: Tariff
          description: Tariff information for the site
        gave_boundary_meter_consent_at:
          type: string
          format: date-time
          title: Gave Boundary Meter Consent At
          description: Timestamp when boundary meter consent was given
      type: object
      required:
        - id
      title: SiteResponse
      description: Response model for site information.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TariffRequest:
      properties:
        tariff_cheap_start_time:
          type: string
          format: time
          title: Tariff Cheap Start Time
          description: Start time for off-peak/cheap rate period
        tariff_cheap_end_time:
          type: string
          format: time
          title: Tariff Cheap End Time
          description: End time for off-peak/cheap rate period
        tariff_type:
          allOf:
            - $ref: '#/components/schemas/TariffType'
          description: Type of tariff
      type: object
      required:
        - tariff_type
      title: TariffRequest
      description: Request model for updating tariff information.
    MarketResponse:
      type: string
      enum:
        - cm
        - dfs
        - dno
        - lcm
        - sffr
        - wholesale
      title: MarketResponse
      description: |-
        Market types available for participation.

        - CM: Capacity Market
        - DFS: Dynamic Frequency Service
        - DNO: Distribution Network Operator flexibility services
        - LCM: Local Capacity Market
        - SFFR: Static Firm Frequency Response
        - WHOLESALE: Wholesale energy market
    DispatchMethodResponse:
      type: string
      enum:
        - cm_infrequent_dispatch
        - full_asset_schedule_control
        - limited_pause
        - vpp_limited_control
      title: DispatchMethodResponse
      description: Axle propositions that a site can enrol into.
    TariffResponse:
      properties:
        tariff_type:
          allOf:
            - $ref: '#/components/schemas/TariffType'
          description: Type of tariff
        tariff_cheap_start_time:
          type: string
          format: time
          title: Tariff Cheap Start Time
          description: Start time for off-peak/cheap rate period
        tariff_cheap_end_time:
          type: string
          format: time
          title: Tariff Cheap End Time
          description: End time for off-peak/cheap rate period
      type: object
      title: TariffResponse
      description: Response model for tariff information.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TariffType:
      type: string
      enum:
        - single_rate
        - dual_rate
        - dynamic
        - smart
        - unknown
      title: TariffType
      description: An enumeration.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/token-form

````