Ibm cloud 软层计费发票API

Ibm cloud 软层计费发票API,ibm-cloud,ibm-cloud-infrastructure,billing,invoice,Ibm Cloud,Ibm Cloud Infrastructure,Billing,Invoice,我们正在尝试使用API检索许多具有折扣定价的Softlayer服务器的标价 我们大致了解如何做到这一点,但希望得到一些确认和指导 我们打算使用Softlayer billing invoice API从每个发票检索账单项目列表 这为我们提供了服务器计费项目的折扣价格,但我们如何获得标价 要获得商品的原价,可以使用SoftLayer_Product_Package service的方法,因为您必须获得商品的packageId和位置 要获取项目包和位置ID,可以使用以下rest api: 方法:获

我们正在尝试使用API检索许多具有折扣定价的Softlayer服务器的标价

我们大致了解如何做到这一点,但希望得到一些确认和指导

我们打算使用Softlayer billing invoice API从每个发票检索账单项目列表


这为我们提供了服务器计费项目的折扣价格,但我们如何获得标价

要获得商品的原价,可以使用SoftLayer_Product_Package service的方法,因为您必须获得商品的packageId和位置

要获取项目包和位置ID,可以使用以下rest api:

方法:获取

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/[billingInvoiceId]/getItems?objectMask=mask[location,billingItem[package]]
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/[packageId]/getItemPrices
https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/[billingInvoiceId]/getItems?objectMask=mask[location,billingItem[orderItem[order],package]]
获取项目价格的请求如下所示:

方法:获取

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/[billingInvoiceId]/getItems?objectMask=mask[location,billingItem[package]]
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/[packageId]/getItemPrices
https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/[billingInvoiceId]/getItems?objectMask=mask[location,billingItem[orderItem[order],package]]
参考:

您可以尝试的另一种方法是通过服务器的顺序,您必须知道orderId,并将服务SoftLayer_Billing_order与方法或一起使用

要获取orderId,还可以使用以下rest

方法:获取

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/[billingInvoiceId]/getItems?objectMask=mask[location,billingItem[package]]
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/[packageId]/getItemPrices
https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Invoice/[billingInvoiceId]/getItems?objectMask=mask[location,billingItem[orderItem[order],package]]
搜索response de order对象,您将获得orderId