Docs
Re-axis Variants
POST /resourceTypes/{resourceTypeId}/variants/re-axis
POST
/resourceTypes/{resourceTypeId}/variants/re-axisRequired 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. |
Adds a variant axis to a type that already has variants, in one transaction: rewrites every existing variant in place (keeping its id, so inventory, rate cards and event correlations survive), creates the newly valid combinations, and writes the newly pinned values onto bound resources. Every existing variant must be in rewrites.
Requires
ResourceTypeDatabase.Edit permission.Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| resourceTypeId | Guid | Required | The resource type. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| rewrites | array | Required | `{ variantId, name, values: [{ resourceAttributeId, value }] }` for every existing non-base variant. |
| creates | array | Optional | `{ name, rateCardId, values[] }` for new combinations. |
Response
200 OK. No response body.
Error Codes
| HTTP Status | Description |
|---|---|
| 400 | No variant axis, a partial or duplicate plan, or a variant from another type. |
| 404 | Resource type not found. |