Add

[POST] .../v1/promoprogramsetting/add

Creates new promotion settings. Use this batch method to create additional settings for one existing loyalty promotion program. The request body is an array of one to 250 records; each row must contain program_id, key and value, all rows must target the same program_id and incoming keys must not repeat. The value field must be a JSON string matching the program type and key and the method validates protected default keys, duplicate item/group/type-3 rules, related references, the promotion setting add permission and then returns new_id from the batch insert operation. Business errors such as a missing or empty array body, batch-size violations, invalid program_id, mixed programs, duplicate keys, unsupported key, invalid JSON or numeric/date/reference values, denied access, disabled retail promotion tariff or persistence failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
key String Required Setting name.
program_id Int64 Required Promotion ID.
value String Required Setting value.

Request Example

[
  {
    "key": "string",
    "program_id": 1,
    "value": "string"
  }
]

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
  }
}