1. Home
  2. Docs
  3. Current
  4. Guides
  5. Deals
  6. Create deal

Create deal

API

  • Can create multiple deals at the same time
  • Example payload, ref: https://atlantis.tiki.vn/apis/463
[
 {
    "sku": "12345678", 
    "special_from_date": "2022-01-13 02:59:59",
    "special_to_date": "2022-01-13 03:59:59",
    "special_price": 100000,
    "qty_max": 50,
    "qty_limit": 30
  }
]

sku : product sku to create deal

special_from_date: deal start time

special_to_date: deal end time

special_price: deal price

qty_max : deal quantity

qty_limit: number of product customer can buy per order

Business Logic

Product Validator

  • Must be seller_simple
  • Product status must be enable

Price validator

  • Special price must be smaller than selling price but not less than 50%

Quantity Validator

  • Deal quantity must greater than limit quantity

Time Validator

  • Deal start time must be greater than current time
  • Deal start time must be less than deal end time
  • Deal duration must be within 180 days
  • Not allow to overlapped with previous created deal
    • For ex: Deal 1 from day 1 – 5
    • => can not create deal 2 from day 1-3 OR 2-4 OR 2-6

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published.