Skip to content

Rate Plans

Create rate plans for API products with recurring and consumption pricing.

Authentication

All methods require a valid Platform API key in the x-yappes-key header.

Base URL

Substitute the sample host https://platformapi.enterprise-xyz.com with the Platform API URL configured for your Yappes organization, since the host value changes depending on the organization and deployment setup.


REST Resources

Resource Methods
organizations.apiproducts.rateplans create

Resource: organizations.apiproducts.rateplans

Rate plan management for API products.


Platform API — Product-level Rate Configuration

Creates a rate plan for an API product. The apiproductReferenceId path segment is the API product name for the organization.

HTTP request

POST https://platformapi.enterprise-xyz.com/v1/organizations/{orgReferenceId}/apiproducts/{apiproductReferenceId}/rateplans

Path parameters

Parameter Type Description
orgReferenceId string Required. Organization reference (id, reference name, or organization name).
apiproductReferenceId string Required. API product name. Must exist in the organization and have at least one mapped API.

Query parameters

None.

Request body

{
  "displayName": "Premium Tier Flat Rate Plan",
  "description": "Standard recurring subscription with fixed per-call rates.",
  "state": "PUBLISHED",
  "recurringFee": {
    "currencyCode": "USD",
    "units": "150",
    "nanos": 0
  },
  "consumptionPricingType": "FIXED_PER_UNIT",
  "consumptionPricingRates": [
    {
      "start": "0",
      "fee": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 5000000
      }
    }
  ],
  "billingPeriod": "MONTHLY",
  "paymentFundingModel": "PREPAID"
}
Field Type Required Description
displayName string Yes Plan display name.
description string No Plan description.
state string No PUBLISHED or DRAFT. Default PUBLISHED.
recurringFee object No Recurring fee. currencyCode sets the plan currency (default INR).
consumptionPricingType string No Consumption pricing model label.
consumptionPricingRates array No Pricing bands. The first rate's fee is used as the per-transaction charge.
billingPeriod string No Billing period label.
paymentFundingModel string No Funding model label (PREPAID, POSTPAID).

Response body

If successful (200), the response body is:

{
  "name": "organizations/yappes-organization/apiproducts/premium-banking-api/rateplans/<pricePlanId>",
  "displayName": "Premium Tier Flat Rate Plan",
  "description": "Standard recurring subscription with fixed per-call rates.",
  "state": "PUBLISHED",
  "recurringFee": {
    "currencyCode": "USD",
    "units": "150",
    "nanos": 0
  },
  "consumptionPricingType": "FIXED_PER_UNIT",
  "consumptionPricingRates": [
    {
      "start": "0",
      "fee": {
        "currencyCode": "USD",
        "units": "0",
        "nanos": 5000000
      }
    }
  ],
  "billingPeriod": "MONTHLY",
  "paymentFundingModel": "PREPAID",
  "createdAt": "1717424600000",
  "lastModifiedAt": "1717424600000"
}

Errors

HTTP status Condition
400 Missing required path parameters or invalid input.
404 Organization, API product, or mapped API not found.
502 Service unreachable or returned an error.
503 Service temporarily unavailable.
Other Non-2xx responses may be returned with the original status and body.

Authorization

Requires a valid x-yappes-key header.


Method index

# HTTP Path
1 POST /v1/organizations/{orgReferenceId}/apiproducts/{apiproductReferenceId}/rateplans