Docs

Re-axis Variants

POST /resourceTypes/{resourceTypeId}/variants/re-axis

POST/resourceTypes/{resourceTypeId}/variants/re-axis

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Organization tokenx-Organization-TokenOptionalRun **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

FieldTypeRequiredDescription
resourceTypeIdGuidRequiredThe resource type.

Request Body

FieldTypeRequiredDescription
rewritesarrayRequired`{ variantId, name, values: [{ resourceAttributeId, value }] }` for every existing non-base variant.
createsarrayOptional`{ name, rateCardId, values[] }` for new combinations.

Response

200 OK. No response body.

Error Codes

HTTP StatusDescription
400No variant axis, a partial or duplicate plan, or a variant from another type.
404Resource type not found.