## Edit Commit `v2.contracts.edit_commit(ContractEditCommitParams**kwargs) -> ContractEditCommitResponse` **post** `/v2/contracts/commits/edit` Edit a customer or contract commit. Contract commits can only be edited using this endpoint if contract editing is enabled. ### Parameters - **commit\_id:** `str` ID of the commit to edit - **customer\_id:** `str` ID of the customer whose commit is being edited - **access\_schedule:** `AccessSchedule` - **add\_schedule\_items:** `Iterable[AccessScheduleAddScheduleItem]` - **amount:** `float` - **ending\_before:** `Union[str, datetime]` - **starting\_at:** `Union[str, datetime]` - **remove\_schedule\_items:** `Iterable[AccessScheduleRemoveScheduleItem]` - **id:** `str` - **update\_schedule\_items:** `Iterable[AccessScheduleUpdateScheduleItem]` - **id:** `str` - **amount:** `float` - **ending\_before:** `Union[str, datetime]` - **starting\_at:** `Union[str, datetime]` - **applicable\_product\_ids:** `Optional[List[str]]` Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. - **applicable\_product\_tags:** `Optional[List[str]]` Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. - **invoice\_contract\_id:** `str` ID of contract to use for invoicing - **invoice\_schedule:** `InvoiceSchedule` - **add\_schedule\_items:** `Iterable[InvoiceScheduleAddScheduleItem]` - **timestamp:** `Union[str, datetime]` - **amount:** `float` - **quantity:** `float` - **unit\_price:** `float` - **remove\_schedule\_items:** `Iterable[InvoiceScheduleRemoveScheduleItem]` - **id:** `str` - **update\_schedule\_items:** `Iterable[InvoiceScheduleUpdateScheduleItem]` - **id:** `str` - **amount:** `float` - **quantity:** `float` - **timestamp:** `Union[str, datetime]` - **unit\_price:** `float` - **priority:** `Optional[float]` If multiple commits are applicable, the one with the lower priority will apply first. - **product\_id:** `str` - **specifiers:** `Optional[Iterable[Specifier]]` List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. - **presentation\_group\_values:** `Dict[str, str]` - **pricing\_group\_values:** `Dict[str, str]` - **product\_id:** `str` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `List[str]` If provided, the specifier will only apply to products with all the specified tags. ### Returns - `class ContractEditCommitResponse` - **data:** `ID` ### Example ```python from datetime import datetime from metronome import Metronome client = Metronome( bearer_token="My Bearer Token", ) response = client.v2.contracts.edit_commit( commit_id="5e7e82cf-ccb7-428c-a96f-a8e4f67af822", customer_id="4c91c473-fc12-445a-9c38-40421d47023f", access_schedule={ "update_schedule_items": [{ "id": "d5edbd32-c744-48cb-9475-a9bca0e6fa39", "ending_before": datetime.fromisoformat("2025-03-12T00:00:00"), }] }, ) print(response.data) ```