younifyd
Menu

Create Validation Rule Assignment

Create Validation Rules Assignments

POST/v1/validation-rules/{validationRuleId}/assignments

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the Create Validation Rule Assignment action (under Validation Rules).
  3. Fill in the fields below, then reference the result from later steps as {{createValidationRuleAssignment.response.data}}.

Request

Path parameters

validationRuleIdstringrequired

Unique validation rule ID.

Query parameters

forceboolean

If this flag is set to `true`, the previous assignment with the same data will be deleted and a new one will be added.

Request body

Enter the body as JSON in the step's Body field.

related_object_typestring

Defines the related object, e.g. `voucher`.

One ofvoucherpromotion_tiercampaignearning_ruledistributionreward_assignmentDefault "voucher"

related_object_idstring

Unique related object ID assigned by Voucherify, e.g. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher.

json
{
  "related_object_type": "voucher",
  "related_object_id": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{createValidationRuleAssignment.response.data.<field>}}.

Need more? See the Voucherify guide for connection setup and behaviour shared by every action.

Create Validation Rule Assignment — Voucherify — Documentation