Edit

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

Edits a retail card migration task. Replace task scheduling and source/target promotions by id; returns row_affected. Requires migration edit permission and distinct promotions of the same type. Omitted values reset scheduling: Default period type becomes Day, non-positive period becomes 1, zero order becomes 1, non-positive start_date becomes today and non-positive end_date clears the end date. 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.
id Int64 Required ID.
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

{
  "id": 123,
  "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 Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "ids": [
      null
    ],
    "row_affected": 1
  }
}