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.
Event tokenx-Event-TokenOptionalRun **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually.

Adds a variant axis to a type that already has variants, in one transaction: rewrites every existing variant in place (keeping its id, so needs and correlations survive), creates the newly valid combinations, and writes the newly pinned values onto bound resources. Every existing variant must be in rewrites.

Event scoping: This endpoint does not include {eventId} in the URL. The event is determined automatically from your x-Event-Token.

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.