> ## Documentation Index
> Fetch the complete documentation index at: https://c-mass.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Quote for Electricity Consumption

> Get a price quote for offsetting the given amount of electricity consumption.



## OpenAPI

````yaml POST /v1/quotes/electricity
openapi: 3.0.1
info:
  title: c-mass API
  description: API for managing carbon credits, projects, portfolios, and orders
  version: 1.0.0
servers:
  - url: https://carbon-engine.onrender.com
security:
  - bearerAuth: []
paths:
  /v1/quotes/electricity:
    post:
      tags:
        - Quotes
      summary: Get a carbon credit quote for electricity consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - electricityConsumed
                - pricePaid
              properties:
                electricityConsumed:
                  type: number
                  description: Electricity consumed, in kW.
                pricePaid:
                  type: number
                  description: How much was paid for the amount of electricity consumed.
                portfolio_id:
                  type: string
                  nullable: true
                  description: >-
                    Optional ID of the portfolio to use for the quote. The quote
                    will be for an order fulfilled from this portfolio. If not
                    specified, the account's default portfolio will be used.
      responses:
        '200':
          description: Fetched electricity comsumption quote successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElectricityQuote'
        '400':
          description: Missing required values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteError'
        '500':
          description: Server error
      security:
        - bearerAuth: []
components:
  schemas:
    ElectricityQuote:
      type: object
      properties:
        amount_kg:
          description: Amount of carbon credits the quote is for, in kilograms
          type: number
        price_sar_halalas:
          description: Price charged for the credits, in halalas (integer)
          type: number
    QuoteError:
      type: object
      properties:
        error:
          type: integer
          description: Error code
        message:
          type: string
          description: Error message describing the issue
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````