Add

[POST] .../v1/retailcardmigration/tasks/add

Creates a retail card migration task. Create a migration task between distinct promotions of the same type and return new_id. Requires migration add permission; add rules separately through Settings/Add. Defaults: start_date=today, no end_date, run_period_type=Day, run_period=1 and order=1. Business errors return HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
end_date Int64 Optional Task end date. If the value is 0, the task has no end date.
order Int32 Optional Execution order.
promo_from_id Int64 Required Source loyalty program ID.
promo_to_id Int64 Required Target loyalty program ID.
run_period Int64 Optional Task execution period value.
run_period_type String Optional Task execution period type. Allowed values: Default, Day, Week, Month, Quarter, Year.
start_date Int64 Optional Task start date as Unix time.

Request Example

{
  "promo_from_id": 1,
  "promo_to_id": 2,
  "start_date": 0,
  "end_date": 0,
  "run_period_type": "Day",
  "run_period": 1,
  "order": 1
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Insert Created record result.

Response Example

{
  "ok": true,
  "result": {
    "new_id": 1
  }
}