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

# Get Deal by ID

> This endpoint fetches an individual deal by ID, and returns a Deal object containing all the information about a deal.



## OpenAPI

````yaml https://api.mayerex.com/openapi/public.json get /api/deals/{id}
openapi: 3.0.1
info:
  title: Mayer Partner API
  description: >-
    This API allows partners of Mayer Solar LLC to integrate solar data within
    their own CRM and view trends and analytics.
  termsOfService: https://mayerex.com/api-terms
  contact:
    name: Sarmad Wahab
    url: https://mayerex.com/
    email: sarmad.wahab@mayersolar.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.mayerex.com/
    description: Mayer Production
security:
  - Bearer: []
tags:
  - name: Deals
  - name: Files
  - name: Webhook
paths:
  /api/deals/{id}:
    get:
      tags:
        - Deals
      summary: Get Deal by ID
      description: >-
        This endpoint fetches an individual deal by ID, and returns a Deal
        object containing all the information about a deal.
      operationId: GetDeal
      parameters:
        - name: id
          in: path
          description: The ID of the deal
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerDeal'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MayerError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MayerError'
components:
  schemas:
    PartnerDeal:
      type: object
      properties:
        id:
          type: integer
          description: The ID of the deal in HubSpot
          format: int64
        owner:
          $ref: '#/components/schemas/PartnerOwner'
        projectManager:
          $ref: '#/components/schemas/PartnerOwner2'
        postInstallEngineer:
          $ref: '#/components/schemas/PartnerOwner3'
        postInstallProjectManager:
          $ref: '#/components/schemas/PartnerOwner4'
        ixCoordinator:
          $ref: '#/components/schemas/PartnerOwner5'
        permitCoordinator:
          $ref: '#/components/schemas/PartnerOwner6'
        dealname:
          type: string
          description: The deal name
          nullable: true
        firstName:
          type: string
          description: Homeowner's first name
          nullable: true
        lastName:
          type: string
          description: Homeowner's last name
          nullable: true
        coordinates:
          type: string
          description: Homeowner's coordinates
          nullable: true
        state:
          type: string
          description: Homeowner's state
          nullable: true
        streetAddress:
          type: string
          description: Homeowner's street address
          nullable: true
        city:
          type: string
          description: Homeowner's city
          nullable: true
        zipCode:
          type: string
          description: Homeowner's zip code
          nullable: true
        primaryPhone:
          type: string
          description: Homeowner's primary phone number
          nullable: true
        nameOnUb:
          type: string
          description: Homeowner's name on the utility bill
          nullable: true
        utilityName:
          type: string
          description: Homeowner's utility name
          nullable: true
        stage:
          type: string
          description: The current deal stage
          nullable: true
        stageId:
          type: string
          description: The ID of the deal stage
          nullable: true
        pipelineId:
          type: string
          description: The pipeline ID the deal is in
          nullable: true
        pipeline:
          type: string
          description: The pipeline label the deal is in
          nullable: true
        amount:
          type: number
          description: The deal amount
          format: double
          nullable: true
        totalPpw:
          type: number
          description: The deal's total ppw
          format: double
          nullable: true
        basePpw:
          type: number
          description: The base PPW
          format: double
          nullable: true
        adderPpw:
          type: string
          description: The adder PPW
          nullable: true
        adderCost:
          type: number
          description: The cost of the adders
          format: double
          nullable: true
        adders:
          type: string
          description: Comma separated list of the adders
          nullable: true
        systemSize:
          type: string
          description: The project's system size
          nullable: true
        roofType:
          type: string
          description: The project's roof type
          nullable: true
        auroraProjectId:
          type: string
          description: The project ID in Aurora
          nullable: true
        enerfloProjectId:
          type: string
          description: The project ID in Enerflo
          nullable: true
        opensolarProjectId:
          type: string
          description: The project ID in OpenSolar
          nullable: true
        proposalLink:
          type: string
          description: The proposal link to the design tool
          nullable: true
        battery:
          type: string
          description: The name of the battery used
          nullable: true
        inverterType:
          type: string
          description: The inverter type used
          nullable: true
        moduleType:
          type: string
          description: The module type used
          nullable: true
        numberOfBatteries:
          type: string
          description: The quantity of batteries used
          nullable: true
        numberOfInverters:
          type: string
          description: The quantity of inverters used
          nullable: true
        numberOfModules:
          type: string
          description: The quantity of modules used
          nullable: true
        closerName:
          type: string
          description: The deal's closer name
          nullable: true
        setterName:
          type: string
          description: The deal's setter name
          nullable: true
        dealer:
          type: string
          description: The partner that made closed
          nullable: true
        lender:
          type: string
          description: The lender used
          nullable: true
        loanAmount:
          type: string
          description: The loan amount
          nullable: true
        hoaName:
          type: string
          description: HOA's full name
          nullable: true
        hoaEmail:
          type: string
          description: HOA's email
          nullable: true
        hoaNumber:
          type: string
          description: HOA's phone number
          nullable: true
        notes:
          type: string
          description: The deal notes
          nullable: true
        inspectionNotes:
          type: string
          description: The inspection notes
          nullable: true
        reInspectionResults:
          type: string
          description: The results of the re-inspection
          nullable: true
        inspectionResults:
          type: string
          description: The results of the inspection
          nullable: true
        hasBattery:
          type: boolean
          description: If the project has a battery
        hasChangesToAdders:
          type: boolean
          description: If there were any new changes to the adders
        hasHoa:
          type: boolean
          description: If the project has an HOA
        inspectionRequired:
          type: boolean
          description: If inspection is required
        installCompleted:
          type: boolean
          description: If install has been completed
        m2Approved:
          type: boolean
          description: If M2 was approved
        hasOutstandingItems:
          type: boolean
          description: If the project has outstanding items
        permitRequired:
          type: boolean
          description: If permit is required
        plansetMatchesAsBuilt:
          type: boolean
          description: If planset matches as built
        scopeOfWorkPacket:
          type: boolean
          description: If scope of work packet is completed
        hicAgreement:
          type: string
          description: The ID of the HIC agreement file
          nullable: true
        lastModified:
          type: string
          description: The timestamp of when the deal was last modified
          format: date-time
          nullable: true
        createDate:
          type: string
          description: The date when the project was created on
          format: date-time
          nullable: true
        timeInCurrentStage:
          type: string
          description: Time the deal has been in the current stage
          format: date-time
          nullable: true
        cadCompleted:
          type: string
          description: Date when CAD was completed
          format: date-time
          nullable: true
        cadRequested:
          type: string
          description: Date when Cad was requested
          format: date-time
          nullable: true
        engineeringCompleted:
          type: string
          description: Date when engineering was completed
          format: date-time
          nullable: true
        engineeringRequested:
          type: string
          description: Date when engineering was requested
          format: date-time
          nullable: true
        expectedPermitDeliveryDate:
          type: string
          description: Date of expected permit delivery
          format: date-time
          nullable: true
        fundingSubmitted:
          type: string
          description: Date when funding was submitted
          format: date-time
          nullable: true
        hoaApprovedDate:
          type: string
          description: Date when HOA was approved
          format: date-time
          nullable: true
        inspectionRequested:
          type: string
          description: Date when inspection was requested
          format: date-time
          nullable: true
        installComplete:
          type: string
          description: Date when install was completed
          format: date-time
          nullable: true
        installedScheduled:
          type: string
          description: Date of when install is scheduled
          format: date-time
          nullable: true
        notesLastUpdated:
          type: string
          description: Date when notes were last updated
          format: date-time
          nullable: true
        notesNextActivityDate:
          type: string
          description: Date of the next activity for notes
          format: date-time
          nullable: true
        ntpApproved:
          type: string
          description: Date when NTP was approved
          format: date-time
          nullable: true
        ntpRequested:
          type: string
          description: Date when NTP was requested
          format: date-time
          nullable: true
        permitReceived:
          type: string
          description: Date when permit was received
          format: date-time
          nullable: true
        permitSubmitted:
          type: string
          description: Date when permit was Submitted
          format: date-time
          nullable: true
        reInspectionRequested:
          type: string
          description: Date when re-inspection was requested
          format: date-time
          nullable: true
        reInstallScheduled:
          type: string
          description: Date when re-install was scheduled
          format: date-time
          nullable: true
        reSignDate:
          type: string
          description: Date of the resign
          format: date-time
          nullable: true
        siteSurveyCompleted:
          type: string
          description: Date when site survey was completed
          format: date-time
          nullable: true
        siteSurveyRequested:
          type: string
          description: Date when site survey was requested
          format: date-time
          nullable: true
        redesignCompleteDate:
          type: string
          description: Date when the redesign was completed
          format: date-time
          nullable: true
    MayerError:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        errors:
          type: array
          items:
            type: string
          nullable: true
    PartnerOwner:
      type: object
      properties:
        id:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        teams:
          type: string
          nullable: true
        hubspotTeamId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
      description: The deal's owner / sales representative
      nullable: true
    PartnerOwner2:
      type: object
      properties:
        id:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        teams:
          type: string
          nullable: true
        hubspotTeamId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
      description: The deal's project manager
      nullable: true
    PartnerOwner3:
      type: object
      properties:
        id:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        teams:
          type: string
          nullable: true
        hubspotTeamId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
      description: The deal's post install engineer
      nullable: true
    PartnerOwner4:
      type: object
      properties:
        id:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        teams:
          type: string
          nullable: true
        hubspotTeamId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
      description: The deal's post-install project manager
      nullable: true
    PartnerOwner5:
      type: object
      properties:
        id:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        teams:
          type: string
          nullable: true
        hubspotTeamId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
      description: The deal's IX coordinator
      nullable: true
    PartnerOwner6:
      type: object
      properties:
        id:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        teams:
          type: string
          nullable: true
        hubspotTeamId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
      description: The deal's permit coordinator
      nullable: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: Token

````