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

# Worksite operation update



## OpenAPI

````yaml /api-reference/partners/api.json put /v1/worksites/{id}/operations/{worksite_operation_id}
openapi: 3.1.0
info:
  title: Laravel
  version: 0.0.1
servers:
  - url: https://api.opx.co/partners
    description: Production
security: []
paths:
  /v1/worksites/{id}/operations/{worksite_operation_id}:
    put:
      tags:
        - WorksitesOperations
      summary: Worksite operation update
      operationId: partners.worksites.operations.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: worksite_operation_id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorksitesOperationsUpdateRequest'
      responses:
        '200':
          description: '`WorksiteOperationResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WorksiteOperationResource'
                required:
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    WorksitesOperationsUpdateRequest:
      type: object
      properties:
        kwhc:
          type: number
        cee_amount:
          type: number
          description: prime reversée au bénéficiaire
        aides_informations:
          type: array
          description: >-
            voir
            https:docs.opx.co/partners-api/operations/operation-aids-parameters-list
          items:
            type: string
        external_reference:
          type:
            - string
            - 'null'
          description: >-
            Nullable fields that require kwhc, cee_amount, aides_informations
            when present
          maxLength: 255
        cdp_amount:
          type:
            - number
            - 'null'
        mpr_amount:
          type:
            - number
            - 'null'
        fost_version:
          type:
            - string
            - 'null'
          maxLength: 255
        ah_informations:
          type:
            - array
            - 'null'
          description: >-
            voir
            https:docs.opx.co/partners-api/operations/operation-ah-parameters-list
          items:
            type: string
        commitment_date:
          type:
            - string
            - 'null'
        invoice_reference:
          type:
            - string
            - 'null'
          description: Simple update fields (can be updated without required parameters)
          maxLength: 255
        material_ids:
          type:
            - array
            - 'null'
          items:
            type: string
        completion_proof_date:
          type:
            - string
            - 'null'
        subcontractor_id:
          type:
            - integer
            - 'null'
        quote_reference:
          type:
            - string
            - 'null'
          description: référence du devis
          maxLength: 255
        custom_status_id:
          type:
            - integer
            - 'null'
          description: statut personnalisé à assigner
      title: WorksitesOperationsUpdateRequest
    WorksiteOperationResource:
      type: object
      properties:
        id:
          type: integer
        external_reference:
          type:
            - string
            - 'null'
        worksite_id:
          type: integer
        operation_id:
          type: integer
        status:
          type: string
        code:
          type: string
        fost_version:
          type: string
        classic_kwhc:
          type:
            - string
            - 'null'
        precarity_kwhc:
          type:
            - string
            - 'null'
        cee_amount:
          type: string
          description: prime CEE reversée au bénéficiaire
        cee_amount_total:
          type: string
          description: prime CEE totale
        cdp_amount:
          type: string
          description: prime CDP reversée au bénéficiaire
        cdp_amount_total:
          type: string
          description: prime CDP totale
        mpr_amount:
          type:
            - string
            - 'null'
        invoice_reference:
          type:
            - string
            - 'null'
        aides_informations:
          type: array
          items: {}
        ah_informations:
          type: array
          items: {}
        material_ids:
          type: array
          items: {}
        completion_proof_date:
          type:
            - string
            - 'null'
          description: date de preuve de réalisation
        commitment_date:
          type:
            - string
            - 'null'
          description: date d'engagement
        subcontractor_id:
          type:
            - integer
            - 'null'
        custom_worksite_operation_status_id:
          type: string
        custom_worksite_operation_status_label:
          type: string
        quote_reference:
          type:
            - string
            - 'null'
      required:
        - id
        - external_reference
        - worksite_id
        - operation_id
        - status
        - code
        - fost_version
        - classic_kwhc
        - precarity_kwhc
        - cee_amount
        - cee_amount_total
        - cdp_amount
        - cdp_amount_total
        - mpr_amount
        - invoice_reference
        - aides_informations
        - ah_informations
        - material_ids
        - completion_proof_date
        - commitment_date
        - subcontractor_id
        - custom_worksite_operation_status_id
        - custom_worksite_operation_status_label
        - quote_reference
      title: WorksiteOperationResource
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````