curl --request POST \
--url https://api.metronome.com/v1/contract-pricing/products/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "d84e7f4e-7a70-4fe4-be02-7a5027beffcc"
}
'{
"data": {
"id": "9c9a4a71-171e-41f9-b8da-d982baf1a388",
"type": "COMPOSITE",
"initial": {
"name": "My Composite Product",
"starting_at": "2020-01-01T00:00:00.000Z",
"composite_product_ids": [
"e5e40bc7-ef69-42ec-a77e-cd696f6bfa3d"
],
"created_at": "2019-12-30T04:24:55.123Z",
"created_by": "Bob"
},
"current": {
"name": "My Updated Composite Product Name",
"starting_at": "2020-01-01T00:00:00.000Z",
"composite_product_ids": [
"e5e40bc7-ef69-42ec-a77e-cd696f6bfa3d"
],
"created_at": "2019-12-30T04:24:55.123Z",
"created_by": "Bob"
},
"updates": [
{
"name": "My Updated Composite Product Name",
"starting_at": "2020-02-01T00:00:00.000Z",
"created_at": "2019-12-30T09:24:55.123Z",
"created_by": "Alice"
}
],
"custom_fields": {
"x_account_id": "KyVnHhSBWl7eY2bl"
}
}
}Retrieve a product by its ID, including all metadata and historical changes.
curl --request POST \
--url https://api.metronome.com/v1/contract-pricing/products/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "d84e7f4e-7a70-4fe4-be02-7a5027beffcc"
}
'{
"data": {
"id": "9c9a4a71-171e-41f9-b8da-d982baf1a388",
"type": "COMPOSITE",
"initial": {
"name": "My Composite Product",
"starting_at": "2020-01-01T00:00:00.000Z",
"composite_product_ids": [
"e5e40bc7-ef69-42ec-a77e-cd696f6bfa3d"
],
"created_at": "2019-12-30T04:24:55.123Z",
"created_by": "Bob"
},
"current": {
"name": "My Updated Composite Product Name",
"starting_at": "2020-01-01T00:00:00.000Z",
"composite_product_ids": [
"e5e40bc7-ef69-42ec-a77e-cd696f6bfa3d"
],
"created_at": "2019-12-30T04:24:55.123Z",
"created_by": "Bob"
},
"updates": [
{
"name": "My Updated Composite Product Name",
"starting_at": "2020-02-01T00:00:00.000Z",
"created_at": "2019-12-30T09:24:55.123Z",
"created_by": "Alice"
}
],
"custom_fields": {
"x_account_id": "KyVnHhSBWl7eY2bl"
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the product to get
Success
Show child attributes
USAGE, SUBSCRIPTION, COMPOSITE, FIXED, PRO_SERVICE Show child attributes
Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is "multiply" and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be "divide".
Show child attributes
The factor to multiply or divide the quantity by.
The operation to perform on the quantity
multiply, divide, MULTIPLY, DIVIDE Optional name for this conversion.
Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is "round up" and the decimal places is 0, then the quantity will be rounded up to the nearest integer.
For USAGE products only. If set, pricing for this product will be determined for each pricing_group_key value, as opposed to the product as a whole. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.
For USAGE products only. Groups usage line items on invoices. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.
Show child attributes
Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is "multiply" and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be "divide".
Show child attributes
The factor to multiply or divide the quantity by.
The operation to perform on the quantity
multiply, divide, MULTIPLY, DIVIDE Optional name for this conversion.
Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is "round up" and the decimal places is 0, then the quantity will be rounded up to the nearest integer.
For USAGE products only. If set, pricing for this product will be determined for each pricing_group_key value, as opposed to the product as a whole. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.
For USAGE products only. Groups usage line items on invoices. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.
Show child attributes
Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is "multiply" and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be "divide".
Show child attributes
The factor to multiply or divide the quantity by.
The operation to perform on the quantity
multiply, divide, MULTIPLY, DIVIDE Optional name for this conversion.
Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is "round up" and the decimal places is 0, then the quantity will be rounded up to the nearest integer.
For USAGE products only. If set, pricing for this product will be determined for each pricing_group_key value, as opposed to the product as a whole. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.
For USAGE products only. Groups usage line items on invoices. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.