Assign Feature to a Pricing Tier
Assign a feature to a pricing tier. Note that both the feature being assigned and the pricing tier the feature is being assigned to must already exist. Refer to the documentation to create a feature and create a pricing tier for help.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Create Warrant endpoint instead.
Endpoint
POST /v1/pricing-tiers/:pricingTierId/features/:featureId
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
pricingTierId | The pricingTierId of the pricing tier you want to assign the feature to. | URL param | yes |
featureId | The featureId of the feature you want to assign to the pricing tier. | URL param | yes |
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
- CLI
curl "https://api.warrant.dev/v1/pricing-tiers/enterprise-tier/features/dashboard" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY"
assignedFeature, err := feature.AssignFeatureToPricingTier("dashboard", "enterprise-tier")
client.assignFeatureToPricingTier("dashboard", "enterprise-tier");
// Class method
await warrantClient.Feature.assignFeatureToPricingTier(
"enterprise-tier",
"dashboard"
);
// Instance method
const pricingTier = await warrantClient.PricingTier.get("enterprise-tier");
await pricingTier.assignFeature("dashboard");
# Class method
warrant.Feature.assign_to_pricing_tier("enterprise-tier", "dashboard")
# Instance method
pricing_tier = warrant.PricingTier.get("enterprise-tier")
pricing_tier.assign_feature("dashboard")
# Class method
Warrant::Feature.assign_to_pricing_tier("enterprise-tier", "dashboard")
# Instance method
pricing_tier = Warrant::PricingTier.get("enterprise-tier")
pricing_tier.assign_feature("dashboard")
Response
{
"featureId": "new-feature"
}