NodeRings Docs

Calculate Plan Pricing

POST
/v1/plans:calculate
Authorization<token>

Bearer token

In: header

X-Organization-ID<token>

Tenant or organization identifier

In: header

planConfig?
instances?
calcConfig?

Response Body

application/json

curl -X POST "https://api.nrings.io/v1/plans:calculate" \  -H "Authorization: Bearer {your_token}" \  -H "X-Organization-ID: {your_org_id}" \  -H "Content-Type: application/json" \  -d '{  "planConfig": {    "planName": "string",    "assetCategory": "string",    "assetType": "string",    "currency": "string",    "prices": [      {        "pricingModel": "PRICING_MODEL_UNSPECIFIED",        "chargeTiming": "CHARGE_TIMING_UNSPECIFIED",        "billingPeriod": "BILLING_PERIOD_UNSPECIFIED",        "billingInterval": 0,        "unitAmount": "string",        "unitName": "string",        "unitQuantity": 0,        "metricName": "string",        "metricAggregation": "METRIC_AGGREGATION_UNSPECIFIED",        "freeUnits": 0,        "minimumCharge": "string",        "maximumCharge": "string",        "packageSize": 0,        "packagePrice": "string",        "overagePrice": "string",        "tiers": [          {            "tierOrder": 0,            "tierName": "string",            "startInclusive": 0,            "endExclusive": 0,            "unitAmount": "string",            "tierType": "TIER_MODE_UNSPECIFIED",            "flatFee": false,            "flatFeeAmount": "string"          }        ],        "prorate": false,        "productType": "PRODUCT_TYPE_UNSPECIFIED",        "addonCode": "string",        "pricingFormula": null      }    ]  },  "instances": [    {      "quantity": 0,      "hoursUsed": 0,      "region": "string",      "usage": null,      "addons": [        {          "code": "string",          "usage": null        }      ]    }  ],  "calcConfig": {    "capHours": 0,    "taxRate": 0,    "discountPercent": 0,    "couponValue": "string",    "overageRates": null  }}'
{
  "lineItems": [
    {
      "instanceLabel": "string",
      "quantity": 0,
      "base": "string",
      "addons": "string",
      "subtotal": "string",
      "currency": "string"
    }
  ],
  "pooledAllowances": {
    "property1": 0.1,
    "property2": 0.1
  },
  "pooledUsage": {
    "property1": 0.1,
    "property2": 0.1
  },
  "subtotal": "string",
  "overageCost": "string",
  "discounted": "string",
  "tax": "string",
  "total": "string",
  "currency": "string",
  "discountPercent": 0.1,
  "couponValue": "string",
  "debug": {}
}