younifyd
Menu

Create Rule Promotion Job

Create a Rule Promotion Job

POST/v2/rule-promotions/{uuid}/jobs

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Create Rule Promotion Job action (under Promotions Builder).
  3. Fill in the fields below, then reference the result from later steps as {{createRulePromotionJob.response.data}}.

Request

Path parameters

uuidstringrequired

The unique identifier of the rule promotion.

Request body

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

dataobject
job_typestring

The type of job to run. For example, `code_generate` to generate codes or `code_export` to export codes.

One ofcode_generatecode_export

namestring

Represents the name of the job. The maximum allowed length is 50 characters.

parametersobject5 fields
idstring

A unique ID generated when a job is created.

typestring
rule_promotion_idstring

A unique ID of a promotion.

json
{
  "data": {
    "job_type": "code_generate",
    "name": "string",
    "parameters": {
      "number_of_codes": 0,
      "max_uses_per_code": 0,
      "consume_unit": "per_application",
      "code_prefix": "string",
      "code_length": 8
    },
    "id": "string",
    "type": "string",
    "rule_promotion_id": "string"
  }
}

Response

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

dataany
json
{
  "data": null
}

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

Create Rule Promotion Job — Elastic Path — Documentation