## Schedule Pro Services Invoice `v1.contracts.schedule_pro_services_invoice(ContractScheduleProServicesInvoiceParams**kwargs) -> ContractScheduleProServicesInvoiceResponse` **post** `/v1/contracts/scheduleProServicesInvoice` Create a new scheduled invoice for Professional Services terms on a contract. This endpoint's availability is dependent on your client's configuration. ### Parameters - **contract\_id:** `str` - **customer\_id:** `str` - **issued\_at:** `Union[str, datetime]` The date the invoice is issued - **line\_items:** `Iterable[LineItem]` Each line requires an amount or both unit_price and quantity. - **professional\_service\_id:** `str` - **amendment\_id:** `str` If the professional_service_id was added on an amendment, this is required. - **amount:** `float` Amount for the term on the new invoice. - **metadata:** `str` For client use. - **netsuite\_invoice\_billing\_end:** `Union[str, datetime]` The end date for the billing period on the invoice. - **netsuite\_invoice\_billing\_start:** `Union[str, datetime]` The start date for the billing period on the invoice. - **quantity:** `float` Quantity for the charge. Will be multiplied by unit_price to determine the amount. - **unit\_price:** `float` If specified, this overrides the unit price on the pro service term. Must also provide quantity (but not amount) if providing unit_price. - **netsuite\_invoice\_header\_end:** `Union[str, datetime]` The end date of the invoice header in Netsuite - **netsuite\_invoice\_header\_start:** `Union[str, datetime]` The start date of the invoice header in Netsuite ### Returns - `class ContractScheduleProServicesInvoiceResponse` - **data:** `List[Invoice]` - **id:** `str` - **credit\_type:** `CreditTypeData` - **customer\_id:** `str` - **line\_items:** `List[LineItem]` - **credit\_type:** `CreditTypeData` - **name:** `str` - **total:** `float` - **applied\_commit\_or\_credit:** `Optional[LineItemAppliedCommitOrCredit]` Details about the credit or commit that was applied to this line item. Only present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE` types. - **id:** `str` - **type:** `Literal["PREPAID", "POSTPAID", "CREDIT"]` - `"PREPAID"` - `"POSTPAID"` - `"CREDIT"` - **commit\_custom\_fields:** `Optional[Dict[str, str]]` - **commit\_id:** `Optional[str]` For line items with product of `USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, the ID of the credit or commit that was applied to this line item. For line items with product type of `FIXED`, the ID of the prepaid or postpaid commit that is being paid for. - **commit\_netsuite\_item\_id:** `Optional[str]` - **commit\_netsuite\_sales\_order\_id:** `Optional[str]` - **commit\_segment\_id:** `Optional[str]` - **commit\_type:** `Optional[str]` `PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (for commit type `POSTPAID`). - **custom\_fields:** `Optional[Dict[str, str]]` - **discount\_custom\_fields:** `Optional[Dict[str, str]]` - **discount\_id:** `Optional[str]` ID of the discount applied to this line item. - **ending\_before:** `Optional[datetime]` The line item's end date (exclusive). - **group\_key:** `Optional[str]` - **group\_value:** `Optional[str]` - **is\_prorated:** `Optional[bool]` Indicates whether the line item is prorated for `SUBSCRIPTION` type product. - **list\_price:** `Optional[Rate]` Only present for contract invoices and when the `include_list_prices` query parameter is set to true. This will include the list rate for the charge if applicable. Only present for usage and subscription line items. - **metadata:** `Optional[str]` - **netsuite\_invoice\_billing\_end:** `Optional[datetime]` The end date for the billing period on the invoice. - **netsuite\_invoice\_billing\_start:** `Optional[datetime]` The start date for the billing period on the invoice. - **netsuite\_item\_id:** `Optional[str]` - **postpaid\_commit:** `Optional[LineItemPostpaidCommit]` Only present for line items paying for a postpaid commit true-up. - **id:** `str` - **presentation\_group\_values:** `Optional[Dict[str, Optional[str]]]` Includes the presentation group values associated with this line item if presentation group keys are used. - **pricing\_group\_values:** `Optional[Dict[str, str]]` Includes the pricing group values associated with this line item if dimensional pricing is used. - **product\_custom\_fields:** `Optional[Dict[str, str]]` - **product\_id:** `Optional[str]` ID of the product associated with the line item. - **product\_tags:** `Optional[List[str]]` The current product tags associated with the line item's `product_id`. - **product\_type:** `Optional[str]` The type of the line item's product. Possible values are `FixedProductListItem` (for `FIXED` type products), `UsageProductListItem` (for `USAGE` type products), `SubscriptionProductListItem` (for `SUBSCRIPTION` type products) or `CompositeProductListItem` (for `COMPOSITE` type products). For scheduled charges, commit and credit payments, the value is `FixedProductListItem`. - **professional\_service\_custom\_fields:** `Optional[Dict[str, str]]` - **professional\_service\_id:** `Optional[str]` - **quantity:** `Optional[float]` The quantity associated with the line item. - **reseller\_type:** `Optional[Literal["AWS", "AWS_PRO_SERVICE", "GCP", "GCP_PRO_SERVICE"]]` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **scheduled\_charge\_custom\_fields:** `Optional[Dict[str, str]]` - **scheduled\_charge\_id:** `Optional[str]` ID of scheduled charge. - **starting\_at:** `Optional[datetime]` The line item's start date (inclusive). - **sub\_line\_items:** `Optional[List[LineItemSubLineItem]]` - **custom\_fields:** `Dict[str, str]` - **name:** `str` - **quantity:** `float` - **subtotal:** `float` - **charge\_id:** `Optional[str]` - **credit\_grant\_id:** `Optional[str]` - **end\_date:** `Optional[datetime]` The end date for the charge (for seats charges only). - **price:** `Optional[float]` the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero - **start\_date:** `Optional[datetime]` The start date for the charge (for seats charges only). - **tier\_period:** `Optional[LineItemSubLineItemTierPeriod]` when the current tier started and ends (for tiered charges only) - **starting\_at:** `datetime` - **ending\_before:** `Optional[datetime]` - **tiers:** `Optional[List[LineItemSubLineItemTier]]` - **price:** `float` - **quantity:** `float` - **starting\_at:** `float` at what metric amount this tier begins - **subtotal:** `float` - **subscription\_custom\_fields:** `Optional[Dict[str, str]]` - **tier:** `Optional[LineItemTier]` Populated if the line item has a tiered price. - **level:** `float` - **starting\_at:** `str` - **size:** `Optional[str]` - **unit\_price:** `Optional[float]` The unit price associated with the line item. - **status:** `str` - **total:** `float` - **type:** `str` - **amendment\_id:** `Optional[str]` - **billable\_status:** `Optional[Literal["billable", "unbillable"]]` This field's availability is dependent on your client's configuration. - `"billable"` - `"unbillable"` - **contract\_custom\_fields:** `Optional[Dict[str, str]]` - **contract\_id:** `Optional[str]` - **correction\_record:** `Optional[CorrectionRecord]` - **corrected\_invoice\_id:** `str` - **memo:** `str` - **reason:** `str` - **corrected\_external\_invoice:** `Optional[CorrectionRecordCorrectedExternalInvoice]` - **billing\_provider\_type:** `Literal["aws_marketplace", "stripe", "netsuite", 5 more]` - `"aws_marketplace"` - `"stripe"` - `"netsuite"` - `"custom"` - `"azure_marketplace"` - `"quickbooks_online"` - `"workday"` - `"gcp_marketplace"` - **external\_status:** `Optional[Literal["DRAFT", "FINALIZED", "PAID", 8 more]]` - `"DRAFT"` - `"FINALIZED"` - `"PAID"` - `"UNCOLLECTIBLE"` - `"VOID"` - `"DELETED"` - `"PAYMENT_FAILED"` - `"INVALID_REQUEST_ERROR"` - `"SKIPPED"` - `"SENT"` - `"QUEUED"` - **invoice\_id:** `Optional[str]` - **issued\_at\_timestamp:** `Optional[datetime]` - **created\_at:** `Optional[datetime]` When the invoice was created (UTC). This field is present for correction invoices only. - **custom\_fields:** `Optional[Dict[str, object]]` - **customer\_custom\_fields:** `Optional[Dict[str, str]]` - **end\_timestamp:** `Optional[datetime]` End of the usage period this invoice covers (UTC) - **external\_invoice:** `Optional[ExternalInvoice]` - **billing\_provider\_type:** `Literal["aws_marketplace", "stripe", "netsuite", 5 more]` - `"aws_marketplace"` - `"stripe"` - `"netsuite"` - `"custom"` - `"azure_marketplace"` - `"quickbooks_online"` - `"workday"` - `"gcp_marketplace"` - **external\_status:** `Optional[Literal["DRAFT", "FINALIZED", "PAID", 8 more]]` - `"DRAFT"` - `"FINALIZED"` - `"PAID"` - `"UNCOLLECTIBLE"` - `"VOID"` - `"DELETED"` - `"PAYMENT_FAILED"` - `"INVALID_REQUEST_ERROR"` - `"SKIPPED"` - `"SENT"` - `"QUEUED"` - **invoice\_id:** `Optional[str]` - **issued\_at\_timestamp:** `Optional[datetime]` - **invoice\_adjustments:** `Optional[List[InvoiceAdjustment]]` - **credit\_type:** `CreditTypeData` - **name:** `str` - **total:** `float` - **credit\_grant\_custom\_fields:** `Optional[Dict[str, str]]` - **credit\_grant\_id:** `Optional[str]` - **issued\_at:** `Optional[datetime]` When the invoice was issued (UTC) - **net\_payment\_terms\_days:** `Optional[float]` - **netsuite\_sales\_order\_id:** `Optional[str]` This field's availability is dependent on your client's configuration. - **plan\_custom\_fields:** `Optional[Dict[str, str]]` - **plan\_id:** `Optional[str]` - **plan\_name:** `Optional[str]` - **reseller\_royalty:** `Optional[ResellerRoyalty]` Only present for contract invoices with reseller royalties. - **fraction:** `str` - **netsuite\_reseller\_id:** `str` - **reseller\_type:** `Literal["AWS", "AWS_PRO_SERVICE", "GCP", "GCP_PRO_SERVICE"]` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **aws\_options:** `Optional[ResellerRoyaltyAwsOptions]` - **aws\_account\_number:** `Optional[str]` - **aws\_offer\_id:** `Optional[str]` - **aws\_payer\_reference\_id:** `Optional[str]` - **gcp\_options:** `Optional[ResellerRoyaltyGcpOptions]` - **gcp\_account\_id:** `Optional[str]` - **gcp\_offer\_id:** `Optional[str]` - **salesforce\_opportunity\_id:** `Optional[str]` This field's availability is dependent on your client's configuration. - **start\_timestamp:** `Optional[datetime]` Beginning of the usage period this invoice covers (UTC) - **subtotal:** `Optional[float]` ### Example ```python from datetime import datetime from metronome import Metronome client = Metronome( bearer_token="My Bearer Token", ) response = client.v1.contracts.schedule_pro_services_invoice( contract_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", customer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", issued_at=datetime.fromisoformat("2019-12-27T18:11:19.117"), line_items=[{ "professional_service_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }], ) print(response.data) ```