Rules

Updates a catalog rule

Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the catalog rule is not updated.

put/catalogs/rules/{catalog_rule_id}

Request

Path parameters

catalog_rule_idstring required

The catalog rule ID.

Request body

Example request

{
  "data": {
    "id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
    "attributes": {
      "name": "rule-123",
      "description": "Catalog Rule for most favored customers",
      "schedules": [
        {
          "valid_from": "2020-09-22T09:00:00",
          "valid_to": "2020-09-22T09:00:00"
        }
      ],
      "catalog_id": "d09b4e16-08a5-4f42-817c-6e0d98acbb63",
      "search_profile_slug": "vip-search"
    },
    "type": "catalog_rule"
  }
}

Response

An Updated catalog rule with the following attributes.

Example response

{
  "data": {
    "id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
    "attributes": {
      "name": "rule-123",
      "description": "Catalog Rule for most favored customers",
      "schedules": [
        {
          "valid_from": "2020-09-22T09:00:00",
          "valid_to": "2020-09-22T09:00:00"
        }
      ],
      "catalog_id": "d09b4e16-08a5-4f42-817c-6e0d98acbb63",
      "created_at": "2020-09-22T09:00:00",
      "updated_at": "2020-09-22T09:00:00",
      "search_profile_slug": "vip-search"
    },
    "type": "catalog_rule",
    "meta": {
      "similarity_score": 100,
      "resolved_for_shopper": true
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.