Updates a catalog rule
PUThttps://euwest.api.elasticpath.com/pcm/catalogs/rules/:catalog_rule_id
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.
Request
Path Parameters
catalog_rule_id stringrequired
The catalog rule ID.
- application/json
Body
required
An updated catalog rule with the following attributes.
data objectrequired
Responses
- 200
- default
An Updated catalog rule with the following attributes.
- application/json
- Schema
- Example (from schema)
Schema
data objectrequired
links object
{
"data": {
"id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"attributes": {
"name": "rule-123",
"description": "Catalog Rule for most favored customers",
"account_ids": [
"string"
],
"customer_ids": [
"string"
],
"channels": [
"string"
],
"tags": [
"string"
],
"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"
},
"type": "catalog_rule"
},
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://euwest.api.elasticpath.com/pcm/catalogs/rules/:catalog_rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"data": {
"id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"attributes": {
"name": "rule-123",
"description": "Catalog Rule for most favored customers",
"account_ids": [
"string"
],
"customer_ids": [
"string"
],
"channels": [
"string"
],
"schedules": [
{
"valid_from": "2020-09-22T09:00:00",
"valid_to": "2020-09-22T09:00:00"
}
],
"tags": [
"string"
],
"catalog_id": "d09b4e16-08a5-4f42-817c-6e0d98acbb63"
},
"type": "catalog_rule"
}
}'
ResponseClear