## Schedule Pro Services Invoice `client.v1.contracts.scheduleProServicesInvoice(ContractScheduleProServicesInvoiceParamsbody, RequestOptionsoptions?): 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 - **body:** `ContractScheduleProServicesInvoiceParams` - **contract\_id:** `string` - **customer\_id:** `string` - **issued\_at:** `string` The date the invoice is issued - **line\_items:** `Array` Each line requires an amount or both unit_price and quantity. - **professional\_service\_id:** `string` - **amendment\_id:** `string` If the professional_service_id was added on an amendment, this is required. - **amount:** `number` Amount for the term on the new invoice. - **metadata:** `string` For client use. - **netsuite\_invoice\_billing\_end:** `string` The end date for the billing period on the invoice. - **netsuite\_invoice\_billing\_start:** `string` The start date for the billing period on the invoice. - **quantity:** `number` Quantity for the charge. Will be multiplied by unit_price to determine the amount. - **unit\_price:** `number` 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:** `string` The end date of the invoice header in Netsuite - **netsuite\_invoice\_header\_start:** `string` The start date of the invoice header in Netsuite ### Returns - `ContractScheduleProServicesInvoiceResponse` - **data:** `Array` - **id:** `string` - **credit\_type:** `CreditTypeData` - **customer\_id:** `string` - **line\_items:** `Array` - **credit\_type:** `CreditTypeData` - **name:** `string` - **total:** `number` - **applied\_commit\_or\_credit:** `AppliedCommitOrCredit` 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:** `string` - **type:** `"PREPAID" | "POSTPAID" | "CREDIT"` - `"PREPAID"` - `"POSTPAID"` - `"CREDIT"` - **commit\_custom\_fields:** `Record` - **commit\_id:** `string` 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:** `string` - **commit\_netsuite\_sales\_order\_id:** `string` - **commit\_segment\_id:** `string` - **commit\_type:** `string` `PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (for commit type `POSTPAID`). - **custom\_fields:** `Record` - **discount\_custom\_fields:** `Record` - **discount\_id:** `string` ID of the discount applied to this line item. - **ending\_before:** `string` The line item's end date (exclusive). - **group\_key:** `string` - **group\_value:** `string | null` - **is\_prorated:** `boolean` Indicates whether the line item is prorated for `SUBSCRIPTION` type product. - **list\_price:** `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:** `string` - **netsuite\_invoice\_billing\_end:** `string` The end date for the billing period on the invoice. - **netsuite\_invoice\_billing\_start:** `string` The start date for the billing period on the invoice. - **netsuite\_item\_id:** `string` - **postpaid\_commit:** `PostpaidCommit` Only present for line items paying for a postpaid commit true-up. - **id:** `string` - **presentation\_group\_values:** `Record` Includes the presentation group values associated with this line item if presentation group keys are used. - **pricing\_group\_values:** `Record` Includes the pricing group values associated with this line item if dimensional pricing is used. - **product\_custom\_fields:** `Record` - **product\_id:** `string` ID of the product associated with the line item. - **product\_tags:** `Array` The current product tags associated with the line item's `product_id`. - **product\_type:** `string` 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:** `Record` - **professional\_service\_id:** `string` - **quantity:** `number` The quantity associated with the line item. - **reseller\_type:** `"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **scheduled\_charge\_custom\_fields:** `Record` - **scheduled\_charge\_id:** `string` ID of scheduled charge. - **starting\_at:** `string` The line item's start date (inclusive). - **sub\_line\_items:** `Array` - **custom\_fields:** `Record` - **name:** `string` - **quantity:** `number` - **subtotal:** `number` - **charge\_id:** `string` - **credit\_grant\_id:** `string` - **end\_date:** `string` The end date for the charge (for seats charges only). - **price:** `number` the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero - **start\_date:** `string` The start date for the charge (for seats charges only). - **tier\_period:** `TierPeriod` when the current tier started and ends (for tiered charges only) - **starting\_at:** `string` - **ending\_before:** `string` - **tiers:** `Array` - **price:** `number` - **quantity:** `number` - **starting\_at:** `number` at what metric amount this tier begins - **subtotal:** `number` - **subscription\_custom\_fields:** `Record` - **tier:** `Tier` Populated if the line item has a tiered price. - **level:** `number` - **starting\_at:** `string` - **size:** `string | null` - **unit\_price:** `number` The unit price associated with the line item. - **status:** `string` - **total:** `number` - **type:** `string` - **amendment\_id:** `string` - **billable\_status:** `"billable" | "unbillable"` This field's availability is dependent on your client's configuration. - `"billable"` - `"unbillable"` - **contract\_custom\_fields:** `Record` - **contract\_id:** `string` - **correction\_record:** `CorrectionRecord` - **corrected\_invoice\_id:** `string` - **memo:** `string` - **reason:** `string` - **corrected\_external\_invoice:** `CorrectedExternalInvoice` - **billing\_provider\_type:** `"aws_marketplace" | "stripe" | "netsuite" | 5 more` - `"aws_marketplace"` - `"stripe"` - `"netsuite"` - `"custom"` - `"azure_marketplace"` - `"quickbooks_online"` - `"workday"` - `"gcp_marketplace"` - **external\_status:** `"DRAFT" | "FINALIZED" | "PAID" | 8 more` - `"DRAFT"` - `"FINALIZED"` - `"PAID"` - `"UNCOLLECTIBLE"` - `"VOID"` - `"DELETED"` - `"PAYMENT_FAILED"` - `"INVALID_REQUEST_ERROR"` - `"SKIPPED"` - `"SENT"` - `"QUEUED"` - **invoice\_id:** `string` - **issued\_at\_timestamp:** `string` - **created\_at:** `string` When the invoice was created (UTC). This field is present for correction invoices only. - **custom\_fields:** `Record` - **customer\_custom\_fields:** `Record` - **end\_timestamp:** `string` End of the usage period this invoice covers (UTC) - **external\_invoice:** `ExternalInvoice | null` - **billing\_provider\_type:** `"aws_marketplace" | "stripe" | "netsuite" | 5 more` - `"aws_marketplace"` - `"stripe"` - `"netsuite"` - `"custom"` - `"azure_marketplace"` - `"quickbooks_online"` - `"workday"` - `"gcp_marketplace"` - **external\_status:** `"DRAFT" | "FINALIZED" | "PAID" | 8 more` - `"DRAFT"` - `"FINALIZED"` - `"PAID"` - `"UNCOLLECTIBLE"` - `"VOID"` - `"DELETED"` - `"PAYMENT_FAILED"` - `"INVALID_REQUEST_ERROR"` - `"SKIPPED"` - `"SENT"` - `"QUEUED"` - **invoice\_id:** `string` - **issued\_at\_timestamp:** `string` - **invoice\_adjustments:** `Array` - **credit\_type:** `CreditTypeData` - **name:** `string` - **total:** `number` - **credit\_grant\_custom\_fields:** `Record` - **credit\_grant\_id:** `string` - **issued\_at:** `string` When the invoice was issued (UTC) - **net\_payment\_terms\_days:** `number` - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **plan\_custom\_fields:** `Record` - **plan\_id:** `string` - **plan\_name:** `string` - **reseller\_royalty:** `ResellerRoyalty` Only present for contract invoices with reseller royalties. - **fraction:** `string` - **netsuite\_reseller\_id:** `string` - **reseller\_type:** `"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **aws\_options:** `AwsOptions` - **aws\_account\_number:** `string` - **aws\_offer\_id:** `string` - **aws\_payer\_reference\_id:** `string` - **gcp\_options:** `GcpOptions` - **gcp\_account\_id:** `string` - **gcp\_offer\_id:** `string` - **salesforce\_opportunity\_id:** `string` This field's availability is dependent on your client's configuration. - **start\_timestamp:** `string` Beginning of the usage period this invoice covers (UTC) - **subtotal:** `number` ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); const response = await client.v1.contracts.scheduleProServicesInvoice({ contract_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', issued_at: '2019-12-27T18:11:19.117Z', line_items: [{ professional_service_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }], }); console.log(response.data); ```