YOM Docs

Discount limit

The Discount limit entity lets you manage the discount limits a seller can apply on top of the discounts coming from the Promotions entity

Endpoint

GET /api/discount-limits

Fields

Field Type Requirement Description Examples
targetCommerceIds 🔠 List of texts → Commerces ⚪ Optional list of Commerce identifiers to which the Discount limit will be applied.
*Must match the commerceId from the upload of Commerces .
• If empty, it will be applied to all commerces ["12345", "67890"]
productId 📝 Text ⚪ Optional Product to which the discount limit is applied.
• Must match the productId from the upload of Products.
• Requires type = product to work "PROD-00"
enabled 🔘 Bool 🟢 Required Is the Discount limit active? true
false
useMixedDiscountTotal 🔘 Bool ⚪ Optional When set to true, all discount limits are checked, for both type product and type order, and they are added together. When this field is false, only the discount for the type is applied. true
false
type 📝 Text 🟢 Required Type of discount to apply.
'product' → Discount applied to a specific product
'order' → Discount applied to the order "product"
blockLimit 🔢 Number 🟢 Required Maximum discount limit for creating the order in the YOM system. If this amount is exceeded, order creation fails with an error message.
**** This limit applies exclusively to this seller discount** 0.2
retainLimit 🔢 Number 🟢 Required Maximum discount limit for retaining the order in the YOM system. If this amount is exceeded, order creation succeeds, but the order is left in a pendiente de aprobación de admin status and is not sent to the customer's ERP.
**** This limit applies exclusively to this seller discount** 0.15

Response

The Discount limit endpoint response provides a JSON with detailed information about the discount limit to be applied, either to orders or to a specific product.

Response Example

{
  "enabled": true,
  "targetCommerceIds": [],
  "useMixedTotal": true,
  "type": "order",
  "blockLimit": 0.2,
  "retainLimit": 0.1
}

{
  "enabled": true,
  "targetCommerceIds": ["12345"],
  "productId": "PROD-1234"
  "useMixedTotal": true,
  "type": "product",
  "blockLimit": 0.2,
  "retainLimit": 0.1
}

With this structure, you can manage and query the Discount limit information in YOM.

Previous steps

<aside> <img src="/icons/arrow-left_gray.svg" alt="/icons/arrow-left_gray.svg" width="40px" />

Tax Documents

</aside>

Next steps

<aside> <img src="/icons/arrow-right_gray.svg" alt="/icons/arrow-right_gray.svg" width="40px" />

</aside>