> ## 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.

# Update customer entitlement

> Update an existing customer entitlement



## OpenAPI

````yaml /openAPI/openapi-20240301.json patch /entitlements/{entitlement_id}/customer/{customer_id}/{ec_id}
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /entitlements/{entitlement_id}/customer/{customer_id}/{ec_id}:
    patch:
      tags:
        - Entitlements
      summary: Update customer entitlement
      description: Update an existing customer entitlement
      operationId: Update-customer-entitlement
      parameters:
        - name: entitlement_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Entitlement Id
        - name: customer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Customer Id
        - name: ec_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ec Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEntitlementCustomerRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleEntitlementCustomerResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateEntitlementCustomerRequestSchema:
      properties:
        entitlement:
          type: string
          title: Entitlement
          description: Entitlement ID
        customer:
          type: string
          title: Customer
          description: Customer ID
        expiry_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiry At
          description: Entitlement Expiry Time
        active_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Active From
          description: Entitlement Active From
        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
      type: object
      required:
        - entitlement
        - customer
      title: UpdateEntitlementCustomerRequestSchema
      description: Update Entitlement Request Schema
    SingleEntitlementCustomerResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Entitlement Customer Row Id
        entitlement:
          type: string
          format: uuid
          title: Entitlement
          description: Entitlement ID
        customer:
          type: string
          format: uuid
          title: Customer
          description: Customer ID
        expiry_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiry At
          description: Entitlement Expiry Time
        active_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Active From
          description: Entitlement Active From
        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
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: created time
      type: object
      required:
        - id
        - entitlement
        - customer
      title: SingleEntitlementCustomerResponseSchema
      description: Create Entitlement Customer Request Schema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  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>

````