---
title: "Crear Descuento"
method: POST
path: "/discounts"
tags: ["Descuentos"]
---

# Crear Descuento

`POST /discounts`

Ofrece la lista de todos los Descuento disponibles en las escuelas y campus.

## Headers

- `campusID` string, uuid, required
- `periodID` string, uuid, required — ID del periodo que se desea trabajar.

## Request body

- DiscountsCreated
  - `name` string, required
  - `workday` boolean, required
  - `apply_to_inscriptions` boolean, required
  - `apply_to_memberships` boolean, required
  - `not_apply_with_scholarship` boolean, required
  - `program_id` string, required
  - `amount` integer, required
  - `type` 'integer' | 'percentage', required
  - `max_date` integer, required — Cuantos dias se puede aplicar el Descuento
  - `from_day` integer — Hasta el dia 30
  - `from_month` integer — Hasta el mes 4
  - `to_day` integer — Despues del primer dia
  - `to_month` integer — Despues del primer mes
  - `external_id` string
  - `metadata` object — Campo arbitrario de datos de terceros

## Response `201`

Crear Descuento

- Discounts
  - `id` string
  - `name` string
  - `program_id` string
  - `workday` boolean
  - `apply_to_inscriptions` boolean
  - `apply_to_memberships` boolean
  - `status` 'active' | 'deleted'
  - `external_id` string
  - `metadata` object — Campo arbitrario de datos de terceros
  - `items` object[]
    - `amount` integer
    - `type` 'integer' | 'percentage'
    - `max_date` integer — Cuántos días se puede aplicar el Descuento
    - `from_day` integer — Hasta el día 30
    - `from_month` integer — Hasta el mes 4
    - `to_day` integer — Después del primer día
    - `to_month` integer — Después del primer mes
    - `not_apply_with_scholarship` boolean

## Other responses

- `404` — unresolved $ref

---

[API](https://skmtc.net/mattilda-education/apis/mattilda-api.md) · [All operations](https://skmtc.net/mattilda-education/apis/mattilda-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mattilda-education/mattilda-api/revisions/a7093ab951dc/schema)
