Assign Pricing Tier to a Tenant
Assign a pricing tier to a tenant. Note that both the pricing tier being assigned and the tenant the pricing tier is being assigned to must already exist. Refer to the documentation to create a pricing tier and create a tenant 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/tenants/:tenantId/pricing-tiers/:pricingTierId
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
tenantId | The tenantId of the tenant you want to assign the pricing tier to. | URL param | yes |
pricingTierId | The pricingTierId of the pricing tier you want to assign to the tenant. | URL param | yes |
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
- CLI
curl "https://api.warrant.dev/v1/tenants/my-tenant/pricing-tiers/enterprise-tier" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY"
assignedPricingTier, err := pricingtier.AssignPricingTierToTenant("enterprise-tier", "my-tenant")
client.assignPricingTierToTenant("enterprise-tier", "my-tenant");
// Class method
await warrantClient.PricingTier.assignPricingTierToTenant(
"my-tenant",
"enterprise-tier"
);
// Instance method
const tenant = await warrantClient.Tenant.get("my-tenant");
await tenant.assignPricingTier("enterprise-tier");
# Class method
warrant.PricingTier.assign_to_tenant("my-tenant", "enterprise-tier")
# Instance method
tenant = warrant.Tenant.get("my-tenant")
tenant.assign_pricing_tier("enterprise-tier")
# Class method
Warrant::PricingTier.assign_to_tenant("my-tenant", "enterprise-tier")
# Instance method
tenant = Warrant::Tenant.get("my-tenant")
tenant.assign_pricing_tier("enterprise-tier")
Response
{
"objectType": "pricing-tier",
"objectId": "enterprise-tier",
"relation": "member",
"subject": {
"objectType": "tenant",
"objectId": "my-tenant"
}
}