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

# Retrieves contracts

> Retrieves contracts. Required permission: crm:contract:list



## OpenAPI

````yaml /api/core-api/crmiapi.json get /api/v1/crm/contracts
openapi: 3.1.1
info:
  title: chargecloud - Core API
  summary: chargecloud Core API. All around CRM, Asset Management and more.
  version: 1.113.1
  description: chargecloud Core API. All around CRM, Asset Management and more.
servers:
  - url: https://api.chargecloud.dev
    description: Production - chargecloud Core API
  - url: https://demo.chargecloud.de
    description: Sandbox/Dev - chargecloud Core API
security: []
paths:
  /api/v1/crm/contracts:
    get:
      tags:
        - Contracts
      summary: Retrieves contracts
      description: 'Retrieves contracts. Required permission: crm:contract:list'
      operationId: /api/v1/crm/contracts_GET
      parameters:
        - name: customerNumber
          in: query
          description: Customers number
          schema:
            type: string
            description: Customers number
        - name: name
          in: query
          description: Business, company name, or personal name of customer
          schema:
            type: string
            description: Business, company name, or personal name of customer
        - name: extContractId
          in: query
          description: External contract ID
          schema:
            type: string
            description: External contract ID
        - name: status
          in: query
          description: Contract status
          schema:
            type: string
            enum:
              - open
              - cancellation_previous
              - delivery_net
              - waiting
              - active
              - blocked
              - terminated
              - expired
              - done
              - cancelled
            description: Contract status
        - name: limit
          in: query
          description: Maximum number of items per page. Maximum value is 25.
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 25
            description: Maximum number of items per page. Maximum value is 25.
            example: '10'
        - name: page
          in: query
          description: Page number to retrieve (starting from 1).
          schema:
            type: integer
            format: int64
            minimum: 1
            description: Page number to retrieve (starting from 1).
            example: '1'
      responses:
        '200':
          description: Contract collection
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - contracts
                properties:
                  contracts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          format: int32
                          description: Contract ID
                        uuid:
                          type: string
                          maxLength: 36
                          description: Contract UUID
                        type:
                          type: string
                          enum:
                            - energy
                            - energy_external
                            - energy_external_lima
                            - emobility
                            - emobility_adhoc
                            - non_commodity
                          description: Contract type
                        energy:
                          type: string
                          enum:
                            - electricity
                            - gas
                          description: Energy type
                        customer_number:
                          type: string
                          maxLength: 50
                          description: Customer number
                        business:
                          type: boolean
                          default: false
                          description: Is business customer
                        company_name:
                          type: string
                          maxLength: 255
                          description: Company name
                        firstname:
                          type: string
                          maxLength: 70
                          description: Firstname
                        surname:
                          type: string
                          maxLength: 70
                          description: Surname
                        created_at:
                          type: string
                          format: date-time
                          pattern: >-
                            ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$
                          description: Contract creation date
                        start_date:
                          type: string
                          format: date
                          pattern: ^\d{4}-\d{2}-\d{2}$
                          description: Start date
                        end_date:
                          type: string
                          format: date
                          pattern: ^\d{4}-\d{2}-\d{2}$
                          description: End date
                        cancelled_at:
                          type: string
                          format: date-time
                          pattern: >-
                            ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$
                          description: Cancelled at
                        status:
                          type: string
                          enum:
                            - open
                            - cancellation_previous
                            - delivery_net
                            - waiting
                            - active
                            - blocked
                            - terminated
                            - expired
                            - done
                            - cancelled
                          description: Contract status
                        is_locked:
                          type: boolean
                          default: false
                          description: Locked for editing
                        blocked:
                          type: boolean
                          default: false
                          description: Blocked
                        disabled:
                          type: boolean
                          default: false
                          description: Disabled
                        usage:
                          type: integer
                          format: int32
                          description: Usage
                        zip:
                          type: string
                          maxLength: 16
                          description: ZIP
                        city:
                          type: string
                          maxLength: 128
                          description: City
                      required:
                        - id
                        - uuid
                        - type
                        - energy
                        - business
                        - firstname
                        - surname
                        - is_locked
                        - blocked
                        - disabled
                        - usage
                        - zip
                        - city
                      description: Contract
                    description: Contracts
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        format: int64
                        description: Current page number (starting from 1).
                        example: '1'
                      total_pages:
                        type: integer
                        format: int64
                        description: Total number of available pages.
                        example: '5'
                      page_size:
                        type: integer
                        format: int64
                        description: Number of items returned per page.
                        example: '10'
                      has_more:
                        type: boolean
                        default: true
                        description: >-
                          Indicates whether more pages are available after the
                          current page.
                        example: 'true'
                    description: Pagination
        '401':
          description: Unauthorized
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
        '403':
          description: Forbidden
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        format: int64
                        description: Current page number (starting from 1).
                        example: '1'
                      total_pages:
                        type: integer
                        format: int64
                        description: Total number of available pages.
                        example: '5'
                      page_size:
                        type: integer
                        format: int64
                        description: Number of items returned per page.
                        example: '10'
                      has_more:
                        type: boolean
                        default: true
                        description: >-
                          Indicates whether more pages are available after the
                          current page.
                        example: 'true'
                    description: Pagination
        '404':
          description: Not found
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
        '405':
          description: Method not allowed
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
        '422':
          description: Request validation failed
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        errorKey:
                          type: string
                          description: A key identifying the error
                        message:
                          type: string
                          description: The error message
                        parameter:
                          type: string
                          description: The parameter that caused the error, if any
                      required:
                        - errorKey
                        - message
                        - parameter
                      description: Error
                    description: List of errors
        '429':
          description: Too many requests
          headers:
            Content-Language:
              $ref: '#/components/headers/Content-Language'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
      security:
        - bearer:
            - crm:contract
components:
  headers:
    Content-Language:
      description: The locale of the response content (BCP 47 language tag).
      schema:
        type: string
        example: en
  securitySchemes:
    bearer:
      type: http
      description: OAuth2 Bearer Authorization
      scheme: bearer
      bearerFormat: JWT

````

## Related topics

- [Retrieves details of a contract](/api-reference/contracts/retrieves-details-of-a-contract.md)
- [Retrieves locations](/api-reference/locations/retrieves-locations.md)
- [Contract management](/contract-management.md)
