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. |
| Event token | x-Event-Token | Optional | Run **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually. |
Creates one or more variants. Every Variant-role attribute on the type needs a value, and no two variants may pin the same combination.
Event scoping: This endpoint does not include
{eventId} in the URL. The event is determined automatically from your x-Event-Token.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. |