> ## 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.

# Enrol site

> Enrol a site in a proposition.

This is the commitment point — it activates the proposition for the site.

Idempotent: if the site is already enrolled, returns `already_enrolled` without making changes.

A 200 response always means the site is enrolled; `status` only distinguishes a new enrolment from an existing one. Any failure returns an HTTP error and leaves the site unenrolled, so fix the cause and call again.

If the site previously withdrew from this proposition (for example via `/unenrol`), returns 422 with `detail.code` set to `previously_withdrew`. Set `override_withdrawal` to true to re-enrol; this is the recommended default for user-initiated re-enrolment.



## OpenAPI

````yaml POST /entities/site/{site_id}/enrol
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}/enrol:
    post:
      tags:
        - 3. Sites
      summary: Enrol Site
      description: >-
        Enrol a site in a proposition.


        This is the commitment point — it activates the proposition for the
        site.


        Idempotent: if the site is already enrolled, returns `already_enrolled`
        without making changes.


        A 200 response always means the site is enrolled; `status` only
        distinguishes a new enrolment from an existing one. Any failure returns
        an HTTP error and leaves the site unenrolled, so fix the cause and call
        again.


        If the site previously withdrew from this proposition (for example via
        `/unenrol`), returns 422 with `detail.code` set to
        `previously_withdrew`. Set `override_withdrawal` to true to re-enrol;
        this is the recommended default for user-initiated re-enrolment.
      operationId: enrol_site_entities_site__site_id__enrol_post
      parameters:
        - name: site_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Site Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrolRequest'
      responses:
        '200':
          description: Successfully enrolled or already enrolled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrolResponse'
        '400':
          description: Invalid request (e.g. missing boundary meter consent)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithDetail'
        '404':
          description: Site not found or not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithDetail'
        '422':
          description: >-
            Enrolment refused. Either eligibility prerequisites are not met
            (`detail.eligibility` holds the per-site and per-asset breakdown) or
            the site previously withdrew from this proposition (`detail.code` is
            `previously_withdrew`; resend with `override_withdrawal: true`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrolRejectedResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithDetail'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    EnrolRequest:
      properties:
        proposition:
          type: string
          enum:
            - limited_pause
            - full_asset_schedule_control
            - price_curve
          title: Proposition
          description: Proposition to enrol for
          examples:
            - limited_pause
        override_withdrawal:
          type: boolean
          title: Override Withdrawal
          description: >-
            Set to true to re-enrol regardless of previous withdrawals. If this
            is a user-initated action, overriding previous withdrawals is
            recommended.
          default: false
          examples:
            - false
        gave_boundary_meter_consent_at:
          type: string
          format: date-time
          title: Gave Boundary Meter Consent At
          description: >-
            Optional timezone-aware ISO 8601 timestamp recording when the
            household gave boundary meter consent. If provided, overwrites any
            existing meter consent timestamp on the site.
      type: object
      required:
        - proposition
      title: EnrolRequest
      description: Request model for enrolling a site in a proposition.
    EnrolResponse:
      properties:
        site_id:
          type: string
          format: uuid
          title: Site Id
          description: ID of the enrolled site
          examples:
            - a1b2c3d4-e5f6-7890-abcd-ef1234567890
        status:
          type: string
          enum:
            - enrolled
            - already_enrolled
          title: Status
          description: >-
            Outcome of the enrolment attempt. Both `enrolled` and
            `already_enrolled` indicate success.
          examples:
            - enrolled
      type: object
      required:
        - site_id
        - status
      title: EnrolResponse
      description: Outcome of an enrolment attempt.
    ErrorWithDetail:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorWithDetail
      description: Standard error response with a detailed message.
    EnrolRejectedResponse:
      properties:
        detail:
          $ref: '#/components/schemas/EnrolRejectedDetail'
      type: object
      required:
        - detail
      title: EnrolRejectedResponse
      description: 422 body returned when an enrolment is refused. Nothing is persisted.
    EnrolRejectedDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable reason the enrolment was refused
          examples:
            - 'Prerequisites not met for proposition: limited_pause'
        code:
          type: string
          const: previously_withdrew
          title: Code
          description: >-
            Set when the site previously withdrew from this proposition. Resend
            with `override_withdrawal: true` to re-enrol.
        eligibility:
          allOf:
            - $ref: '#/components/schemas/SiteEligibilityDetail'
          description: >-
            Set when eligibility prerequisites are not met: the per-site and
            per-asset breakdown.
      type: object
      required:
        - message
      title: EnrolRejectedDetail
      description: >-
        Why an enrolment was refused: `code` for a prior withdrawal,
        `eligibility` for unmet prerequisites.
    SiteEligibilityDetail:
      properties:
        eligible_propositions:
          items:
            type: string
            enum:
              - limited_pause
              - full_asset_schedule_control
              - price_curve
          type: array
          title: Eligible Propositions
          default: []
        site_id:
          type: string
          format: uuid
          title: Site Id
          examples:
            - a1b2c3d4-e5f6-7890-abcd-ef1234567890
        site_properties:
          allOf:
            - $ref: '#/components/schemas/SiteProperties'
          examples:
            - has_meter_consent: true
              is_half_hourly_settled: false
        assets:
          items:
            $ref: '#/components/schemas/AssetEligibilityDetail'
          type: array
          title: Assets
          default: []
      type: object
      required:
        - site_id
        - site_properties
      title: SiteEligibilityDetail
      description: Eligibility detail for a site's proposition eligibility check.
    SiteProperties:
      properties:
        is_half_hourly_settled:
          type: boolean
          title: Is Half Hourly Settled
        has_meter_consent:
          type: boolean
          title: Has Meter Consent
      type: object
      required:
        - is_half_hourly_settled
        - has_meter_consent
      title: SiteProperties
      description: Site-level properties relevant to eligibility evaluation.
    AssetEligibilityDetail:
      properties:
        asset_id:
          type: string
          format: uuid
          title: Asset Id
          examples:
            - b2c3d4e5-f6a7-8901-bcde-f23456789012
        external_id:
          type: string
          title: External Id
          examples:
            - charger-001
        propositions:
          items:
            $ref: '#/components/schemas/PropositionEligibility'
          type: array
          title: Propositions
          default: []
      type: object
      required:
        - asset_id
        - external_id
      title: AssetEligibilityDetail
      description: Eligibility detail for a single asset across all propositions.
    PropositionEligibility:
      properties:
        proposition:
          type: string
          enum:
            - limited_pause
            - full_asset_schedule_control
            - price_curve
          title: Proposition
          examples:
            - limited_pause
        is_eligible:
          type: boolean
          title: Is Eligible
        issues:
          items:
            $ref: '#/components/schemas/EligibilityCode'
          type: array
          title: Issues
          default: []
      type: object
      required:
        - proposition
        - is_eligible
      title: PropositionEligibility
      description: Eligibility detail for a single proposition.
    EligibilityCode:
      type: string
      enum:
        - asset_model_not_set
        - asset_model_not_found
        - asset_model_not_cop11_qualified
        - asset_installation_date_not_set
        - asset_model_enrol_eligibility_override
        - non_domestic_site
        - mpan_not_set
        - meter_id_not_set
        - meter_id_not_found
        - postcode_not_in_eligible_area
      title: EligibilityCode
      description: Codes identifying specific eligibility issues for an asset.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/token-form

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.