---
title: "Create a catalog rule"
method: POST
path: "/marketing/catalog-rules"
tags: ["Admin Marketing: Promotions"]
---

# Create a catalog rule

`POST /marketing/catalog-rules`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/marketing/catalog-rules`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/marketing/catalog-rules/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a catalog rule

## Request body

- object
  - `name` string, required
  - `description` string
  - `starts_from` string
  - `ends_till` string
  - `status` integer
  - `sort_order` integer
  - `condition_type` integer
  - `conditions` object[]
  - `end_other_rules` integer
  - `action_type` string, required
  - `discount_amount` number, required
  - `channels` integer[], required: Assigned channel ids (request stays id-based; the response returns objects).
  - `customer_groups` integer[], required: Assigned customer-group ids (request stays id-based; the response returns objects).

## Response `201`

Catalog rule created.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
