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

# List customer entitlements

> List all entitlements assigned to a customer



## OpenAPI

````yaml /openAPI/openapi-20240301.json get /entitlements/customer/{customer_id}
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /entitlements/customer/{customer_id}:
    get:
      tags:
        - Entitlements
      summary: List customer entitlements
      description: List all entitlements assigned to a customer
      operationId: List-customer-entitlements
      parameters:
        - name: customer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Customer Id
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The cursor indicating a unique set of results - this should be
              auto generated and you get it from the `next` and `previous`
              fields of the response
            examples:
              - V2VsbCBhcmV1IGN1cmlvdxM=
            title: Cursor
          description: >-
            The cursor indicating a unique set of results - this should be auto
            generated and you get it from the `next` and `previous` fields of
            the response
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: The number of results to return - defaults to 10
            examples:
              - 10
            title: Limit
          description: The number of results to return - defaults to 10
        - name: sort_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - sort_key=id
            title: Sort Key
        - name: sort_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - sort_key=asc
            title: Sort Type
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: populate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - customer
            title: Populate
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - status=draft,active
            title: Status
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResults_EntitlementCustomerResponseSchema_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PaginatedResults_EntitlementCustomerResponseSchema_:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
          description: The cursor for the next page of results
          examples:
            - V2VsbCBhcmV1IGN1cmlvdxM=
        previous:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous
          description: The cursor for the previous page of results
          examples:
            - GmBsbCBhcmV1IGN1cmlvdxM=
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: The total count of rows
        results:
          items:
            $ref: '#/components/schemas/EntitlementCustomerResponseSchema'
          type: array
          title: Results
          description: The results for the current page
      type: object
      required:
        - results
      title: PaginatedResults[EntitlementCustomerResponseSchema]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EntitlementCustomerResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Entitlement Customer Row Id
        entitlement:
          type: string
          format: uuid
          title: Entitlement
          description: Entitlement ID
        name:
          type: string
          title: Name
          description: Entitlement Name
        type:
          anyOf:
            - $ref: '#/components/schemas/EntitlementType'
            - type: 'null'
          description: Entitlement Type
        source_type:
          anyOf:
            - $ref: '#/components/schemas/SourceType'
            - type: 'null'
          description: Entitlement source type
        source_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Id
          description: Entitlement source id
        units:
          anyOf:
            - type: string
            - type: 'null'
          title: Units
          description: Entitlement units
        customer:
          anyOf:
            - type: string
              format: uuid
            - $ref: '#/components/schemas/app__entitlements__schema__DetailsObject'
          title: Customer
          description: Customer ID
        contract:
          anyOf:
            - $ref: '#/components/schemas/app__entitlements__schema__DetailsObject'
            - type: 'null'
          description: Contract Details
        product:
          anyOf:
            - $ref: '#/components/schemas/app__entitlements__schema__DetailsObject'
            - type: 'null'
          description: Product Details
        invoice:
          anyOf:
            - $ref: '#/components/schemas/app__entitlements__schema__DetailsObject'
            - type: 'null'
          description: Invoice Details
        active_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Active From
          description: Entitlement Active From
        expiry_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiry At
          description: Entitlement Expiry Time
        quantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantity
          description: Entitlement Units assigned
        quantity_used:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantity Used
          description: Entitlement Units Consumed
        quantity_remaining:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantity Remaining
          description: Entitlement Units Remaining
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: created time
        contract_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Contract Id
          description: Contract ID
        event:
          anyOf:
            - type: string
            - type: 'null'
          title: Event
          description: Event
        invoice_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Invoice Id
          description: Source ID
        status:
          anyOf:
            - $ref: '#/components/schemas/EntitlementCustomerStatus'
            - type: 'null'
          description: Entitlement status
      type: object
      required:
        - id
        - entitlement
        - name
        - units
        - customer
      title: EntitlementCustomerResponseSchema
      description: Create Entitlement Customer Request Schema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EntitlementType:
      type: string
      enum:
        - Feature
        - Quantity
        - Credits
      title: EntitlementType
    SourceType:
      type: string
      enum:
        - Grant
        - Billable
        - Rollover
        - Adjustment
      title: SourceType
      description: Source type for entitlement grants
    app__entitlements__schema__DetailsObject:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      title: DetailsObject
    EntitlementCustomerStatus:
      type: string
      enum:
        - draft
        - active
        - expired
        - voided
      title: EntitlementCustomerStatus
      description: Status of Entitlement Customer record
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````