Docs
Create Variants
POST /resourceTypes/{resourceTypeId}/variants
POST
/resourceTypes/{resourceTypeId}/variantsRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Organization token | x-Organization-Token | Optional | Run **Authorize Organization** in the Authorization folder. |
Creates one or more variants. Every Variant-role attribute on the type needs a value, and no two variants may pin the same combination.
Requires
ResourceTypeDatabase.Edit permission.Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| resourceTypeId | Guid | Required | The resource type. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| variants | array | Required | `{ name, rateCardId, values: [{ resourceAttributeId, value }] }`. One per combination of the type's `Variant` attributes. |
Response
201 Created. No response body.
Error Codes
| HTTP Status | Description |
|---|---|
| 400 | No variants, a missing or duplicate combination, or a card from another type. |
| 404 | Resource type not found. |