## Retrieve Rate Schedule `v1.contracts.retrieve_rate_schedule(ContractRetrieveRateScheduleParams**kwargs) -> ContractRetrieveRateScheduleResponse` **post** `/v1/contracts/getContractRateSchedule` Get the rate schedule for the rate card on a given contract. ### Parameters - **contract\_id:** `str` ID of the contract to get the rate schedule for. - **customer\_id:** `str` ID of the customer for whose contract to get the rate schedule for. - **limit:** `int` Max number of results that should be returned - **next\_page:** `str` Cursor that indicates where the next page of results should start. - **at:** `Union[str, datetime]` optional timestamp which overlaps with the returned rate schedule segments. When not specified, the current timestamp will be used. - **selectors:** `Iterable[Selector]` List of rate selectors, rates matching ANY of the selectors will be included in the response. Passing no selectors will result in all rates being returned. - **billing\_frequency:** `Literal["MONTHLY", "QUARTERLY", "ANNUAL", "WEEKLY"]` Subscription rates matching the billing frequency will be included in the response. - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **partial\_pricing\_group\_values:** `Dict[str, str]` List of pricing group key value pairs, rates containing the matching key / value pairs will be included in the response. - **pricing\_group\_values:** `Dict[str, str]` List of pricing group key value pairs, rates matching all of the key / value pairs will be included in the response. - **product\_id:** `str` Rates matching the product id will be included in the response. - **product\_tags:** `List[str]` List of product tags, rates matching any of the tags will be included in the response. ### Returns - `class ContractRetrieveRateScheduleResponse` - **data:** `List[Data]` - **entitled:** `bool` - **list\_rate:** `Rate` - **product\_custom\_fields:** `Dict[str, str]` - **product\_id:** `str` - **product\_name:** `str` - **product\_tags:** `List[str]` - **rate\_card\_id:** `str` - **starting\_at:** `datetime` - **billing\_frequency:** `Optional[Literal["MONTHLY", "QUARTERLY", "ANNUAL", "WEEKLY"]]` - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **commit\_rate:** `Optional[DataCommitRate]` A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit. - **rate\_type:** `Literal["FLAT", "PERCENTAGE", "SUBSCRIPTION", 2 more]` - `"FLAT"` - `"PERCENTAGE"` - `"SUBSCRIPTION"` - `"TIERED"` - `"CUSTOM"` - **price:** `Optional[float]` Commit rate price. For FLAT rate_type, this must be >=0. - **tiers:** `Optional[List[Tier]]` Only set for TIERED rate_type. - **price:** `float` - **size:** `Optional[float]` - **ending\_before:** `Optional[datetime]` - **override\_rate:** `Optional[Rate]` - **pricing\_group\_values:** `Optional[Dict[str, str]]` - **next\_page:** `Optional[str]` ### Example ```python from datetime import datetime from metronome import Metronome client = Metronome( bearer_token="My Bearer Token", ) response = client.v1.contracts.retrieve_rate_schedule( contract_id="d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", at=datetime.fromisoformat("2020-01-01T00:00:00.000"), selectors=[{ "product_id": "d6300dbb-882e-4d2d-8dec-5125d16b65d0", "partial_pricing_group_values": { "region": "us-west-2", "cloud": "aws", }, }], ) print(response.data) ```