openapi: 3.1.0
info:
  title: Api
  version: "2"
  description: API for collecting user consent and ordering electric consumption
    data from Enedis.
paths:
  /ask:
    post:
      tags:
        - asks
      operationId: ask
      parameters:
        - name: switchgrid-test-env
          in: header
          schema:
            anyOf:
              - type: string
                enum:
                  - "true"
                  - "false"
              - type: "null"
          required: false
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: "#/components/schemas/Prm"
                  createdAt:
                    type: string
                    examples:
                      - 2024-12-10T00:00:00
                      - 2024-12-10T12:00:00Z
                      - 2024-12-10T00:00:00+01:00
                      - 2024-12-10
                      - 2024-12-10T00:00:00[Europe/Paris]
                      - 2024-12-10T00:00:00[CET]
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - CREATED
                        title: CREATED
                      - type: string
                        enum:
                          - PENDING_ADDRESS_CHECK
                        title: PENDING_ADDRESS_CHECK
                      - type: string
                        enum:
                          - ADDRESS_CHECK_FAILED
                        title: ADDRESS_CHECK_FAILED
                      - type: string
                        enum:
                          - PREPARING_CONSENT_COLLECTION
                        title: PREPARING_CONSENT_COLLECTION
                      - type: string
                        enum:
                          - PENDING_USER_ACTION
                        title: PENDING_USER_ACTION
                      - type: string
                        enum:
                          - ACCEPTED
                        title: ACCEPTED
                  acceptedAt:
                    anyOf:
                      - type: string
                        examples:
                          - 2024-12-10T00:00:00
                          - 2024-12-10T12:00:00Z
                          - 2024-12-10T00:00:00+01:00
                          - 2024-12-10
                          - 2024-12-10T00:00:00[Europe/Paris]
                          - 2024-12-10T00:00:00[CET]
                      - type: "null"
                  consentCollectionDetails:
                    anyOf:
                      - anyOf:
                          - type: object
                            properties:
                              service:
                                type: string
                                enum:
                                  - DOCUSEAL
                              userUrl:
                                $ref: "#/components/schemas/Url"
                            required:
                              - service
                              - userUrl
                            additionalProperties: false
                          - type: object
                            properties:
                              service:
                                type: string
                                enum:
                                  - WEB_HOSTED
                              userUrl:
                                $ref: "#/components/schemas/Url1"
                            required:
                              - service
                              - userUrl
                            additionalProperties: false
                      - type: "null"
                  createArgs:
                    type: object
                    properties:
                      electricityContracts:
                        type: array
                        items:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - $ref: "#/components/schemas/ElectricityContract"
                        title: Electricity Contracts
                      signer:
                        anyOf:
                          - type: object
                            properties:
                              genre:
                                anyOf:
                                  - anyOf:
                                      - type: string
                                        enum:
                                          - M
                                          - F
                                      - type: "null"
                                  - type: "null"
                              lastName:
                                anyOf:
                                  - $ref: "#/components/schemas/Prm"
                                  - type: "null"
                              firstName:
                                anyOf:
                                  - $ref: "#/components/schemas/Prm"
                                  - type: "null"
                              organizationName:
                                anyOf:
                                  - anyOf:
                                      - type: string
                                        allOf:
                                          - minLength: 1
                                      - type: "null"
                                  - type: "null"
                              phone:
                                anyOf:
                                  - anyOf:
                                      - $ref: "#/components/schemas/Prm"
                                      - type: "null"
                                  - type: "null"
                              email:
                                anyOf:
                                  - anyOf:
                                      - $ref: "#/components/schemas/Prm"
                                      - type: "null"
                                  - type: "null"
                            additionalProperties: false
                            description: >-
                              The person signing the Consent request.

                              For WEB_CONSENT, all fields are optional (the user
                              will be able to fill their names and
                              organization).

                              For DOCUSEAL, fields firstName & lastName are
                              required.
                          - type: "null"
                      consentCollectionMedium:
                        anyOf:
                          - $ref: "#/components/schemas/ConsentCollectionMedium"
                          - type: "null"
                      options:
                        anyOf:
                          - type: object
                            properties:
                              skipAddressCheck:
                                anyOf:
                                  - type: boolean
                                  - type: "null"
                            additionalProperties: false
                          - type: "null"
                      scopesAndPurpose:
                        anyOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                scopes:
                                  anyOf:
                                    - type: array
                                      items:
                                        anyOf:
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  service:
                                                    type: string
                                                    enum:
                                                      - ENEDIS_RAW_API
                                                  id:
                                                    type: string
                                                    enum:
                                                      - DETAILS_CONTRACTUELS
                                                required:
                                                  - service
                                                  - id
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  service:
                                                    type: string
                                                    enum:
                                                      - ENEDIS_RAW_API
                                                  id:
                                                    type: string
                                                    enum:
                                                      - CONSUMPTION_DATA
                                                  args:
                                                    type: object
                                                    properties:
                                                      types:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - CDC
                                                            - PMAX
                                                            - IDX
                                                            - ENERGIE
                                                      directions:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - SOUTIRAGE
                                                            - INJECTION
                                                    required:
                                                      - types
                                                      - directions
                                                    additionalProperties: false
                                                required:
                                                  - service
                                                  - id
                                                  - args
                                                additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    enum:
                                                      - ELECTRICITY_TIMESERIES
                                                  args:
                                                    type: object
                                                    properties:
                                                      types:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - LOADCURVE
                                                      directions:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - CONSUMPTION
                                                            - INJECTION
                                                    required:
                                                      - types
                                                      - directions
                                                    additionalProperties: false
                                                required:
                                                  - id
                                                  - args
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    enum:
                                                      - GAS_TIMESERIES
                                                  args:
                                                    type: object
                                                    properties:
                                                      types:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - BILLING
                                                            - DAILY
                                                      directions:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - CONSUMPTION
                                                            - INJECTION
                                                    required:
                                                      - types
                                                      - directions
                                                    additionalProperties: false
                                                required:
                                                  - id
                                                  - args
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    enum:
                                                      - GAS_CONTRACT_DETAILS
                                                required:
                                                  - id
                                                additionalProperties: false
                                    - type: "null"
                                purposes:
                                  type: array
                                  items:
                                    anyOf:
                                      - anyOf:
                                          - type: string
                                            enum:
                                              - SOLAR_INSTALLATION_SIZING
                                            title: Sizing of a solar installation
                                          - type: string
                                            enum:
                                              - DEMAND_RESPONSE
                                            title: Demand response
                                          - type: string
                                            enum:
                                              - ENERGY_PERFORMANCE_STUDY
                                            title: Energy performance study
                                          - type: string
                                            enum:
                                              - ENERGY_BROKERAGE
                                            title: Energy brokerage
                                          - type: string
                                            enum:
                                              - VEHICLE_CHARGE_DETECTION
                                            title: Detection of a vehicle charge
                                      - type: object
                                        properties:
                                          id:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - SOLAR_INSTALLATION_SIZING
                                                title: Sizing of a solar installation
                                              - type: string
                                                enum:
                                                  - DEMAND_RESPONSE
                                                title: Demand response
                                              - type: string
                                                enum:
                                                  - ENERGY_PERFORMANCE_STUDY
                                                title: Energy performance study
                                              - type: string
                                                enum:
                                                  - ENERGY_BROKERAGE
                                                title: Energy brokerage
                                              - type: string
                                                enum:
                                                  - VEHICLE_CHARGE_DETECTION
                                                title: Detection of a vehicle charge
                                        required:
                                          - id
                                        additionalProperties: false
                              required:
                                - purposes
                              additionalProperties: false
                              description: "**❗️ DEPRECATED ❗️** => use `scopes` and `purposes` instead. This
                                field will be removed in a future version."
                          - type: "null"
                      scopes:
                        anyOf:
                          - type: array
                            items:
                              anyOf:
                                - anyOf:
                                    - type: object
                                      properties:
                                        service:
                                          type: string
                                          enum:
                                            - ENEDIS_RAW_API
                                        id:
                                          type: string
                                          enum:
                                            - DETAILS_CONTRACTUELS
                                      required:
                                        - service
                                        - id
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        service:
                                          type: string
                                          enum:
                                            - ENEDIS_RAW_API
                                        id:
                                          type: string
                                          enum:
                                            - CONSUMPTION_DATA
                                        args:
                                          type: object
                                          properties:
                                            types:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - CDC
                                                  - PMAX
                                                  - IDX
                                                  - ENERGIE
                                            directions:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - SOUTIRAGE
                                                  - INJECTION
                                          required:
                                            - types
                                            - directions
                                          additionalProperties: false
                                      required:
                                        - service
                                        - id
                                        - args
                                      additionalProperties: false
                                - anyOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          enum:
                                            - ELECTRICITY_TIMESERIES
                                        args:
                                          type: object
                                          properties:
                                            types:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - LOADCURVE
                                            directions:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - CONSUMPTION
                                                  - INJECTION
                                          required:
                                            - types
                                            - directions
                                          additionalProperties: false
                                      required:
                                        - id
                                        - args
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          enum:
                                            - GAS_TIMESERIES
                                        args:
                                          type: object
                                          properties:
                                            types:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - BILLING
                                                  - DAILY
                                            directions:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - CONSUMPTION
                                                  - INJECTION
                                          required:
                                            - types
                                            - directions
                                          additionalProperties: false
                                      required:
                                        - id
                                        - args
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          enum:
                                            - GAS_CONTRACT_DETAILS
                                      required:
                                        - id
                                      additionalProperties: false
                          - type: "null"
                      purposes:
                        anyOf:
                          - type: array
                            items:
                              anyOf:
                                - anyOf:
                                    - type: string
                                      enum:
                                        - SOLAR_INSTALLATION_SIZING
                                      title: Sizing of a solar installation
                                    - type: string
                                      enum:
                                        - DEMAND_RESPONSE
                                      title: Demand response
                                    - type: string
                                      enum:
                                        - ENERGY_PERFORMANCE_STUDY
                                      title: Energy performance study
                                    - type: string
                                      enum:
                                        - ENERGY_BROKERAGE
                                      title: Energy brokerage
                                    - type: string
                                      enum:
                                        - VEHICLE_CHARGE_DETECTION
                                      title: Detection of a vehicle charge
                                - type: object
                                  properties:
                                    id:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - SOLAR_INSTALLATION_SIZING
                                          title: Sizing of a solar installation
                                        - type: string
                                          enum:
                                            - DEMAND_RESPONSE
                                          title: Demand response
                                        - type: string
                                          enum:
                                            - ENERGY_PERFORMANCE_STUDY
                                          title: Energy performance study
                                        - type: string
                                          enum:
                                            - ENERGY_BROKERAGE
                                          title: Energy brokerage
                                        - type: string
                                          enum:
                                            - VEHICLE_CHARGE_DETECTION
                                          title: Detection of a vehicle charge
                                  required:
                                    - id
                                  additionalProperties: false
                          - type: "null"
                      consentDuration:
                        anyOf:
                          - anyOf:
                              - type: string
                                enum:
                                  - 1 day
                                title: 1 day
                              - type: string
                                enum:
                                  - 2 days
                                title: 2 days
                              - type: string
                                enum:
                                  - 3 days
                                title: 3 days
                              - type: string
                                enum:
                                  - 4 days
                                title: 4 days
                              - type: string
                                enum:
                                  - 5 days
                                title: 5 days
                              - type: string
                                enum:
                                  - 6 days
                                title: 6 days
                              - type: string
                                enum:
                                  - 1 week
                                title: 1 week
                              - type: string
                                enum:
                                  - 2 weeks
                                title: 2 weeks
                              - type: string
                                enum:
                                  - 3 weeks
                                title: 3 weeks
                              - type: string
                                enum:
                                  - 4 weeks
                                title: 4 weeks
                              - type: string
                                enum:
                                  - 1 month
                                title: 1 month
                              - type: string
                                enum:
                                  - 2 months
                                title: 2 months
                              - type: string
                                enum:
                                  - 3 months
                                title: 3 months
                              - type: string
                                enum:
                                  - 4 months
                                title: 4 months
                              - type: string
                                enum:
                                  - 5 months
                                title: 5 months
                              - type: string
                                enum:
                                  - 6 months
                                title: 6 months
                              - type: string
                                enum:
                                  - 1 year
                                title: 1 year
                              - type: string
                                enum:
                                  - 2 years
                                title: 2 years
                              - type: string
                                enum:
                                  - 3 years
                                title: 3 years
                              - type: string
                                enum:
                                  - 4 years
                                title: 4 years
                              - type: string
                                enum:
                                  - 5 years
                                title: 5 years
                              - type: string
                                enum:
                                  - 6 years
                                title: 6 years
                              - type: string
                                enum:
                                  - 7 years
                                title: 7 years
                              - type: string
                                enum:
                                  - 8 years
                                title: 8 years
                              - type: string
                                enum:
                                  - 9 years
                                title: 9 years
                              - type: string
                                enum:
                                  - 10 years
                                title: 10 years
                              - type: string
                                enum:
                                  - 11 years
                                title: 11 years
                              - type: string
                                enum:
                                  - 12 years
                                title: 12 years
                              - type: string
                                enum:
                                  - 13 years
                                title: 13 years
                              - type: string
                                enum:
                                  - 14 years
                                title: 14 years
                              - type: string
                                enum:
                                  - 15 years
                                title: 15 years
                              - type: string
                                enum:
                                  - 16 years
                                title: 16 years
                              - type: string
                                enum:
                                  - 17 years
                                title: 17 years
                              - type: string
                                enum:
                                  - 18 years
                                title: 18 years
                              - type: string
                                enum:
                                  - 19 years
                                title: 19 years
                              - type: string
                                enum:
                                  - 20 years
                                title: 20 years
                          - type: "null"
                      thirdPartyRecipients:
                        anyOf:
                          - type: array
                            items:
                              $ref: "#/components/schemas/Prm"
                            description: Optional list of slugs identifying third parties who will get
                              access to the data after consent is given.
                          - type: "null"
                      orgSlug:
                        anyOf:
                          - type: string
                            description: Optional slug of the organization that will be used to create the
                              ask. If using a serviceAccount (API key) this is
                              not needed. If logged in as a user that has access
                              to more than one organization, this is needed for
                              disambiguation.
                          - type: "null"
                    required:
                      - electricityContracts
                    additionalProperties: false
                    examples:
                      - electricityContracts:
                          - 606b5149-1ef0-414a-8019-a050f64cc0ac
                      - electricityContracts:
                          - 606b5149-1ef0-414a-8019-a050f64cc0ac
                        consentDuration: 1 year
                        signer:
                          email: signer-JymeC@domain.com
                          firstName: firstName
                          lastName: lastName
                        purposes:
                          - SOLAR_INSTALLATION_SIZING
                  __experimentalAddressChecksResults:
                    anyOf:
                      - type: object
                        additionalProperties:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - SUCCESS
                                - FAILURE
                          required:
                            - status
                          additionalProperties: false
                      - type: "null"
                  addressCheckResults:
                    anyOf:
                      - type: object
                        additionalProperties:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - SUCCESS
                                - FAILURE
                          required:
                            - status
                          additionalProperties: false
                      - type: "null"
                  consentIds:
                    type: object
                    additionalProperties:
                      $ref: "#/components/schemas/Prm"
                    examples:
                      - "00052775405049": 7252fa9f-b86a-4b95-a090-1012b730004c
                        "00088663455690": 2083c06a-2793-4475-affc-acfec79d4225
                  contracts:
                    type: array
                    items:
                      $ref: "#/components/schemas/EnedisElectricityContract"
                  scopes:
                    type: array
                    items:
                      anyOf:
                        - anyOf:
                            - type: object
                              properties:
                                service:
                                  type: string
                                  enum:
                                    - ENEDIS_RAW_API
                                id:
                                  type: string
                                  enum:
                                    - DETAILS_CONTRACTUELS
                              required:
                                - service
                                - id
                              additionalProperties: false
                            - type: object
                              properties:
                                service:
                                  type: string
                                  enum:
                                    - ENEDIS_RAW_API
                                id:
                                  type: string
                                  enum:
                                    - CONSUMPTION_DATA
                                args:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - CDC
                                          - PMAX
                                          - IDX
                                          - ENERGIE
                                    directions:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - SOUTIRAGE
                                          - INJECTION
                                  required:
                                    - types
                                    - directions
                                  additionalProperties: false
                              required:
                                - service
                                - id
                                - args
                              additionalProperties: false
                        - anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                  enum:
                                    - ELECTRICITY_TIMESERIES
                                args:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - LOADCURVE
                                    directions:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - CONSUMPTION
                                          - INJECTION
                                  required:
                                    - types
                                    - directions
                                  additionalProperties: false
                              required:
                                - id
                                - args
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                  enum:
                                    - GAS_TIMESERIES
                                args:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - BILLING
                                          - DAILY
                                    directions:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - CONSUMPTION
                                          - INJECTION
                                  required:
                                    - types
                                    - directions
                                  additionalProperties: false
                              required:
                                - id
                                - args
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                  enum:
                                    - GAS_CONTRACT_DETAILS
                              required:
                                - id
                              additionalProperties: false
                  purposes:
                    type: array
                    items:
                      anyOf:
                        - type: string
                          enum:
                            - SOLAR_INSTALLATION_SIZING
                          title: Sizing of a solar installation
                        - type: string
                          enum:
                            - DEMAND_RESPONSE
                          title: Demand response
                        - type: string
                          enum:
                            - ENERGY_PERFORMANCE_STUDY
                          title: Energy performance study
                        - type: string
                          enum:
                            - ENERGY_BROKERAGE
                          title: Energy brokerage
                        - type: string
                          enum:
                            - VEHICLE_CHARGE_DETECTION
                          title: Detection of a vehicle charge
                  testEnvironment:
                    type: boolean
                  thirdPartyRecipients:
                    type: array
                    items:
                      $ref: "#/components/schemas/Prm"
                required:
                  - id
                  - createdAt
                  - status
                  - acceptedAt
                  - consentCollectionDetails
                  - createArgs
                  - consentIds
                  - contracts
                  - scopes
                  - purposes
                  - testEnvironment
                  - thirdPartyRecipients
                additionalProperties: false
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      summary: Create an Ask
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                electricityContracts:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - $ref: "#/components/schemas/ElectricityContract"
                  title: Electricity Contracts
                signer:
                  anyOf:
                    - type: object
                      properties:
                        genre:
                          anyOf:
                            - anyOf:
                                - type: string
                                  enum:
                                    - M
                                    - F
                                - type: "null"
                            - type: "null"
                        lastName:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - type: "null"
                        firstName:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - type: "null"
                        organizationName:
                          anyOf:
                            - anyOf:
                                - type: string
                                  allOf:
                                    - minLength: 1
                                - type: "null"
                            - type: "null"
                        phone:
                          anyOf:
                            - anyOf:
                                - $ref: "#/components/schemas/Prm"
                                - type: "null"
                            - type: "null"
                        email:
                          anyOf:
                            - anyOf:
                                - $ref: "#/components/schemas/Prm"
                                - type: "null"
                            - type: "null"
                      additionalProperties: false
                      description: >-
                        The person signing the Consent request.

                        For WEB_CONSENT, all fields are optional (the user will
                        be able to fill their names and organization).

                        For DOCUSEAL, fields firstName & lastName are required.
                    - type: "null"
                consentCollectionMedium:
                  anyOf:
                    - $ref: "#/components/schemas/ConsentCollectionMedium"
                    - type: "null"
                options:
                  anyOf:
                    - type: object
                      properties:
                        skipAddressCheck:
                          anyOf:
                            - type: boolean
                            - type: "null"
                      additionalProperties: false
                    - type: "null"
                scopesAndPurpose:
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          scopes:
                            anyOf:
                              - type: array
                                items:
                                  anyOf:
                                    - anyOf:
                                        - type: object
                                          properties:
                                            service:
                                              type: string
                                              enum:
                                                - ENEDIS_RAW_API
                                            id:
                                              type: string
                                              enum:
                                                - DETAILS_CONTRACTUELS
                                          required:
                                            - service
                                            - id
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            service:
                                              type: string
                                              enum:
                                                - ENEDIS_RAW_API
                                            id:
                                              type: string
                                              enum:
                                                - CONSUMPTION_DATA
                                            args:
                                              type: object
                                              properties:
                                                types:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - CDC
                                                      - PMAX
                                                      - IDX
                                                      - ENERGIE
                                                directions:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - SOUTIRAGE
                                                      - INJECTION
                                              required:
                                                - types
                                                - directions
                                              additionalProperties: false
                                          required:
                                            - service
                                            - id
                                            - args
                                          additionalProperties: false
                                    - anyOf:
                                        - type: object
                                          properties:
                                            id:
                                              type: string
                                              enum:
                                                - ELECTRICITY_TIMESERIES
                                            args:
                                              type: object
                                              properties:
                                                types:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - LOADCURVE
                                                directions:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - CONSUMPTION
                                                      - INJECTION
                                              required:
                                                - types
                                                - directions
                                              additionalProperties: false
                                          required:
                                            - id
                                            - args
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            id:
                                              type: string
                                              enum:
                                                - GAS_TIMESERIES
                                            args:
                                              type: object
                                              properties:
                                                types:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - BILLING
                                                      - DAILY
                                                directions:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - CONSUMPTION
                                                      - INJECTION
                                              required:
                                                - types
                                                - directions
                                              additionalProperties: false
                                          required:
                                            - id
                                            - args
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            id:
                                              type: string
                                              enum:
                                                - GAS_CONTRACT_DETAILS
                                          required:
                                            - id
                                          additionalProperties: false
                              - type: "null"
                          purposes:
                            type: array
                            items:
                              anyOf:
                                - anyOf:
                                    - type: string
                                      enum:
                                        - SOLAR_INSTALLATION_SIZING
                                      title: Sizing of a solar installation
                                    - type: string
                                      enum:
                                        - DEMAND_RESPONSE
                                      title: Demand response
                                    - type: string
                                      enum:
                                        - ENERGY_PERFORMANCE_STUDY
                                      title: Energy performance study
                                    - type: string
                                      enum:
                                        - ENERGY_BROKERAGE
                                      title: Energy brokerage
                                    - type: string
                                      enum:
                                        - VEHICLE_CHARGE_DETECTION
                                      title: Detection of a vehicle charge
                                - type: object
                                  properties:
                                    id:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - SOLAR_INSTALLATION_SIZING
                                          title: Sizing of a solar installation
                                        - type: string
                                          enum:
                                            - DEMAND_RESPONSE
                                          title: Demand response
                                        - type: string
                                          enum:
                                            - ENERGY_PERFORMANCE_STUDY
                                          title: Energy performance study
                                        - type: string
                                          enum:
                                            - ENERGY_BROKERAGE
                                          title: Energy brokerage
                                        - type: string
                                          enum:
                                            - VEHICLE_CHARGE_DETECTION
                                          title: Detection of a vehicle charge
                                  required:
                                    - id
                                  additionalProperties: false
                        required:
                          - purposes
                        additionalProperties: false
                        description: "**❗️ DEPRECATED ❗️** => use `scopes` and `purposes` instead. This
                          field will be removed in a future version."
                    - type: "null"
                scopes:
                  anyOf:
                    - type: array
                      items:
                        anyOf:
                          - anyOf:
                              - type: object
                                properties:
                                  service:
                                    type: string
                                    enum:
                                      - ENEDIS_RAW_API
                                  id:
                                    type: string
                                    enum:
                                      - DETAILS_CONTRACTUELS
                                required:
                                  - service
                                  - id
                                additionalProperties: false
                              - type: object
                                properties:
                                  service:
                                    type: string
                                    enum:
                                      - ENEDIS_RAW_API
                                  id:
                                    type: string
                                    enum:
                                      - CONSUMPTION_DATA
                                  args:
                                    type: object
                                    properties:
                                      types:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - CDC
                                            - PMAX
                                            - IDX
                                            - ENERGIE
                                      directions:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - SOUTIRAGE
                                            - INJECTION
                                    required:
                                      - types
                                      - directions
                                    additionalProperties: false
                                required:
                                  - service
                                  - id
                                  - args
                                additionalProperties: false
                          - anyOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                    enum:
                                      - ELECTRICITY_TIMESERIES
                                  args:
                                    type: object
                                    properties:
                                      types:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - LOADCURVE
                                      directions:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - CONSUMPTION
                                            - INJECTION
                                    required:
                                      - types
                                      - directions
                                    additionalProperties: false
                                required:
                                  - id
                                  - args
                                additionalProperties: false
                              - type: object
                                properties:
                                  id:
                                    type: string
                                    enum:
                                      - GAS_TIMESERIES
                                  args:
                                    type: object
                                    properties:
                                      types:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - BILLING
                                            - DAILY
                                      directions:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - CONSUMPTION
                                            - INJECTION
                                    required:
                                      - types
                                      - directions
                                    additionalProperties: false
                                required:
                                  - id
                                  - args
                                additionalProperties: false
                              - type: object
                                properties:
                                  id:
                                    type: string
                                    enum:
                                      - GAS_CONTRACT_DETAILS
                                required:
                                  - id
                                additionalProperties: false
                    - type: "null"
                purposes:
                  anyOf:
                    - type: array
                      items:
                        anyOf:
                          - anyOf:
                              - type: string
                                enum:
                                  - SOLAR_INSTALLATION_SIZING
                                title: Sizing of a solar installation
                              - type: string
                                enum:
                                  - DEMAND_RESPONSE
                                title: Demand response
                              - type: string
                                enum:
                                  - ENERGY_PERFORMANCE_STUDY
                                title: Energy performance study
                              - type: string
                                enum:
                                  - ENERGY_BROKERAGE
                                title: Energy brokerage
                              - type: string
                                enum:
                                  - VEHICLE_CHARGE_DETECTION
                                title: Detection of a vehicle charge
                          - type: object
                            properties:
                              id:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOLAR_INSTALLATION_SIZING
                                    title: Sizing of a solar installation
                                  - type: string
                                    enum:
                                      - DEMAND_RESPONSE
                                    title: Demand response
                                  - type: string
                                    enum:
                                      - ENERGY_PERFORMANCE_STUDY
                                    title: Energy performance study
                                  - type: string
                                    enum:
                                      - ENERGY_BROKERAGE
                                    title: Energy brokerage
                                  - type: string
                                    enum:
                                      - VEHICLE_CHARGE_DETECTION
                                    title: Detection of a vehicle charge
                            required:
                              - id
                            additionalProperties: false
                    - type: "null"
                consentDuration:
                  anyOf:
                    - anyOf:
                        - type: string
                          enum:
                            - 1 day
                          title: 1 day
                        - type: string
                          enum:
                            - 2 days
                          title: 2 days
                        - type: string
                          enum:
                            - 3 days
                          title: 3 days
                        - type: string
                          enum:
                            - 4 days
                          title: 4 days
                        - type: string
                          enum:
                            - 5 days
                          title: 5 days
                        - type: string
                          enum:
                            - 6 days
                          title: 6 days
                        - type: string
                          enum:
                            - 1 week
                          title: 1 week
                        - type: string
                          enum:
                            - 2 weeks
                          title: 2 weeks
                        - type: string
                          enum:
                            - 3 weeks
                          title: 3 weeks
                        - type: string
                          enum:
                            - 4 weeks
                          title: 4 weeks
                        - type: string
                          enum:
                            - 1 month
                          title: 1 month
                        - type: string
                          enum:
                            - 2 months
                          title: 2 months
                        - type: string
                          enum:
                            - 3 months
                          title: 3 months
                        - type: string
                          enum:
                            - 4 months
                          title: 4 months
                        - type: string
                          enum:
                            - 5 months
                          title: 5 months
                        - type: string
                          enum:
                            - 6 months
                          title: 6 months
                        - type: string
                          enum:
                            - 1 year
                          title: 1 year
                        - type: string
                          enum:
                            - 2 years
                          title: 2 years
                        - type: string
                          enum:
                            - 3 years
                          title: 3 years
                        - type: string
                          enum:
                            - 4 years
                          title: 4 years
                        - type: string
                          enum:
                            - 5 years
                          title: 5 years
                        - type: string
                          enum:
                            - 6 years
                          title: 6 years
                        - type: string
                          enum:
                            - 7 years
                          title: 7 years
                        - type: string
                          enum:
                            - 8 years
                          title: 8 years
                        - type: string
                          enum:
                            - 9 years
                          title: 9 years
                        - type: string
                          enum:
                            - 10 years
                          title: 10 years
                        - type: string
                          enum:
                            - 11 years
                          title: 11 years
                        - type: string
                          enum:
                            - 12 years
                          title: 12 years
                        - type: string
                          enum:
                            - 13 years
                          title: 13 years
                        - type: string
                          enum:
                            - 14 years
                          title: 14 years
                        - type: string
                          enum:
                            - 15 years
                          title: 15 years
                        - type: string
                          enum:
                            - 16 years
                          title: 16 years
                        - type: string
                          enum:
                            - 17 years
                          title: 17 years
                        - type: string
                          enum:
                            - 18 years
                          title: 18 years
                        - type: string
                          enum:
                            - 19 years
                          title: 19 years
                        - type: string
                          enum:
                            - 20 years
                          title: 20 years
                    - type: "null"
                thirdPartyRecipients:
                  anyOf:
                    - type: array
                      items:
                        $ref: "#/components/schemas/Prm"
                      description: Optional list of slugs identifying third parties who will get
                        access to the data after consent is given.
                    - type: "null"
                orgSlug:
                  anyOf:
                    - type: string
                      description: Optional slug of the organization that will be used to create the
                        ask. If using a serviceAccount (API key) this is not
                        needed. If logged in as a user that has access to more
                        than one organization, this is needed for
                        disambiguation.
                    - type: "null"
              required:
                - electricityContracts
              additionalProperties: false
              examples:
                - electricityContracts:
                    - 606b5149-1ef0-414a-8019-a050f64cc0ac
                - electricityContracts:
                    - 606b5149-1ef0-414a-8019-a050f64cc0ac
                  consentDuration: 1 year
                  signer:
                    email: signer-JymeC@domain.com
                    firstName: firstName
                    lastName: lastName
                  purposes:
                    - SOLAR_INSTALLATION_SIZING
        required: true
    get:
      tags:
        - asks
      operationId: getAsks
      parameters:
        - name: switchgrid-test-env
          in: header
          schema:
            anyOf:
              - type: string
                enum:
                  - "true"
                  - "false"
              - type: "null"
          required: false
        - name: prm
          in: query
          schema:
            anyOf:
              - $ref: "#/components/schemas/Prm"
              - type: "null"
          required: false
        - name: status
          in: query
          schema:
            anyOf:
              - $ref: "#/components/schemas/Prm"
              - type: "null"
          required: false
        - name: skip
          in: query
          schema:
            anyOf:
              - type: string
              - type: "null"
          required: false
        - name: limit
          in: query
          schema:
            anyOf:
              - type: string
              - type: "null"
          required: false
        - name: orderBy
          in: query
          schema:
            anyOf:
              - $ref: "#/components/schemas/Prm"
              - type: "null"
          required: false
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  skip:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  limit:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  totalItemsCount:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  returnedItemsCount:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          $ref: "#/components/schemas/Prm"
                        createdAt:
                          type: string
                          examples:
                            - 2024-12-10T00:00:00
                            - 2024-12-10T12:00:00Z
                            - 2024-12-10T00:00:00+01:00
                            - 2024-12-10
                            - 2024-12-10T00:00:00[Europe/Paris]
                            - 2024-12-10T00:00:00[CET]
                        status:
                          anyOf:
                            - type: string
                              enum:
                                - CREATED
                              title: CREATED
                            - type: string
                              enum:
                                - PENDING_ADDRESS_CHECK
                              title: PENDING_ADDRESS_CHECK
                            - type: string
                              enum:
                                - ADDRESS_CHECK_FAILED
                              title: ADDRESS_CHECK_FAILED
                            - type: string
                              enum:
                                - PREPARING_CONSENT_COLLECTION
                              title: PREPARING_CONSENT_COLLECTION
                            - type: string
                              enum:
                                - PENDING_USER_ACTION
                              title: PENDING_USER_ACTION
                            - type: string
                              enum:
                                - ACCEPTED
                              title: ACCEPTED
                        acceptedAt:
                          anyOf:
                            - type: string
                              examples:
                                - 2024-12-10T00:00:00
                                - 2024-12-10T12:00:00Z
                                - 2024-12-10T00:00:00+01:00
                                - 2024-12-10
                                - 2024-12-10T00:00:00[Europe/Paris]
                                - 2024-12-10T00:00:00[CET]
                            - type: "null"
                        consentCollectionDetails:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    service:
                                      type: string
                                      enum:
                                        - DOCUSEAL
                                    userUrl:
                                      $ref: "#/components/schemas/Url"
                                  required:
                                    - service
                                    - userUrl
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    service:
                                      type: string
                                      enum:
                                        - WEB_HOSTED
                                    userUrl:
                                      $ref: "#/components/schemas/Url1"
                                  required:
                                    - service
                                    - userUrl
                                  additionalProperties: false
                            - type: "null"
                        createArgs:
                          type: object
                          properties:
                            electricityContracts:
                              type: array
                              items:
                                anyOf:
                                  - $ref: "#/components/schemas/Prm"
                                  - $ref: "#/components/schemas/ElectricityContract"
                              title: Electricity Contracts
                            signer:
                              anyOf:
                                - type: object
                                  properties:
                                    genre:
                                      anyOf:
                                        - anyOf:
                                            - type: string
                                              enum:
                                                - M
                                                - F
                                            - type: "null"
                                        - type: "null"
                                    lastName:
                                      anyOf:
                                        - $ref: "#/components/schemas/Prm"
                                        - type: "null"
                                    firstName:
                                      anyOf:
                                        - $ref: "#/components/schemas/Prm"
                                        - type: "null"
                                    organizationName:
                                      anyOf:
                                        - anyOf:
                                            - type: string
                                              allOf:
                                                - minLength: 1
                                            - type: "null"
                                        - type: "null"
                                    phone:
                                      anyOf:
                                        - anyOf:
                                            - $ref: "#/components/schemas/Prm"
                                            - type: "null"
                                        - type: "null"
                                    email:
                                      anyOf:
                                        - anyOf:
                                            - $ref: "#/components/schemas/Prm"
                                            - type: "null"
                                        - type: "null"
                                  additionalProperties: false
                                  description: >-
                                    The person signing the Consent request.

                                    For WEB_CONSENT, all fields are optional
                                    (the user will be able to fill their names
                                    and organization).

                                    For DOCUSEAL, fields firstName & lastName
                                    are required.
                                - type: "null"
                            consentCollectionMedium:
                              anyOf:
                                - $ref: "#/components/schemas/ConsentCollectionMedium"
                                - type: "null"
                            options:
                              anyOf:
                                - type: object
                                  properties:
                                    skipAddressCheck:
                                      anyOf:
                                        - type: boolean
                                        - type: "null"
                                  additionalProperties: false
                                - type: "null"
                            scopesAndPurpose:
                              anyOf:
                                - type: array
                                  items:
                                    type: object
                                    properties:
                                      scopes:
                                        anyOf:
                                          - type: array
                                            items:
                                              anyOf:
                                                - anyOf:
                                                    - type: object
                                                      properties:
                                                        service:
                                                          type: string
                                                          enum:
                                                            - ENEDIS_RAW_API
                                                        id:
                                                          type: string
                                                          enum:
                                                            - DETAILS_CONTRACTUELS
                                                      required:
                                                        - service
                                                        - id
                                                      additionalProperties: false
                                                    - type: object
                                                      properties:
                                                        service:
                                                          type: string
                                                          enum:
                                                            - ENEDIS_RAW_API
                                                        id:
                                                          type: string
                                                          enum:
                                                            - CONSUMPTION_DATA
                                                        args:
                                                          type: object
                                                          properties:
                                                            types:
                                                              type: array
                                                              items:
                                                                type: string
                                                                enum:
                                                                  - CDC
                                                                  - PMAX
                                                                  - IDX
                                                                  - ENERGIE
                                                            directions:
                                                              type: array
                                                              items:
                                                                type: string
                                                                enum:
                                                                  - SOUTIRAGE
                                                                  - INJECTION
                                                          required:
                                                            - types
                                                            - directions
                                                          additionalProperties: false
                                                      required:
                                                        - service
                                                        - id
                                                        - args
                                                      additionalProperties: false
                                                - anyOf:
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          enum:
                                                            - ELECTRICITY_TIMESERIES
                                                        args:
                                                          type: object
                                                          properties:
                                                            types:
                                                              type: array
                                                              items:
                                                                type: string
                                                                enum:
                                                                  - LOADCURVE
                                                            directions:
                                                              type: array
                                                              items:
                                                                type: string
                                                                enum:
                                                                  - CONSUMPTION
                                                                  - INJECTION
                                                          required:
                                                            - types
                                                            - directions
                                                          additionalProperties: false
                                                      required:
                                                        - id
                                                        - args
                                                      additionalProperties: false
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          enum:
                                                            - GAS_TIMESERIES
                                                        args:
                                                          type: object
                                                          properties:
                                                            types:
                                                              type: array
                                                              items:
                                                                type: string
                                                                enum:
                                                                  - BILLING
                                                                  - DAILY
                                                            directions:
                                                              type: array
                                                              items:
                                                                type: string
                                                                enum:
                                                                  - CONSUMPTION
                                                                  - INJECTION
                                                          required:
                                                            - types
                                                            - directions
                                                          additionalProperties: false
                                                      required:
                                                        - id
                                                        - args
                                                      additionalProperties: false
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          enum:
                                                            - GAS_CONTRACT_DETAILS
                                                      required:
                                                        - id
                                                      additionalProperties: false
                                          - type: "null"
                                      purposes:
                                        type: array
                                        items:
                                          anyOf:
                                            - anyOf:
                                                - type: string
                                                  enum:
                                                    - SOLAR_INSTALLATION_SIZING
                                                  title: Sizing of a solar installation
                                                - type: string
                                                  enum:
                                                    - DEMAND_RESPONSE
                                                  title: Demand response
                                                - type: string
                                                  enum:
                                                    - ENERGY_PERFORMANCE_STUDY
                                                  title: Energy performance study
                                                - type: string
                                                  enum:
                                                    - ENERGY_BROKERAGE
                                                  title: Energy brokerage
                                                - type: string
                                                  enum:
                                                    - VEHICLE_CHARGE_DETECTION
                                                  title: Detection of a vehicle charge
                                            - type: object
                                              properties:
                                                id:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - SOLAR_INSTALLATION_SIZING
                                                      title: Sizing of a solar installation
                                                    - type: string
                                                      enum:
                                                        - DEMAND_RESPONSE
                                                      title: Demand response
                                                    - type: string
                                                      enum:
                                                        - ENERGY_PERFORMANCE_STUDY
                                                      title: Energy performance study
                                                    - type: string
                                                      enum:
                                                        - ENERGY_BROKERAGE
                                                      title: Energy brokerage
                                                    - type: string
                                                      enum:
                                                        - VEHICLE_CHARGE_DETECTION
                                                      title: Detection of a vehicle charge
                                              required:
                                                - id
                                              additionalProperties: false
                                    required:
                                      - purposes
                                    additionalProperties: false
                                    description: "**❗️ DEPRECATED ❗️** => use `scopes` and `purposes` instead. This
                                      field will be removed in a future
                                      version."
                                - type: "null"
                            scopes:
                              anyOf:
                                - type: array
                                  items:
                                    anyOf:
                                      - anyOf:
                                          - type: object
                                            properties:
                                              service:
                                                type: string
                                                enum:
                                                  - ENEDIS_RAW_API
                                              id:
                                                type: string
                                                enum:
                                                  - DETAILS_CONTRACTUELS
                                            required:
                                              - service
                                              - id
                                            additionalProperties: false
                                          - type: object
                                            properties:
                                              service:
                                                type: string
                                                enum:
                                                  - ENEDIS_RAW_API
                                              id:
                                                type: string
                                                enum:
                                                  - CONSUMPTION_DATA
                                              args:
                                                type: object
                                                properties:
                                                  types:
                                                    type: array
                                                    items:
                                                      type: string
                                                      enum:
                                                        - CDC
                                                        - PMAX
                                                        - IDX
                                                        - ENERGIE
                                                  directions:
                                                    type: array
                                                    items:
                                                      type: string
                                                      enum:
                                                        - SOUTIRAGE
                                                        - INJECTION
                                                required:
                                                  - types
                                                  - directions
                                                additionalProperties: false
                                            required:
                                              - service
                                              - id
                                              - args
                                            additionalProperties: false
                                      - anyOf:
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                enum:
                                                  - ELECTRICITY_TIMESERIES
                                              args:
                                                type: object
                                                properties:
                                                  types:
                                                    type: array
                                                    items:
                                                      type: string
                                                      enum:
                                                        - LOADCURVE
                                                  directions:
                                                    type: array
                                                    items:
                                                      type: string
                                                      enum:
                                                        - CONSUMPTION
                                                        - INJECTION
                                                required:
                                                  - types
                                                  - directions
                                                additionalProperties: false
                                            required:
                                              - id
                                              - args
                                            additionalProperties: false
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                enum:
                                                  - GAS_TIMESERIES
                                              args:
                                                type: object
                                                properties:
                                                  types:
                                                    type: array
                                                    items:
                                                      type: string
                                                      enum:
                                                        - BILLING
                                                        - DAILY
                                                  directions:
                                                    type: array
                                                    items:
                                                      type: string
                                                      enum:
                                                        - CONSUMPTION
                                                        - INJECTION
                                                required:
                                                  - types
                                                  - directions
                                                additionalProperties: false
                                            required:
                                              - id
                                              - args
                                            additionalProperties: false
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                enum:
                                                  - GAS_CONTRACT_DETAILS
                                            required:
                                              - id
                                            additionalProperties: false
                                - type: "null"
                            purposes:
                              anyOf:
                                - type: array
                                  items:
                                    anyOf:
                                      - anyOf:
                                          - type: string
                                            enum:
                                              - SOLAR_INSTALLATION_SIZING
                                            title: Sizing of a solar installation
                                          - type: string
                                            enum:
                                              - DEMAND_RESPONSE
                                            title: Demand response
                                          - type: string
                                            enum:
                                              - ENERGY_PERFORMANCE_STUDY
                                            title: Energy performance study
                                          - type: string
                                            enum:
                                              - ENERGY_BROKERAGE
                                            title: Energy brokerage
                                          - type: string
                                            enum:
                                              - VEHICLE_CHARGE_DETECTION
                                            title: Detection of a vehicle charge
                                      - type: object
                                        properties:
                                          id:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - SOLAR_INSTALLATION_SIZING
                                                title: Sizing of a solar installation
                                              - type: string
                                                enum:
                                                  - DEMAND_RESPONSE
                                                title: Demand response
                                              - type: string
                                                enum:
                                                  - ENERGY_PERFORMANCE_STUDY
                                                title: Energy performance study
                                              - type: string
                                                enum:
                                                  - ENERGY_BROKERAGE
                                                title: Energy brokerage
                                              - type: string
                                                enum:
                                                  - VEHICLE_CHARGE_DETECTION
                                                title: Detection of a vehicle charge
                                        required:
                                          - id
                                        additionalProperties: false
                                - type: "null"
                            consentDuration:
                              anyOf:
                                - anyOf:
                                    - type: string
                                      enum:
                                        - 1 day
                                      title: 1 day
                                    - type: string
                                      enum:
                                        - 2 days
                                      title: 2 days
                                    - type: string
                                      enum:
                                        - 3 days
                                      title: 3 days
                                    - type: string
                                      enum:
                                        - 4 days
                                      title: 4 days
                                    - type: string
                                      enum:
                                        - 5 days
                                      title: 5 days
                                    - type: string
                                      enum:
                                        - 6 days
                                      title: 6 days
                                    - type: string
                                      enum:
                                        - 1 week
                                      title: 1 week
                                    - type: string
                                      enum:
                                        - 2 weeks
                                      title: 2 weeks
                                    - type: string
                                      enum:
                                        - 3 weeks
                                      title: 3 weeks
                                    - type: string
                                      enum:
                                        - 4 weeks
                                      title: 4 weeks
                                    - type: string
                                      enum:
                                        - 1 month
                                      title: 1 month
                                    - type: string
                                      enum:
                                        - 2 months
                                      title: 2 months
                                    - type: string
                                      enum:
                                        - 3 months
                                      title: 3 months
                                    - type: string
                                      enum:
                                        - 4 months
                                      title: 4 months
                                    - type: string
                                      enum:
                                        - 5 months
                                      title: 5 months
                                    - type: string
                                      enum:
                                        - 6 months
                                      title: 6 months
                                    - type: string
                                      enum:
                                        - 1 year
                                      title: 1 year
                                    - type: string
                                      enum:
                                        - 2 years
                                      title: 2 years
                                    - type: string
                                      enum:
                                        - 3 years
                                      title: 3 years
                                    - type: string
                                      enum:
                                        - 4 years
                                      title: 4 years
                                    - type: string
                                      enum:
                                        - 5 years
                                      title: 5 years
                                    - type: string
                                      enum:
                                        - 6 years
                                      title: 6 years
                                    - type: string
                                      enum:
                                        - 7 years
                                      title: 7 years
                                    - type: string
                                      enum:
                                        - 8 years
                                      title: 8 years
                                    - type: string
                                      enum:
                                        - 9 years
                                      title: 9 years
                                    - type: string
                                      enum:
                                        - 10 years
                                      title: 10 years
                                    - type: string
                                      enum:
                                        - 11 years
                                      title: 11 years
                                    - type: string
                                      enum:
                                        - 12 years
                                      title: 12 years
                                    - type: string
                                      enum:
                                        - 13 years
                                      title: 13 years
                                    - type: string
                                      enum:
                                        - 14 years
                                      title: 14 years
                                    - type: string
                                      enum:
                                        - 15 years
                                      title: 15 years
                                    - type: string
                                      enum:
                                        - 16 years
                                      title: 16 years
                                    - type: string
                                      enum:
                                        - 17 years
                                      title: 17 years
                                    - type: string
                                      enum:
                                        - 18 years
                                      title: 18 years
                                    - type: string
                                      enum:
                                        - 19 years
                                      title: 19 years
                                    - type: string
                                      enum:
                                        - 20 years
                                      title: 20 years
                                - type: "null"
                            thirdPartyRecipients:
                              anyOf:
                                - type: array
                                  items:
                                    $ref: "#/components/schemas/Prm"
                                  description: Optional list of slugs identifying third parties who will get
                                    access to the data after consent is given.
                                - type: "null"
                            orgSlug:
                              anyOf:
                                - type: string
                                  description: Optional slug of the organization that will be used to create the
                                    ask. If using a serviceAccount (API key)
                                    this is not needed. If logged in as a user
                                    that has access to more than one
                                    organization, this is needed for
                                    disambiguation.
                                - type: "null"
                          required:
                            - electricityContracts
                          additionalProperties: false
                          examples:
                            - electricityContracts:
                                - 606b5149-1ef0-414a-8019-a050f64cc0ac
                            - electricityContracts:
                                - 606b5149-1ef0-414a-8019-a050f64cc0ac
                              consentDuration: 1 year
                              signer:
                                email: signer-JymeC@domain.com
                                firstName: firstName
                                lastName: lastName
                              purposes:
                                - SOLAR_INSTALLATION_SIZING
                        __experimentalAddressChecksResults:
                          anyOf:
                            - type: object
                              additionalProperties:
                                type: object
                                properties:
                                  status:
                                    type: string
                                    enum:
                                      - SUCCESS
                                      - FAILURE
                                required:
                                  - status
                                additionalProperties: false
                            - type: "null"
                        addressCheckResults:
                          anyOf:
                            - type: object
                              additionalProperties:
                                type: object
                                properties:
                                  status:
                                    type: string
                                    enum:
                                      - SUCCESS
                                      - FAILURE
                                required:
                                  - status
                                additionalProperties: false
                            - type: "null"
                        consentIds:
                          type: object
                          additionalProperties:
                            $ref: "#/components/schemas/Prm"
                          examples:
                            - "00052775405049": 7252fa9f-b86a-4b95-a090-1012b730004c
                              "00088663455690": 2083c06a-2793-4475-affc-acfec79d4225
                        contracts:
                          type: array
                          items:
                            $ref: "#/components/schemas/EnedisElectricityContract"
                        scopes:
                          type: array
                          items:
                            anyOf:
                              - anyOf:
                                  - type: object
                                    properties:
                                      service:
                                        type: string
                                        enum:
                                          - ENEDIS_RAW_API
                                      id:
                                        type: string
                                        enum:
                                          - DETAILS_CONTRACTUELS
                                    required:
                                      - service
                                      - id
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      service:
                                        type: string
                                        enum:
                                          - ENEDIS_RAW_API
                                      id:
                                        type: string
                                        enum:
                                          - CONSUMPTION_DATA
                                      args:
                                        type: object
                                        properties:
                                          types:
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - CDC
                                                - PMAX
                                                - IDX
                                                - ENERGIE
                                          directions:
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - SOUTIRAGE
                                                - INJECTION
                                        required:
                                          - types
                                          - directions
                                        additionalProperties: false
                                    required:
                                      - service
                                      - id
                                      - args
                                    additionalProperties: false
                              - anyOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                        enum:
                                          - ELECTRICITY_TIMESERIES
                                      args:
                                        type: object
                                        properties:
                                          types:
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - LOADCURVE
                                          directions:
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - CONSUMPTION
                                                - INJECTION
                                        required:
                                          - types
                                          - directions
                                        additionalProperties: false
                                    required:
                                      - id
                                      - args
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                        enum:
                                          - GAS_TIMESERIES
                                      args:
                                        type: object
                                        properties:
                                          types:
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - BILLING
                                                - DAILY
                                          directions:
                                            type: array
                                            items:
                                              type: string
                                              enum:
                                                - CONSUMPTION
                                                - INJECTION
                                        required:
                                          - types
                                          - directions
                                        additionalProperties: false
                                    required:
                                      - id
                                      - args
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                        enum:
                                          - GAS_CONTRACT_DETAILS
                                    required:
                                      - id
                                    additionalProperties: false
                        purposes:
                          type: array
                          items:
                            anyOf:
                              - type: string
                                enum:
                                  - SOLAR_INSTALLATION_SIZING
                                title: Sizing of a solar installation
                              - type: string
                                enum:
                                  - DEMAND_RESPONSE
                                title: Demand response
                              - type: string
                                enum:
                                  - ENERGY_PERFORMANCE_STUDY
                                title: Energy performance study
                              - type: string
                                enum:
                                  - ENERGY_BROKERAGE
                                title: Energy brokerage
                              - type: string
                                enum:
                                  - VEHICLE_CHARGE_DETECTION
                                title: Detection of a vehicle charge
                        testEnvironment:
                          type: boolean
                        thirdPartyRecipients:
                          type: array
                          items:
                            $ref: "#/components/schemas/Prm"
                      required:
                        - id
                        - createdAt
                        - status
                        - acceptedAt
                        - consentCollectionDetails
                        - createArgs
                        - consentIds
                        - contracts
                        - scopes
                        - purposes
                        - testEnvironment
                        - thirdPartyRecipients
                      additionalProperties: false
                required:
                  - skip
                  - limit
                  - totalItemsCount
                  - returnedItemsCount
                  - items
                additionalProperties: false
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      summary: List Asks
  /ask/{askId}:
    get:
      tags:
        - asks
      operationId: getAsk
      parameters:
        - name: askId
          in: path
          schema:
            $ref: "#/components/schemas/Prm"
          required: true
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: "#/components/schemas/Prm"
                  createdAt:
                    type: string
                    examples:
                      - 2024-12-10T00:00:00
                      - 2024-12-10T12:00:00Z
                      - 2024-12-10T00:00:00+01:00
                      - 2024-12-10
                      - 2024-12-10T00:00:00[Europe/Paris]
                      - 2024-12-10T00:00:00[CET]
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - CREATED
                        title: CREATED
                      - type: string
                        enum:
                          - PENDING_ADDRESS_CHECK
                        title: PENDING_ADDRESS_CHECK
                      - type: string
                        enum:
                          - ADDRESS_CHECK_FAILED
                        title: ADDRESS_CHECK_FAILED
                      - type: string
                        enum:
                          - PREPARING_CONSENT_COLLECTION
                        title: PREPARING_CONSENT_COLLECTION
                      - type: string
                        enum:
                          - PENDING_USER_ACTION
                        title: PENDING_USER_ACTION
                      - type: string
                        enum:
                          - ACCEPTED
                        title: ACCEPTED
                  acceptedAt:
                    anyOf:
                      - type: string
                        examples:
                          - 2024-12-10T00:00:00
                          - 2024-12-10T12:00:00Z
                          - 2024-12-10T00:00:00+01:00
                          - 2024-12-10
                          - 2024-12-10T00:00:00[Europe/Paris]
                          - 2024-12-10T00:00:00[CET]
                      - type: "null"
                  consentCollectionDetails:
                    anyOf:
                      - anyOf:
                          - type: object
                            properties:
                              service:
                                type: string
                                enum:
                                  - DOCUSEAL
                              userUrl:
                                $ref: "#/components/schemas/Url"
                            required:
                              - service
                              - userUrl
                            additionalProperties: false
                          - type: object
                            properties:
                              service:
                                type: string
                                enum:
                                  - WEB_HOSTED
                              userUrl:
                                $ref: "#/components/schemas/Url1"
                            required:
                              - service
                              - userUrl
                            additionalProperties: false
                      - type: "null"
                  createArgs:
                    type: object
                    properties:
                      electricityContracts:
                        type: array
                        items:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - $ref: "#/components/schemas/ElectricityContract"
                        title: Electricity Contracts
                      signer:
                        anyOf:
                          - type: object
                            properties:
                              genre:
                                anyOf:
                                  - anyOf:
                                      - type: string
                                        enum:
                                          - M
                                          - F
                                      - type: "null"
                                  - type: "null"
                              lastName:
                                anyOf:
                                  - $ref: "#/components/schemas/Prm"
                                  - type: "null"
                              firstName:
                                anyOf:
                                  - $ref: "#/components/schemas/Prm"
                                  - type: "null"
                              organizationName:
                                anyOf:
                                  - anyOf:
                                      - type: string
                                        allOf:
                                          - minLength: 1
                                      - type: "null"
                                  - type: "null"
                              phone:
                                anyOf:
                                  - anyOf:
                                      - $ref: "#/components/schemas/Prm"
                                      - type: "null"
                                  - type: "null"
                              email:
                                anyOf:
                                  - anyOf:
                                      - $ref: "#/components/schemas/Prm"
                                      - type: "null"
                                  - type: "null"
                            additionalProperties: false
                            description: >-
                              The person signing the Consent request.

                              For WEB_CONSENT, all fields are optional (the user
                              will be able to fill their names and
                              organization).

                              For DOCUSEAL, fields firstName & lastName are
                              required.
                          - type: "null"
                      consentCollectionMedium:
                        anyOf:
                          - $ref: "#/components/schemas/ConsentCollectionMedium"
                          - type: "null"
                      options:
                        anyOf:
                          - type: object
                            properties:
                              skipAddressCheck:
                                anyOf:
                                  - type: boolean
                                  - type: "null"
                            additionalProperties: false
                          - type: "null"
                      scopesAndPurpose:
                        anyOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                scopes:
                                  anyOf:
                                    - type: array
                                      items:
                                        anyOf:
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  service:
                                                    type: string
                                                    enum:
                                                      - ENEDIS_RAW_API
                                                  id:
                                                    type: string
                                                    enum:
                                                      - DETAILS_CONTRACTUELS
                                                required:
                                                  - service
                                                  - id
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  service:
                                                    type: string
                                                    enum:
                                                      - ENEDIS_RAW_API
                                                  id:
                                                    type: string
                                                    enum:
                                                      - CONSUMPTION_DATA
                                                  args:
                                                    type: object
                                                    properties:
                                                      types:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - CDC
                                                            - PMAX
                                                            - IDX
                                                            - ENERGIE
                                                      directions:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - SOUTIRAGE
                                                            - INJECTION
                                                    required:
                                                      - types
                                                      - directions
                                                    additionalProperties: false
                                                required:
                                                  - service
                                                  - id
                                                  - args
                                                additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    enum:
                                                      - ELECTRICITY_TIMESERIES
                                                  args:
                                                    type: object
                                                    properties:
                                                      types:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - LOADCURVE
                                                      directions:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - CONSUMPTION
                                                            - INJECTION
                                                    required:
                                                      - types
                                                      - directions
                                                    additionalProperties: false
                                                required:
                                                  - id
                                                  - args
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    enum:
                                                      - GAS_TIMESERIES
                                                  args:
                                                    type: object
                                                    properties:
                                                      types:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - BILLING
                                                            - DAILY
                                                      directions:
                                                        type: array
                                                        items:
                                                          type: string
                                                          enum:
                                                            - CONSUMPTION
                                                            - INJECTION
                                                    required:
                                                      - types
                                                      - directions
                                                    additionalProperties: false
                                                required:
                                                  - id
                                                  - args
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    enum:
                                                      - GAS_CONTRACT_DETAILS
                                                required:
                                                  - id
                                                additionalProperties: false
                                    - type: "null"
                                purposes:
                                  type: array
                                  items:
                                    anyOf:
                                      - anyOf:
                                          - type: string
                                            enum:
                                              - SOLAR_INSTALLATION_SIZING
                                            title: Sizing of a solar installation
                                          - type: string
                                            enum:
                                              - DEMAND_RESPONSE
                                            title: Demand response
                                          - type: string
                                            enum:
                                              - ENERGY_PERFORMANCE_STUDY
                                            title: Energy performance study
                                          - type: string
                                            enum:
                                              - ENERGY_BROKERAGE
                                            title: Energy brokerage
                                          - type: string
                                            enum:
                                              - VEHICLE_CHARGE_DETECTION
                                            title: Detection of a vehicle charge
                                      - type: object
                                        properties:
                                          id:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - SOLAR_INSTALLATION_SIZING
                                                title: Sizing of a solar installation
                                              - type: string
                                                enum:
                                                  - DEMAND_RESPONSE
                                                title: Demand response
                                              - type: string
                                                enum:
                                                  - ENERGY_PERFORMANCE_STUDY
                                                title: Energy performance study
                                              - type: string
                                                enum:
                                                  - ENERGY_BROKERAGE
                                                title: Energy brokerage
                                              - type: string
                                                enum:
                                                  - VEHICLE_CHARGE_DETECTION
                                                title: Detection of a vehicle charge
                                        required:
                                          - id
                                        additionalProperties: false
                              required:
                                - purposes
                              additionalProperties: false
                              description: "**❗️ DEPRECATED ❗️** => use `scopes` and `purposes` instead. This
                                field will be removed in a future version."
                          - type: "null"
                      scopes:
                        anyOf:
                          - type: array
                            items:
                              anyOf:
                                - anyOf:
                                    - type: object
                                      properties:
                                        service:
                                          type: string
                                          enum:
                                            - ENEDIS_RAW_API
                                        id:
                                          type: string
                                          enum:
                                            - DETAILS_CONTRACTUELS
                                      required:
                                        - service
                                        - id
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        service:
                                          type: string
                                          enum:
                                            - ENEDIS_RAW_API
                                        id:
                                          type: string
                                          enum:
                                            - CONSUMPTION_DATA
                                        args:
                                          type: object
                                          properties:
                                            types:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - CDC
                                                  - PMAX
                                                  - IDX
                                                  - ENERGIE
                                            directions:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - SOUTIRAGE
                                                  - INJECTION
                                          required:
                                            - types
                                            - directions
                                          additionalProperties: false
                                      required:
                                        - service
                                        - id
                                        - args
                                      additionalProperties: false
                                - anyOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          enum:
                                            - ELECTRICITY_TIMESERIES
                                        args:
                                          type: object
                                          properties:
                                            types:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - LOADCURVE
                                            directions:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - CONSUMPTION
                                                  - INJECTION
                                          required:
                                            - types
                                            - directions
                                          additionalProperties: false
                                      required:
                                        - id
                                        - args
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          enum:
                                            - GAS_TIMESERIES
                                        args:
                                          type: object
                                          properties:
                                            types:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - BILLING
                                                  - DAILY
                                            directions:
                                              type: array
                                              items:
                                                type: string
                                                enum:
                                                  - CONSUMPTION
                                                  - INJECTION
                                          required:
                                            - types
                                            - directions
                                          additionalProperties: false
                                      required:
                                        - id
                                        - args
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          enum:
                                            - GAS_CONTRACT_DETAILS
                                      required:
                                        - id
                                      additionalProperties: false
                          - type: "null"
                      purposes:
                        anyOf:
                          - type: array
                            items:
                              anyOf:
                                - anyOf:
                                    - type: string
                                      enum:
                                        - SOLAR_INSTALLATION_SIZING
                                      title: Sizing of a solar installation
                                    - type: string
                                      enum:
                                        - DEMAND_RESPONSE
                                      title: Demand response
                                    - type: string
                                      enum:
                                        - ENERGY_PERFORMANCE_STUDY
                                      title: Energy performance study
                                    - type: string
                                      enum:
                                        - ENERGY_BROKERAGE
                                      title: Energy brokerage
                                    - type: string
                                      enum:
                                        - VEHICLE_CHARGE_DETECTION
                                      title: Detection of a vehicle charge
                                - type: object
                                  properties:
                                    id:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - SOLAR_INSTALLATION_SIZING
                                          title: Sizing of a solar installation
                                        - type: string
                                          enum:
                                            - DEMAND_RESPONSE
                                          title: Demand response
                                        - type: string
                                          enum:
                                            - ENERGY_PERFORMANCE_STUDY
                                          title: Energy performance study
                                        - type: string
                                          enum:
                                            - ENERGY_BROKERAGE
                                          title: Energy brokerage
                                        - type: string
                                          enum:
                                            - VEHICLE_CHARGE_DETECTION
                                          title: Detection of a vehicle charge
                                  required:
                                    - id
                                  additionalProperties: false
                          - type: "null"
                      consentDuration:
                        anyOf:
                          - anyOf:
                              - type: string
                                enum:
                                  - 1 day
                                title: 1 day
                              - type: string
                                enum:
                                  - 2 days
                                title: 2 days
                              - type: string
                                enum:
                                  - 3 days
                                title: 3 days
                              - type: string
                                enum:
                                  - 4 days
                                title: 4 days
                              - type: string
                                enum:
                                  - 5 days
                                title: 5 days
                              - type: string
                                enum:
                                  - 6 days
                                title: 6 days
                              - type: string
                                enum:
                                  - 1 week
                                title: 1 week
                              - type: string
                                enum:
                                  - 2 weeks
                                title: 2 weeks
                              - type: string
                                enum:
                                  - 3 weeks
                                title: 3 weeks
                              - type: string
                                enum:
                                  - 4 weeks
                                title: 4 weeks
                              - type: string
                                enum:
                                  - 1 month
                                title: 1 month
                              - type: string
                                enum:
                                  - 2 months
                                title: 2 months
                              - type: string
                                enum:
                                  - 3 months
                                title: 3 months
                              - type: string
                                enum:
                                  - 4 months
                                title: 4 months
                              - type: string
                                enum:
                                  - 5 months
                                title: 5 months
                              - type: string
                                enum:
                                  - 6 months
                                title: 6 months
                              - type: string
                                enum:
                                  - 1 year
                                title: 1 year
                              - type: string
                                enum:
                                  - 2 years
                                title: 2 years
                              - type: string
                                enum:
                                  - 3 years
                                title: 3 years
                              - type: string
                                enum:
                                  - 4 years
                                title: 4 years
                              - type: string
                                enum:
                                  - 5 years
                                title: 5 years
                              - type: string
                                enum:
                                  - 6 years
                                title: 6 years
                              - type: string
                                enum:
                                  - 7 years
                                title: 7 years
                              - type: string
                                enum:
                                  - 8 years
                                title: 8 years
                              - type: string
                                enum:
                                  - 9 years
                                title: 9 years
                              - type: string
                                enum:
                                  - 10 years
                                title: 10 years
                              - type: string
                                enum:
                                  - 11 years
                                title: 11 years
                              - type: string
                                enum:
                                  - 12 years
                                title: 12 years
                              - type: string
                                enum:
                                  - 13 years
                                title: 13 years
                              - type: string
                                enum:
                                  - 14 years
                                title: 14 years
                              - type: string
                                enum:
                                  - 15 years
                                title: 15 years
                              - type: string
                                enum:
                                  - 16 years
                                title: 16 years
                              - type: string
                                enum:
                                  - 17 years
                                title: 17 years
                              - type: string
                                enum:
                                  - 18 years
                                title: 18 years
                              - type: string
                                enum:
                                  - 19 years
                                title: 19 years
                              - type: string
                                enum:
                                  - 20 years
                                title: 20 years
                          - type: "null"
                      thirdPartyRecipients:
                        anyOf:
                          - type: array
                            items:
                              $ref: "#/components/schemas/Prm"
                            description: Optional list of slugs identifying third parties who will get
                              access to the data after consent is given.
                          - type: "null"
                      orgSlug:
                        anyOf:
                          - type: string
                            description: Optional slug of the organization that will be used to create the
                              ask. If using a serviceAccount (API key) this is
                              not needed. If logged in as a user that has access
                              to more than one organization, this is needed for
                              disambiguation.
                          - type: "null"
                    required:
                      - electricityContracts
                    additionalProperties: false
                    examples:
                      - electricityContracts:
                          - 606b5149-1ef0-414a-8019-a050f64cc0ac
                      - electricityContracts:
                          - 606b5149-1ef0-414a-8019-a050f64cc0ac
                        consentDuration: 1 year
                        signer:
                          email: signer-JymeC@domain.com
                          firstName: firstName
                          lastName: lastName
                        purposes:
                          - SOLAR_INSTALLATION_SIZING
                  __experimentalAddressChecksResults:
                    anyOf:
                      - type: object
                        additionalProperties:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - SUCCESS
                                - FAILURE
                          required:
                            - status
                          additionalProperties: false
                      - type: "null"
                  addressCheckResults:
                    anyOf:
                      - type: object
                        additionalProperties:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - SUCCESS
                                - FAILURE
                          required:
                            - status
                          additionalProperties: false
                      - type: "null"
                  consentIds:
                    type: object
                    additionalProperties:
                      $ref: "#/components/schemas/Prm"
                    examples:
                      - "00052775405049": 7252fa9f-b86a-4b95-a090-1012b730004c
                        "00088663455690": 2083c06a-2793-4475-affc-acfec79d4225
                  contracts:
                    type: array
                    items:
                      $ref: "#/components/schemas/EnedisElectricityContract"
                  scopes:
                    type: array
                    items:
                      anyOf:
                        - anyOf:
                            - type: object
                              properties:
                                service:
                                  type: string
                                  enum:
                                    - ENEDIS_RAW_API
                                id:
                                  type: string
                                  enum:
                                    - DETAILS_CONTRACTUELS
                              required:
                                - service
                                - id
                              additionalProperties: false
                            - type: object
                              properties:
                                service:
                                  type: string
                                  enum:
                                    - ENEDIS_RAW_API
                                id:
                                  type: string
                                  enum:
                                    - CONSUMPTION_DATA
                                args:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - CDC
                                          - PMAX
                                          - IDX
                                          - ENERGIE
                                    directions:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - SOUTIRAGE
                                          - INJECTION
                                  required:
                                    - types
                                    - directions
                                  additionalProperties: false
                              required:
                                - service
                                - id
                                - args
                              additionalProperties: false
                        - anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                  enum:
                                    - ELECTRICITY_TIMESERIES
                                args:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - LOADCURVE
                                    directions:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - CONSUMPTION
                                          - INJECTION
                                  required:
                                    - types
                                    - directions
                                  additionalProperties: false
                              required:
                                - id
                                - args
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                  enum:
                                    - GAS_TIMESERIES
                                args:
                                  type: object
                                  properties:
                                    types:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - BILLING
                                          - DAILY
                                    directions:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - CONSUMPTION
                                          - INJECTION
                                  required:
                                    - types
                                    - directions
                                  additionalProperties: false
                              required:
                                - id
                                - args
                              additionalProperties: false
                            - type: object
                              properties:
                                id:
                                  type: string
                                  enum:
                                    - GAS_CONTRACT_DETAILS
                              required:
                                - id
                              additionalProperties: false
                  purposes:
                    type: array
                    items:
                      anyOf:
                        - type: string
                          enum:
                            - SOLAR_INSTALLATION_SIZING
                          title: Sizing of a solar installation
                        - type: string
                          enum:
                            - DEMAND_RESPONSE
                          title: Demand response
                        - type: string
                          enum:
                            - ENERGY_PERFORMANCE_STUDY
                          title: Energy performance study
                        - type: string
                          enum:
                            - ENERGY_BROKERAGE
                          title: Energy brokerage
                        - type: string
                          enum:
                            - VEHICLE_CHARGE_DETECTION
                          title: Detection of a vehicle charge
                  testEnvironment:
                    type: boolean
                  thirdPartyRecipients:
                    type: array
                    items:
                      $ref: "#/components/schemas/Prm"
                required:
                  - id
                  - createdAt
                  - status
                  - acceptedAt
                  - consentCollectionDetails
                  - createArgs
                  - consentIds
                  - contracts
                  - scopes
                  - purposes
                  - testEnvironment
                  - thirdPartyRecipients
                additionalProperties: false
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      summary: Get an Ask
  /ask/{askId}/proof:
    get:
      tags:
        - asks
      operationId: getAskProof
      parameters:
        - name: askId
          in: path
          schema:
            $ref: "#/components/schemas/Prm"
          required: true
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/pdf:
              schema:
                $ref: "#/components/schemas/Prm"
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      summary: Get an Ask proof as PDF, when it's accepted
  /order:
    post:
      tags:
        - orders
      operationId: order
      parameters:
        - name: switchgrid-test-env
          in: header
          schema:
            anyOf:
              - type: string
                enum:
                  - "true"
                  - "false"
              - type: "null"
          required: false
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: "#/components/schemas/Prm"
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - CREATED
                        title: CREATED
                      - type: string
                        enum:
                          - PENDING_ADDRESS_CHECK
                        title: PENDING_ADDRESS_CHECK
                      - type: string
                        enum:
                          - ADDRESS_CHECK_FAILED
                        title: ADDRESS_CHECK_FAILED
                      - type: string
                        enum:
                          - PENDING_REQUESTS
                        title: PENDING_REQUESTS
                      - type: string
                        enum:
                          - SOME_REQUESTS_FAILED
                        title: SOME_REQUESTS_FAILED
                      - type: string
                        enum:
                          - SUCCESS
                        title: SUCCESS
                  requests:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          $ref: "#/components/schemas/Prm"
                        type:
                          type: string
                          enum:
                            - C68
                            - C68_ASYNC
                            - R63
                            - R63_SYNC
                            - R64
                            - R64_SYNC
                            - R65
                            - R65_SYNC
                            - R66
                            - R66_SYNC
                            - R67
                            - LOADCURVE
                        status:
                          anyOf:
                            - anyOf:
                                - type: string
                                  enum:
                                    - NOT_STARTED
                                  title: NOT_STARTED
                                - type: string
                                  enum:
                                    - QUEUED
                                  title: QUEUED
                                - type: string
                                  enum:
                                    - PENDING
                                  title: PENDING
                                - type: string
                                  enum:
                                    - SUCCESS
                                  title: SUCCESS
                                - type: string
                                  enum:
                                    - FAILED
                                  title: FAILED
                            - type: string
                              enum:
                                - PENDING_ADDRESS_CHECK
                        orderedAt:
                          anyOf:
                            - type: string
                            - type: "null"
                        completedAt:
                          anyOf:
                            - type: string
                            - type: "null"
                        dataUrl:
                          anyOf:
                            - anyOf:
                                - $ref: "#/components/schemas/Prm"
                                - type: "null"
                            - type: "null"
                        errorMessage:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - type: "null"
                        requestedTimeRange:
                          anyOf:
                            - anyOf:
                                - $ref: "#/components/schemas/Prm"
                                - type: "null"
                            - type: "null"
                        summaryPerContract:
                          anyOf:
                            - type: array
                              items:
                                anyOf:
                                  - anyOf:
                                      - type: object
                                        properties:
                                          _tag:
                                            type: string
                                            enum:
                                              - LoadcurveRequestContractSummary
                                          _status:
                                            type: string
                                            enum:
                                              - final
                                          prm:
                                            $ref: "#/components/schemas/Prm"
                                          timeRangeCoverageRatio:
                                            anyOf:
                                              - anyOf:
                                                  - type: number
                                                  - type: string
                                                    enum:
                                                      - NaN
                                                  - type: string
                                                    enum:
                                                      - Infinity
                                                  - type: string
                                                    enum:
                                                      - -Infinity
                                              - type: string
                                                enum:
                                                  - Infinity
                                                  - -Infinity
                                                  - NaN
                                          holes:
                                            type: array
                                            items:
                                              $ref: "#/components/schemas/Prm"
                                            description: An array of intervals that are **NOT** covered by the returned
                                              data. It's an array of intervals.
                                              Each interval is 2 dates separated
                                              by a slash. The dates are in ISO
                                              8601 format.
                                            examples:
                                              - - s:
                                                    ts: 1735689600000
                                                    _zone: {}
                                                    loc:
                                                      locale: en-US
                                                      numberingSystem: null
                                                      outputCalendar: null
                                                      weekSettings: null
                                                      intl: en-US
                                                      weekdaysCache:
                                                        format: {}
                                                        standalone: {}
                                                      monthsCache:
                                                        format: {}
                                                        standalone: {}
                                                      meridiemCache: null
                                                      eraCache: {}
                                                      specifiedLocale: null
                                                      fastNumbersCached: null
                                                    invalid: null
                                                    weekData: null
                                                    localWeekData: null
                                                    c:
                                                      year: 2025
                                                      month: 1
                                                      day: 1
                                                      hour: 0
                                                      minute: 0
                                                      second: 0
                                                      millisecond: 0
                                                    o: 0
                                                    isLuxonDateTime: true
                                                  e:
                                                    ts: 1735689600000
                                                    _zone: {}
                                                    loc:
                                                      locale: en-US
                                                      numberingSystem: null
                                                      outputCalendar: null
                                                      weekSettings: null
                                                      intl: en-US
                                                      weekdaysCache:
                                                        format: {}
                                                        standalone: {}
                                                      monthsCache:
                                                        format: {}
                                                        standalone: {}
                                                      meridiemCache: null
                                                      eraCache: {}
                                                      specifiedLocale: null
                                                      fastNumbersCached: null
                                                    invalid: null
                                                    weekData: null
                                                    localWeekData: null
                                                    c:
                                                      year: 2025
                                                      month: 1
                                                      day: 1
                                                      hour: 0
                                                      minute: 0
                                                      second: 0
                                                      millisecond: 0
                                                    o: 0
                                                    isLuxonDateTime: true
                                                  invalid: null
                                                  isLuxonInterval: true
                                          errorMessage:
                                            anyOf:
                                              - $ref: "#/components/schemas/Prm"
                                              - type: "null"
                                        required:
                                          - _tag
                                          - _status
                                          - prm
                                          - timeRangeCoverageRatio
                                          - holes
                                          - errorMessage
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          _tag:
                                            type: string
                                            enum:
                                              - LoadcurveRequestContractSummary
                                          _status:
                                            type: string
                                            enum:
                                              - pending
                                          prm:
                                            $ref: "#/components/schemas/Prm"
                                          message:
                                            $ref: "#/components/schemas/Prm"
                                        required:
                                          - _tag
                                          - _status
                                          - prm
                                          - message
                                        additionalProperties: false
                                  - type: object
                                    properties:
                                      _tag:
                                        type: string
                                        enum:
                                          - RawFileContractSummary
                                      prm:
                                        $ref: "#/components/schemas/Prm"
                                      fileUrl:
                                        anyOf:
                                          - $ref: "#/components/schemas/Prm"
                                          - type: "null"
                                      errorMessage:
                                        anyOf:
                                          - $ref: "#/components/schemas/Prm"
                                          - type: "null"
                                    required:
                                      - _tag
                                      - prm
                                      - fileUrl
                                      - errorMessage
                                    additionalProperties: false
                            - type: "null"
                        loadCurve:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    period:
                                      $ref: "#/components/schemas/Prm"
                                    startsAt:
                                      type: string
                                    endsAt:
                                      type: string
                                    values:
                                      type: array
                                      items:
                                        anyOf:
                                          - anyOf:
                                              - anyOf:
                                                  - type: number
                                                  - type: string
                                                    enum:
                                                      - NaN
                                                  - type: string
                                                    enum:
                                                      - Infinity
                                                  - type: string
                                                    enum:
                                                      - -Infinity
                                              - type: string
                                                enum:
                                                  - Infinity
                                                  - -Infinity
                                                  - NaN
                                          - type: "null"
                                  required:
                                    - period
                                    - startsAt
                                    - endsAt
                                    - values
                                  additionalProperties: false
                                - type: "null"
                            - type: "null"
                      required:
                        - id
                        - type
                        - status
                        - orderedAt
                        - completedAt
                        - errorMessage
                      additionalProperties: false
                    examples:
                      - - id: da466b13-6904-4a5d-a108-746808686631
                          type: C68
                          status: SUCCESS
                          completedAt: {}
                          dataUrl: https://example.com/data.json
                          errorMessage: null
                          orderedAt: {}
                required:
                  - id
                  - status
                  - requests
                additionalProperties: false
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    consentId:
                      $ref: "#/components/schemas/Prm"
                    requests:
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - C68
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - C68_ASYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - CONSUMPTION
                                      - INJECTION
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R63
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisRetryAfterLoadcurveActivation:
                                anyOf:
                                  - type: boolean
                                    description: Retry after Enedis Loadcurve Activation (Activation de la collecte
                                      de courbe de charge)
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R64
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R65
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R66
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R67
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R63_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              enedisRetryAfterLoadcurveActivation:
                                anyOf:
                                  - type: boolean
                                    description: Retry after Enedis Loadcurve Activation (Activation de la collecte
                                      de courbe de charge)
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R64_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R65_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R66_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - LOADCURVE
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - CONSUMPTION
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              enedisRetryAfterLoadcurveActivation:
                                anyOf:
                                  - type: boolean
                                    description: Retry after Enedis Loadcurve Activation (Activation de la collecte
                                      de courbe de charge)
                                  - type: "null"
                            required:
                              - type
                            additionalProperties: false
                  required:
                    - consentId
                    - requests
                  additionalProperties: false
                - type: object
                  properties:
                    requests:
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - C68
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - C68_ASYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - CONSUMPTION
                                      - INJECTION
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R63
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisRetryAfterLoadcurveActivation:
                                anyOf:
                                  - type: boolean
                                    description: Retry after Enedis Loadcurve Activation (Activation de la collecte
                                      de courbe de charge)
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R64
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R65
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R66
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R67
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R63_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              enedisRetryAfterLoadcurveActivation:
                                anyOf:
                                  - type: boolean
                                    description: Retry after Enedis Loadcurve Activation (Activation de la collecte
                                      de courbe de charge)
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R64_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R65_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - R66_SYNC
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - SOUTIRAGE
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - LOADCURVE
                              direction:
                                anyOf:
                                  - type: string
                                    enum:
                                      - CONSUMPTION
                                      - INJECTION
                                  - type: "null"
                              since:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              until:
                                anyOf:
                                  - type: string
                                    examples:
                                      - 2024-12-10T00:00:00
                                      - 2024-12-10T12:00:00Z
                                      - 2024-12-10T00:00:00+01:00
                                      - 2024-12-10
                                      - 2024-12-10T00:00:00[Europe/Paris]
                                      - 2024-12-10T00:00:00[CET]
                                  - type: "null"
                              enedisCorrection:
                                anyOf:
                                  - type: boolean
                                    description: Correction Enedis (only for 'C5' segment)
                                  - type: "null"
                              enedisRetryAfterLoadcurveActivation:
                                anyOf:
                                  - type: boolean
                                    description: Retry after Enedis Loadcurve Activation (Activation de la collecte
                                      de courbe de charge)
                                  - type: "null"
                              prms:
                                type: array
                                items:
                                  $ref: "#/components/schemas/Prm"
                            required:
                              - type
                              - prms
                            additionalProperties: false
                  required:
                    - requests
                  additionalProperties: false
        required: true
  /order/{orderId}:
    get:
      tags:
        - orders
      operationId: getOrder
      parameters:
        - name: orderId
          in: path
          schema:
            $ref: "#/components/schemas/Prm"
          required: true
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: "#/components/schemas/Prm"
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - CREATED
                        title: CREATED
                      - type: string
                        enum:
                          - PENDING_ADDRESS_CHECK
                        title: PENDING_ADDRESS_CHECK
                      - type: string
                        enum:
                          - ADDRESS_CHECK_FAILED
                        title: ADDRESS_CHECK_FAILED
                      - type: string
                        enum:
                          - PENDING_REQUESTS
                        title: PENDING_REQUESTS
                      - type: string
                        enum:
                          - SOME_REQUESTS_FAILED
                        title: SOME_REQUESTS_FAILED
                      - type: string
                        enum:
                          - SUCCESS
                        title: SUCCESS
                  requests:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          $ref: "#/components/schemas/Prm"
                        type:
                          type: string
                          enum:
                            - C68
                            - C68_ASYNC
                            - R63
                            - R63_SYNC
                            - R64
                            - R64_SYNC
                            - R65
                            - R65_SYNC
                            - R66
                            - R66_SYNC
                            - R67
                            - LOADCURVE
                        status:
                          anyOf:
                            - anyOf:
                                - type: string
                                  enum:
                                    - NOT_STARTED
                                  title: NOT_STARTED
                                - type: string
                                  enum:
                                    - QUEUED
                                  title: QUEUED
                                - type: string
                                  enum:
                                    - PENDING
                                  title: PENDING
                                - type: string
                                  enum:
                                    - SUCCESS
                                  title: SUCCESS
                                - type: string
                                  enum:
                                    - FAILED
                                  title: FAILED
                            - type: string
                              enum:
                                - PENDING_ADDRESS_CHECK
                        orderedAt:
                          anyOf:
                            - type: string
                            - type: "null"
                        completedAt:
                          anyOf:
                            - type: string
                            - type: "null"
                        dataUrl:
                          anyOf:
                            - anyOf:
                                - $ref: "#/components/schemas/Prm"
                                - type: "null"
                            - type: "null"
                        errorMessage:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - type: "null"
                        requestedTimeRange:
                          anyOf:
                            - anyOf:
                                - $ref: "#/components/schemas/Prm"
                                - type: "null"
                            - type: "null"
                        summaryPerContract:
                          anyOf:
                            - type: array
                              items:
                                anyOf:
                                  - anyOf:
                                      - type: object
                                        properties:
                                          _tag:
                                            type: string
                                            enum:
                                              - LoadcurveRequestContractSummary
                                          _status:
                                            type: string
                                            enum:
                                              - final
                                          prm:
                                            $ref: "#/components/schemas/Prm"
                                          timeRangeCoverageRatio:
                                            anyOf:
                                              - anyOf:
                                                  - type: number
                                                  - type: string
                                                    enum:
                                                      - NaN
                                                  - type: string
                                                    enum:
                                                      - Infinity
                                                  - type: string
                                                    enum:
                                                      - -Infinity
                                              - type: string
                                                enum:
                                                  - Infinity
                                                  - -Infinity
                                                  - NaN
                                          holes:
                                            type: array
                                            items:
                                              $ref: "#/components/schemas/Prm"
                                            description: An array of intervals that are **NOT** covered by the returned
                                              data. It's an array of intervals.
                                              Each interval is 2 dates separated
                                              by a slash. The dates are in ISO
                                              8601 format.
                                            examples:
                                              - - s:
                                                    ts: 1735689600000
                                                    _zone: {}
                                                    loc:
                                                      locale: en-US
                                                      numberingSystem: null
                                                      outputCalendar: null
                                                      weekSettings: null
                                                      intl: en-US
                                                      weekdaysCache:
                                                        format: {}
                                                        standalone: {}
                                                      monthsCache:
                                                        format: {}
                                                        standalone: {}
                                                      meridiemCache: null
                                                      eraCache: {}
                                                      specifiedLocale: null
                                                      fastNumbersCached: null
                                                    invalid: null
                                                    weekData: null
                                                    localWeekData: null
                                                    c:
                                                      year: 2025
                                                      month: 1
                                                      day: 1
                                                      hour: 0
                                                      minute: 0
                                                      second: 0
                                                      millisecond: 0
                                                    o: 0
                                                    isLuxonDateTime: true
                                                  e:
                                                    ts: 1735689600000
                                                    _zone: {}
                                                    loc:
                                                      locale: en-US
                                                      numberingSystem: null
                                                      outputCalendar: null
                                                      weekSettings: null
                                                      intl: en-US
                                                      weekdaysCache:
                                                        format: {}
                                                        standalone: {}
                                                      monthsCache:
                                                        format: {}
                                                        standalone: {}
                                                      meridiemCache: null
                                                      eraCache: {}
                                                      specifiedLocale: null
                                                      fastNumbersCached: null
                                                    invalid: null
                                                    weekData: null
                                                    localWeekData: null
                                                    c:
                                                      year: 2025
                                                      month: 1
                                                      day: 1
                                                      hour: 0
                                                      minute: 0
                                                      second: 0
                                                      millisecond: 0
                                                    o: 0
                                                    isLuxonDateTime: true
                                                  invalid: null
                                                  isLuxonInterval: true
                                          errorMessage:
                                            anyOf:
                                              - $ref: "#/components/schemas/Prm"
                                              - type: "null"
                                        required:
                                          - _tag
                                          - _status
                                          - prm
                                          - timeRangeCoverageRatio
                                          - holes
                                          - errorMessage
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          _tag:
                                            type: string
                                            enum:
                                              - LoadcurveRequestContractSummary
                                          _status:
                                            type: string
                                            enum:
                                              - pending
                                          prm:
                                            $ref: "#/components/schemas/Prm"
                                          message:
                                            $ref: "#/components/schemas/Prm"
                                        required:
                                          - _tag
                                          - _status
                                          - prm
                                          - message
                                        additionalProperties: false
                                  - type: object
                                    properties:
                                      _tag:
                                        type: string
                                        enum:
                                          - RawFileContractSummary
                                      prm:
                                        $ref: "#/components/schemas/Prm"
                                      fileUrl:
                                        anyOf:
                                          - $ref: "#/components/schemas/Prm"
                                          - type: "null"
                                      errorMessage:
                                        anyOf:
                                          - $ref: "#/components/schemas/Prm"
                                          - type: "null"
                                    required:
                                      - _tag
                                      - prm
                                      - fileUrl
                                      - errorMessage
                                    additionalProperties: false
                            - type: "null"
                        loadCurve:
                          anyOf:
                            - anyOf:
                                - type: object
                                  properties:
                                    period:
                                      $ref: "#/components/schemas/Prm"
                                    startsAt:
                                      type: string
                                    endsAt:
                                      type: string
                                    values:
                                      type: array
                                      items:
                                        anyOf:
                                          - anyOf:
                                              - anyOf:
                                                  - type: number
                                                  - type: string
                                                    enum:
                                                      - NaN
                                                  - type: string
                                                    enum:
                                                      - Infinity
                                                  - type: string
                                                    enum:
                                                      - -Infinity
                                              - type: string
                                                enum:
                                                  - Infinity
                                                  - -Infinity
                                                  - NaN
                                          - type: "null"
                                  required:
                                    - period
                                    - startsAt
                                    - endsAt
                                    - values
                                  additionalProperties: false
                                - type: "null"
                            - type: "null"
                      required:
                        - id
                        - type
                        - status
                        - orderedAt
                        - completedAt
                        - errorMessage
                      additionalProperties: false
                    examples:
                      - - id: da466b13-6904-4a5d-a108-746808686631
                          type: C68
                          status: SUCCESS
                          completedAt: {}
                          dataUrl: https://example.com/data.json
                          errorMessage: null
                          orderedAt: {}
                required:
                  - id
                  - status
                  - requests
                additionalProperties: false
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
        "404":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    $ref: "#/components/schemas/Prm"
                required:
                  - message
                additionalProperties: false
      summary: Get Order status and data
  /search_contract:
    get:
      tags:
        - contracts
      operationId: searchContract
      parameters:
        - name: name
          in: query
          schema:
            type: string
            allOf:
              - minLength: 3
                examples:
                  - Jean Dupont
          required: true
        - name: address
          in: query
          schema:
            anyOf:
              - type: string
                examples:
                  - 1 rue de la paix 75001 Paris
              - type: "null"
          required: false
        - name: prm
          in: query
          schema:
            anyOf:
              - anyOf:
                  - $ref: "#/components/schemas/Prm"
                  - $ref: "#/components/schemas/EnedisNumeroDeSerie"
              - type: "null"
          required: false
        - name: asOrgSlug
          in: query
          schema:
            anyOf:
              - type: string
                description: If you are using this endpoint without a service account, and have
                  access to multiple organizations, you need to specify for
                  which organization you're using this endpoint
              - type: "null"
          required: false
      security:
        - bearerAuth: []
      responses:
        "200":
          description: SearchContractResponse
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchContractResponse"
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      summary: Search for an electricity contract
  /search_contracts_from_invoices:
    post:
      tags:
        - contracts
      operationId: searchContractsFromInvoices
      parameters: []
      security:
        - bearerAuth: []
      responses:
        "200":
          description: SearchContractsFromInvoicesResponse
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchContractsFromInvoicesResponse"
        "400":
          description: BadRequest
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    $ref: "#/components/schemas/Prm"
                required:
                  - message
                additionalProperties: false
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      description: Upload one or more electricity invoice files (PDF or images). We
        will run OCR on these files and search for matching contracts.
      summary: "BETA: Search for electricity contracts from uploaded electricity
        invoice files"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
              required:
                - files
              additionalProperties: false
        required: true
  /data-third-party:
    post:
      tags:
        - data-third-parties
      operationId: createDataThirdParty
      parameters: []
      security:
        - bearerAuth: []
      responses:
        "200":
          description: DataThirdParty created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: Name ot the DataThirdParty. This name will appear in Ask consent
                      forms
                  slug:
                    type: string
                    description: Unique identifier (in the scope of your organization) of the
                      DataThirdParty. This will be used to identify the
                      DataThirdParty when creating the Ask via the API
                  createdAt:
                    type: string
                    examples:
                      - 2024-12-10T00:00:00
                      - 2024-12-10T12:00:00Z
                      - 2024-12-10T00:00:00+01:00
                      - 2024-12-10
                      - 2024-12-10T00:00:00[Europe/Paris]
                      - 2024-12-10T00:00:00[CET]
                  deletedAt:
                    anyOf:
                      - type: string
                        examples:
                          - 2024-12-10T00:00:00
                          - 2024-12-10T12:00:00Z
                          - 2024-12-10T00:00:00+01:00
                          - 2024-12-10
                          - 2024-12-10T00:00:00[Europe/Paris]
                          - 2024-12-10T00:00:00[CET]
                      - type: "null"
                  websiteUrl:
                    anyOf:
                      - type: string
                        description: Website URL of the DataThirdParty. If specified, users will be able
                          to click on it from the Ask consent form
                      - type: "null"
                  frSiret:
                    anyOf:
                      - type: string
                        description: Siret number of the DataThirdParty. This will be used to identify
                          the DataThirdParty when creating the Ask via the API
                      - type: "null"
                  internationalCompanyIdentificationNumber:
                    anyOf:
                      - type: string
                        description: For non-french third parties, international company identification
                          number of the DataThirdParty. This will be used to
                          identify the DataThirdParty when creating the Ask via
                          the API
                      - type: "null"
                  logoUrl:
                    anyOf:
                      - $ref: "#/components/schemas/Prm"
                      - type: "null"
                    description: A public signed URL of the DataThirdParty
                required:
                  - name
                  - slug
                  - createdAt
                  - deletedAt
                  - websiteUrl
                  - frSiret
                  - internationalCompanyIdentificationNumber
                  - logoUrl
                additionalProperties: false
                title: DataThirdParty
                description: DataThirdParty created successfully.
                examples:
                  - slug: solaris
                    name: Solaris
                    frSiret: "12345678901234"
                    createdAt: {}
                    deletedAt: null
                    logoUrl: https://switchgrid.tech/logos/solaris.png
                    websiteUrl: https://solaris.fr
                    internationalCompanyIdentificationNumber: null
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
        "409":
          description: A DataThirdParty with the same slug already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    $ref: "#/components/schemas/Prm"
                required:
                  - message
                additionalProperties: false
                description: A DataThirdParty with the same slug already exists
      description: A DataThirdParty can appear in the Ask consent form as the
        recipient of the data. You may want to use this if the ultimate
        recipient of the data collected via Switchgrid is another customer of
        yours (e.g. a solar panel installer), which you are transferring data
        to.
      summary: Create a DataThirdParty
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  description: Unique identifier (in the scope of your organization) of the
                    DataThirdParty. This will be used to identify the
                    DataThirdParty when creating the Ask via the API
                name:
                  type: string
                  description: Name ot the DataThirdParty. This name will appear in Ask consent
                    forms
                websiteUrl:
                  anyOf:
                    - type: string
                      description: Website URL of the DataThirdParty. If specified, users will be able
                        to click on it from the Ask consent form
                    - type: "null"
                frSiret:
                  anyOf:
                    - type: string
                      description: Siret number of the DataThirdParty. This will be used to identify
                        the DataThirdParty when creating the Ask via the API
                    - type: "null"
                internationalCompanyIdentificationNumber:
                  anyOf:
                    - type: string
                      description: For non-french third parties, international company identification
                        number of the DataThirdParty. This will be used to
                        identify the DataThirdParty when creating the Ask via
                        the API
                    - type: "null"
                logoBase64:
                  anyOf:
                    - $ref: "#/components/schemas/Prm"
                    - type: "null"
                  description: Base64-encoded logo of the DataThirdParty. This logo will appear in
                    Ask consent forms. Accepts `png`, `jpg`, and `svg`.
                orgSlug:
                  anyOf:
                    - $ref: "#/components/schemas/Prm"
                    - type: "null"
                  description: The slug of the organization the DataThirdParty belongs to. Only
                    required if it's ambiguous (if this request is not done with
                    a service account or if the user has access to multiple
                    organizations.
              required:
                - slug
                - name
              additionalProperties: false
        required: true
    get:
      tags:
        - data-third-parties
      operationId: listDataThirdParties
      parameters:
        - name: skip
          in: query
          schema:
            anyOf:
              - type: string
              - type: "null"
          required: false
        - name: limit
          in: query
          schema:
            anyOf:
              - type: string
              - type: "null"
          required: false
        - name: orderBy
          in: query
          schema:
            anyOf:
              - $ref: "#/components/schemas/Prm"
              - type: "null"
          required: false
        - name: orgSlug
          in: query
          schema:
            anyOf:
              - anyOf:
                  - $ref: "#/components/schemas/Prm"
                  - type: "null"
                description: The slug of the organization to list data third parties of. Only
                  required if it's ambiguous (if this request is not done with a
                  service account or if the user has access to multiple
                  organizations.
              - type: "null"
          required: false
      security:
        - bearerAuth: []
      responses:
        "200":
          description: List of DataThirdParty instances for the current Organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  skip:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  limit:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  totalItemsCount:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  returnedItemsCount:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - -Infinity
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - NaN
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Name ot the DataThirdParty. This name will appear in Ask consent
                            forms
                        slug:
                          type: string
                          description: Unique identifier (in the scope of your organization) of the
                            DataThirdParty. This will be used to identify the
                            DataThirdParty when creating the Ask via the API
                        createdAt:
                          type: string
                          examples:
                            - 2024-12-10T00:00:00
                            - 2024-12-10T12:00:00Z
                            - 2024-12-10T00:00:00+01:00
                            - 2024-12-10
                            - 2024-12-10T00:00:00[Europe/Paris]
                            - 2024-12-10T00:00:00[CET]
                        deletedAt:
                          anyOf:
                            - type: string
                              examples:
                                - 2024-12-10T00:00:00
                                - 2024-12-10T12:00:00Z
                                - 2024-12-10T00:00:00+01:00
                                - 2024-12-10
                                - 2024-12-10T00:00:00[Europe/Paris]
                                - 2024-12-10T00:00:00[CET]
                            - type: "null"
                        websiteUrl:
                          anyOf:
                            - type: string
                              description: Website URL of the DataThirdParty. If specified, users will be able
                                to click on it from the Ask consent form
                            - type: "null"
                        frSiret:
                          anyOf:
                            - type: string
                              description: Siret number of the DataThirdParty. This will be used to identify
                                the DataThirdParty when creating the Ask via the
                                API
                            - type: "null"
                        internationalCompanyIdentificationNumber:
                          anyOf:
                            - type: string
                              description: For non-french third parties, international company identification
                                number of the DataThirdParty. This will be used
                                to identify the DataThirdParty when creating the
                                Ask via the API
                            - type: "null"
                        logoUrl:
                          anyOf:
                            - $ref: "#/components/schemas/Prm"
                            - type: "null"
                          description: A public signed URL of the DataThirdParty
                      required:
                        - name
                        - slug
                        - createdAt
                        - deletedAt
                        - websiteUrl
                        - frSiret
                        - internationalCompanyIdentificationNumber
                        - logoUrl
                      additionalProperties: false
                required:
                  - skip
                  - limit
                  - totalItemsCount
                  - returnedItemsCount
                  - items
                additionalProperties: false
                title: DataThirdParty
                description: List of DataThirdParty instances for the current Organization
                examples:
                  - limit: 10
                    returnedItemsCount: 1
                    skip: 0
                    totalItemsCount: 1
                    items:
                      - slug: solaris
                        name: Solaris
                        createdAt: {}
                        deletedAt: null
                        frSiret: "12345678901234"
                        logoUrl: https://switchgrid.tech/logos/solaris.png
                        websiteUrl: https://solaris.fr
                        internationalCompanyIdentificationNumber: null
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      summary: List data third parties
  /data-third-party/{slug}:
    put:
      tags:
        - data-third-parties
      operationId: updateDataThirdParty
      parameters:
        - name: slug
          in: path
          schema:
            type: string
            description: The current slug of the `DataThirdParty` to update
          required: true
      security:
        - bearerAuth: []
      responses:
        "200":
          description: DataThirdParty updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: Name ot the DataThirdParty. This name will appear in Ask consent
                      forms
                  slug:
                    type: string
                    description: Unique identifier (in the scope of your organization) of the
                      DataThirdParty. This will be used to identify the
                      DataThirdParty when creating the Ask via the API
                  createdAt:
                    type: string
                    examples:
                      - 2024-12-10T00:00:00
                      - 2024-12-10T12:00:00Z
                      - 2024-12-10T00:00:00+01:00
                      - 2024-12-10
                      - 2024-12-10T00:00:00[Europe/Paris]
                      - 2024-12-10T00:00:00[CET]
                  deletedAt:
                    anyOf:
                      - type: string
                        examples:
                          - 2024-12-10T00:00:00
                          - 2024-12-10T12:00:00Z
                          - 2024-12-10T00:00:00+01:00
                          - 2024-12-10
                          - 2024-12-10T00:00:00[Europe/Paris]
                          - 2024-12-10T00:00:00[CET]
                      - type: "null"
                  websiteUrl:
                    anyOf:
                      - type: string
                        description: Website URL of the DataThirdParty. If specified, users will be able
                          to click on it from the Ask consent form
                      - type: "null"
                  frSiret:
                    anyOf:
                      - type: string
                        description: Siret number of the DataThirdParty. This will be used to identify
                          the DataThirdParty when creating the Ask via the API
                      - type: "null"
                  internationalCompanyIdentificationNumber:
                    anyOf:
                      - type: string
                        description: For non-french third parties, international company identification
                          number of the DataThirdParty. This will be used to
                          identify the DataThirdParty when creating the Ask via
                          the API
                      - type: "null"
                  logoUrl:
                    anyOf:
                      - $ref: "#/components/schemas/Prm"
                      - type: "null"
                    description: A public signed URL of the DataThirdParty
                required:
                  - name
                  - slug
                  - createdAt
                  - deletedAt
                  - websiteUrl
                  - frSiret
                  - internationalCompanyIdentificationNumber
                  - logoUrl
                additionalProperties: false
                title: DataThirdParty
                description: DataThirdParty updated successfully.
                examples:
                  - slug: solaris
                    name: Solaris
                    frSiret: "12345678901234"
                    createdAt: {}
                    deletedAt: null
                    logoUrl: https://switchgrid.tech/logos/solaris.png
                    websiteUrl: https://solaris.fr
                    internationalCompanyIdentificationNumber: null
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
        "404":
          description: "`DataThirdParty` for provided `slug` was not found"
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    $ref: "#/components/schemas/Prm"
                required:
                  - message
                additionalProperties: false
                description: "`DataThirdParty` for provided `slug` was not found"
        "409":
          description: A DataThirdParty with the same slug already exists, when updating
            the slug
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    $ref: "#/components/schemas/Prm"
                required:
                  - message
                additionalProperties: false
                description: A DataThirdParty with the same slug already exists, when updating
                  the slug
      description: >-
        The following things can be updated: slug, name, websiteUrl, frSiret,
        internationalCompanyIdentificationNumber, logo.
         To remove an optional property, set it to `null`.
      summary: Update a DataThirdParty
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  anyOf:
                    - type: string
                      description: Unique identifier (in the scope of your organization) of the
                        DataThirdParty. This will be used to identify the
                        DataThirdParty when creating the Ask via the API
                    - type: "null"
                name:
                  anyOf:
                    - type: string
                      description: Name ot the DataThirdParty. This name will appear in Ask consent
                        forms
                    - type: "null"
                websiteUrl:
                  anyOf:
                    - anyOf:
                        - type: string
                          description: Website URL of the DataThirdParty. If specified, users will be able
                            to click on it from the Ask consent form
                        - type: "null"
                    - type: "null"
                frSiret:
                  anyOf:
                    - anyOf:
                        - type: string
                          description: Siret number of the DataThirdParty. This will be used to identify
                            the DataThirdParty when creating the Ask via the API
                        - type: "null"
                    - type: "null"
                internationalCompanyIdentificationNumber:
                  anyOf:
                    - anyOf:
                        - type: string
                          description: For non-french third parties, international company identification
                            number of the DataThirdParty. This will be used to
                            identify the DataThirdParty when creating the Ask
                            via the API
                        - type: "null"
                    - type: "null"
                logoBase64:
                  anyOf:
                    - anyOf:
                        - $ref: "#/components/schemas/Prm"
                        - type: "null"
                      description: Base64-encoded logo of the DataThirdParty. This logo will appear in
                        Ask consent forms. Accepts `png`, `jpg`, and `svg`.
                    - type: "null"
                orgSlug:
                  anyOf:
                    - anyOf:
                        - $ref: "#/components/schemas/Prm"
                        - type: "null"
                      description: The slug of the organization the DataThirdParty belongs to. Only
                        required if it's ambiguous (if this request is not done
                        with a service account or if the user has access to
                        multiple organizations.
                    - type: "null"
              additionalProperties: false
        required: true
    delete:
      tags:
        - data-third-parties
      operationId: deleteDataThirdParty
      parameters:
        - name: slug
          in: path
          schema:
            type: string
            description: The slug of the `DataThirdParty` to delete
          required: true
        - name: orgSlug
          in: path
          schema:
            anyOf:
              - $ref: "#/components/schemas/Prm"
              - type: "null"
          required: true
      security:
        - bearerAuth: []
      responses:
        "200":
          description: DataThirdParty deleted successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: Name ot the DataThirdParty. This name will appear in Ask consent
                      forms
                  slug:
                    type: string
                    description: Unique identifier (in the scope of your organization) of the
                      DataThirdParty. This will be used to identify the
                      DataThirdParty when creating the Ask via the API
                  createdAt:
                    type: string
                    examples:
                      - 2024-12-10T00:00:00
                      - 2024-12-10T12:00:00Z
                      - 2024-12-10T00:00:00+01:00
                      - 2024-12-10
                      - 2024-12-10T00:00:00[Europe/Paris]
                      - 2024-12-10T00:00:00[CET]
                  deletedAt:
                    anyOf:
                      - type: string
                        examples:
                          - 2024-12-10T00:00:00
                          - 2024-12-10T12:00:00Z
                          - 2024-12-10T00:00:00+01:00
                          - 2024-12-10
                          - 2024-12-10T00:00:00[Europe/Paris]
                          - 2024-12-10T00:00:00[CET]
                      - type: "null"
                  websiteUrl:
                    anyOf:
                      - type: string
                        description: Website URL of the DataThirdParty. If specified, users will be able
                          to click on it from the Ask consent form
                      - type: "null"
                  frSiret:
                    anyOf:
                      - type: string
                        description: Siret number of the DataThirdParty. This will be used to identify
                          the DataThirdParty when creating the Ask via the API
                      - type: "null"
                  internationalCompanyIdentificationNumber:
                    anyOf:
                      - type: string
                        description: For non-french third parties, international company identification
                          number of the DataThirdParty. This will be used to
                          identify the DataThirdParty when creating the Ask via
                          the API
                      - type: "null"
                  logoUrl:
                    anyOf:
                      - $ref: "#/components/schemas/Prm"
                      - type: "null"
                    description: A public signed URL of the DataThirdParty
                required:
                  - name
                  - slug
                  - createdAt
                  - deletedAt
                  - websiteUrl
                  - frSiret
                  - internationalCompanyIdentificationNumber
                  - logoUrl
                additionalProperties: false
                title: DataThirdParty
                description: DataThirdParty deleted successfully.
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
      description: Delete a DataThirdParty. It will no longer be possible to use it in
        a new Ask. Existing Asks can still be signed.
      summary: Delete a DataThirdParty
  /request/{requestId}/data:
    get:
      tags:
        - requests
      operationId: getRequestData
      parameters:
        - name: requestId
          in: path
          schema:
            $ref: "#/components/schemas/Prm"
          required: true
        - name: period
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - 5min
                  - 10min
                  - 15min
                  - 30min
                  - 1h
                  - 1d
                description: The period of data to retrieve
                default: 1h
              - type: "null"
          required: true
        - name: format
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - csv
                  - json
                  - xlsx
                description: format of the data
                default: json
              - type: "null"
          required: true
        - name: since
          in: query
          schema:
            anyOf:
              - type: string
                examples:
                  - 2024-12-10T00:00:00
                  - 2024-12-10T12:00:00Z
                  - 2024-12-10T00:00:00+01:00
                  - 2024-12-10
                  - 2024-12-10T00:00:00[Europe/Paris]
                  - 2024-12-10T00:00:00[CET]
              - type: "null"
          required: false
        - name: until
          in: query
          schema:
            anyOf:
              - type: string
                examples:
                  - 2024-12-10T00:00:00
                  - 2024-12-10T12:00:00Z
                  - 2024-12-10T00:00:00+01:00
                  - 2024-12-10
                  - 2024-12-10T00:00:00[Europe/Paris]
                  - 2024-12-10T00:00:00[CET]
              - type: "null"
          required: false
        - name: prm
          in: query
          schema:
            anyOf:
              - $ref: "#/components/schemas/Prm"
              - type: "null"
          required: false
        - name: ignoreRequestStatus
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - "true"
                  - "false"
              - type: "null"
            description: Whether to ignore the request status and return data even if the
              request is not marked as completed. Use with caution. This can
              return incomplete data. Use when a multi-prm request is stuck in
              PENDING but most data is available.
            default: false
          required: false
        - name: csvLocalization
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - fr
                  - international
              - type: "null"
          required: false
        - name: csvColumnSeparator
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - COMMA
                  - SEMICOLON
              - type: "null"
          required: false
        - name: csvDecimalSeparator
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - DOT
                  - COMMA
              - type: "null"
          required: false
        - name: timezone
          in: query
          schema:
            anyOf:
              - anyOf:
                  - type: string
                    enum:
                      - LOCAL
                      - UTC
                  - type: "null"
              - type: "null"
          required: false
      security:
        - bearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Prm"
        "400":
          description: BadRequest
        "403":
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: "#/components/schemas/Prm"
                required:
                  - error
                additionalProperties: false
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    $ref: "#/components/schemas/Prm"
                required:
                  - message
                additionalProperties: false
                description: Not Found
      summary: Get data from a specific Request
components:
  schemas:
    Prm:
      type: string
    PersonnePhysique:
      type: object
      properties:
        genre:
          type: string
          enum:
            - M
            - F
        firstName:
          $ref: "#/components/schemas/Prm"
        lastName:
          $ref: "#/components/schemas/Prm"
      required:
        - genre
        - firstName
        - lastName
      additionalProperties: false
      title: Individual
      description: An Individual, as opposed to a legal entity.
    PersonneMorale:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/Prm"
        siret:
          $ref: "#/components/schemas/Prm"
        otherNames:
          anyOf:
            - type: array
              items:
                $ref: "#/components/schemas/Prm"
              allOf:
                - maxItems: 2
            - type: "null"
          description: Other names of the company. Max 2 names.
      required:
        - name
        - siret
      additionalProperties: false
      title: Legal Entity
      description: A legal entity, as opposed to an individual.
    ElectricityContract:
      type: object
      properties:
        prm:
          $ref: "#/components/schemas/Prm"
        heldBy:
          anyOf:
            - $ref: "#/components/schemas/PersonnePhysique"
            - $ref: "#/components/schemas/PersonneMorale"
          description: The person or company that holds the contract
        address:
          type: object
          properties:
            street:
              $ref: "#/components/schemas/Prm"
            postalCode:
              $ref: "#/components/schemas/Prm"
            city:
              $ref: "#/components/schemas/Prm"
            country:
              $ref: "#/components/schemas/Prm"
          required:
            - street
            - postalCode
            - city
            - country
          additionalProperties: false
          description: The address where the electricity is consumed
      required:
        - prm
        - heldBy
        - address
      additionalProperties: false
      title: Electricity Contract Details
      description: Details of an electricity contract.
    ConsentCollectionMedium:
      anyOf:
        - type: object
          properties:
            service:
              type: string
              enum:
                - DOCUSEAL
          required:
            - service
          additionalProperties: false
          title: DOCUSEAL
          description: The Docuseal consent collection medium, prefer the web hosted one.
        - type: object
          properties:
            service:
              type: string
              enum:
                - WEB_HOSTED
          required:
            - service
          additionalProperties: false
          title: WEB_HOSTED
          description: The web hosted consent collection medium, allowing interactions
            like changing Signer name.
    Url:
      type: string
      description: The URL to the document that the user needs to sign.
      examples:
        - https://docuseal.co/s/x1uPBSwot114QM
    Url1:
      type: string
      description: The URL of the page to embed, or redirect the user to.
      examples:
        - https://c/ask/f965e8f1-9bf3-4dbd-8871-96bf236e9ce3
    EnedisElectricityContract:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/Prm"
        prm:
          $ref: "#/components/schemas/Prm"
        categorieClientFinalCode:
          type: string
          enum:
            - RES
            - PRO
        nomClientFinalOuDenominationSociale:
          type: string
          examples:
            - DUPONT Marie
            - SARL DUPONT ET FILS
        adresseInstallationNormalisee:
          type: object
          properties:
            ligne1:
              anyOf:
                - type: string
                  title: Ligne 1 de l’adresse postale.
                  description: "Ligne 1 de l’adresse postale.

                    \  Cette ligne identifie le destinataire.

                    \  Cette donnée ne sera pas renseignée car

                    \  redondante avec la donnée « Nom ou

                    \  dénomination sociale du client »

                    \  "
                - type: "null"
            ligne2:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 2 de l’adresse postale.

                    \  Cette ligne identifie généralement le

                    \  complément d’identification du destinataire ou

                    \  du point de remise (escalier, étage,

                    \  appartement, boîte aux lettres…).

                    \        "
                  examples:
                    - 03 D
                    - COLLINE DE VELAUX VI
                    - A
                - type: "null"
            ligne3:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 3 de l’adresse postale.

                    \  Cette ligne identifie généralement le

                    \  complément d’identification du point

                    \  géographique (entrée, tour, immeuble,

                    \  bâtiment, résidence, zone industrielle…).

                    \        "
                  examples:
                    - QUARTIER LES CAIRADES
                    - VILLA CHANTE LA MER
                    - VILLA B LOTISSEMENT ACHBARI
                    - QUARTIER LE PEGOUY
                    - CHEMIN DE LA CHABOTT
                - type: "null"
            ligne4:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 4 de l’adresse postale.

                    \  Cette ligne identifie le numéro et le libellé de la

                    \  voie.

                    \        "
                  examples:
                    - 70 ALLEE DU BOIS
                    - 11 IMPASSE DES SENTEURS
                    - 27 CHEMIN DES COUSTELLINES
                - type: "null"
            ligne5:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 5 de l’adresse postale.

                    \  Cette ligne identifie généralement :

                    \  - le lieu-dit ou le service particulier de

                    \  distribution dans le cas d’un client

                    \  résidentiel,

                    \  - les mentions spéciales de distribution et

                    \  commune d’implantation de l’entreprise (si

                    \  différente du bureau distributeur CEDEX)

                    \  dans le cas d’un client professionnel.

                    \        "
                  examples:
                    - HELLEMMES LILLE
                    - BP 4
                - type: "null"
            ligne6:
              type: string
              description: "

                \  Ligne 6 de l’adresse postale.

                \  Cette ligne identifie :

                \  - le code postal et la localité de destination

                \  dans le cas d’un client résidentiel,

                \  - le code postal et bureau distributeur ou

                \  code cedex et bureau distributeur cedex

                \  dans le cas d’un client professionnel.

                \        "
              examples:
                - 84190 BEAUMES DE VENISE
            ligne7:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 7 de l’adresse postale.

                    \  Cette ligne identifie le pays.

                    \  Cette donnée ne sera pas renseignée.

                    \        "
                - type: "null"
          required:
            - ligne6
          additionalProperties: false
          examples:
            - ligne4: 70 ALLEE DU BOIS
              ligne6: 84190 BEAUMES DE VENISE
      required:
        - id
        - prm
        - categorieClientFinalCode
        - nomClientFinalOuDenominationSociale
        - adresseInstallationNormalisee
      additionalProperties: false
    EnedisNumeroDeSerie:
      type: string
      allOf:
        - pattern: ^\d{14}$
          title: EnedisNumeroDeSerie
          description: a serial number, 14 digits long
    SearchContractResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: "#/components/schemas/EnedisElectricityContract"
      required:
        - results
      additionalProperties: false
    OtherResult:
      type: object
      properties:
        prm:
          $ref: "#/components/schemas/Prm"
        nomClientFinalOuDenominationSociale:
          type: string
          examples:
            - DUPONT Marie
            - SARL DUPONT ET FILS
        adresseInstallationNormalisee:
          type: object
          properties:
            ligne1:
              anyOf:
                - type: string
                  title: Ligne 1 de l’adresse postale.
                  description: "Ligne 1 de l’adresse postale.

                    \  Cette ligne identifie le destinataire.

                    \  Cette donnée ne sera pas renseignée car

                    \  redondante avec la donnée « Nom ou

                    \  dénomination sociale du client »

                    \  "
                - type: "null"
            ligne2:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 2 de l’adresse postale.

                    \  Cette ligne identifie généralement le

                    \  complément d’identification du destinataire ou

                    \  du point de remise (escalier, étage,

                    \  appartement, boîte aux lettres…).

                    \        "
                  examples:
                    - 03 D
                    - COLLINE DE VELAUX VI
                    - A
                - type: "null"
            ligne3:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 3 de l’adresse postale.

                    \  Cette ligne identifie généralement le

                    \  complément d’identification du point

                    \  géographique (entrée, tour, immeuble,

                    \  bâtiment, résidence, zone industrielle…).

                    \        "
                  examples:
                    - QUARTIER LES CAIRADES
                    - VILLA CHANTE LA MER
                    - VILLA B LOTISSEMENT ACHBARI
                    - QUARTIER LE PEGOUY
                    - CHEMIN DE LA CHABOTT
                - type: "null"
            ligne4:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 4 de l’adresse postale.

                    \  Cette ligne identifie le numéro et le libellé de la

                    \  voie.

                    \        "
                  examples:
                    - 70 ALLEE DU BOIS
                    - 11 IMPASSE DES SENTEURS
                    - 27 CHEMIN DES COUSTELLINES
                - type: "null"
            ligne5:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 5 de l’adresse postale.

                    \  Cette ligne identifie généralement :

                    \  - le lieu-dit ou le service particulier de

                    \  distribution dans le cas d’un client

                    \  résidentiel,

                    \  - les mentions spéciales de distribution et

                    \  commune d’implantation de l’entreprise (si

                    \  différente du bureau distributeur CEDEX)

                    \  dans le cas d’un client professionnel.

                    \        "
                  examples:
                    - HELLEMMES LILLE
                    - BP 4
                - type: "null"
            ligne6:
              type: string
              description: "

                \  Ligne 6 de l’adresse postale.

                \  Cette ligne identifie :

                \  - le code postal et la localité de destination

                \  dans le cas d’un client résidentiel,

                \  - le code postal et bureau distributeur ou

                \  code cedex et bureau distributeur cedex

                \  dans le cas d’un client professionnel.

                \        "
              examples:
                - 84190 BEAUMES DE VENISE
            ligne7:
              anyOf:
                - type: string
                  description: "

                    \  Ligne 7 de l’adresse postale.

                    \  Cette ligne identifie le pays.

                    \  Cette donnée ne sera pas renseignée.

                    \        "
                - type: "null"
          required:
            - ligne6
          additionalProperties: false
          examples:
            - ligne4: 70 ALLEE DU BOIS
              ligne6: 84190 BEAUMES DE VENISE
      required:
        - prm
        - nomClientFinalOuDenominationSociale
        - adresseInstallationNormalisee
      additionalProperties: false
    SearchContractsFromInvoicesResponse:
      type: object
      properties:
        resultsByFile:
          type: array
          items:
            type: object
            properties:
              fileName:
                type: string
                examples:
                  - invoice-edf.pdf
                  - invoice-engie.jpg
                  - invoice-totalenergies.png
              contracts:
                type: array
                items:
                  $ref: "#/components/schemas/EnedisElectricityContract"
              others:
                type: array
                items:
                  $ref: "#/components/schemas/OtherResult"
            required:
              - fileName
              - contracts
              - others
            additionalProperties: false
      required:
        - resultsByFile
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
security: []
tags:
  - name: asks
    description: Operations related to asks
  - name: orders
  - name: contracts
  - name: data-third-parties
  - name: requests
servers:
  - url: https://scw.switchgrid.tech/enedis/v2
