Business Offers Model

Get allGET/business/:business_id/offersGet all offers.
GetGET/business/:business_id/offers/:offer_idGet offer with id business_id and offer_id.
Create POST/business/:business_id/offersCreate an offer with business_id.
Update PUT/business/:business_id/offers/:offer_idUpdate an offer with business_id and offer_id.
Delete DELETE/business/:business_id/offers/:offer_idDelete an offer with business_id and offer_id.

The offer model is composed of the following attributes:

namestringno, required to create.The offer's name.Yes
typeintegerno, required to create.The offer's type.Yes
minimumfloatnoThe offer's minimum purshase.Yes
rate_typeintegerno, required to create.The offer's type discount.
1 for percentage.
2 for fixed amount.
ratefloatno, required to create.The offer's rate.Yes
startdatenoThe offer's start. (e.g. MM/DD/YYYY)Yes
enddatenoThe offer's end. (e.g. MM/DD/YYYY)Yes
limitintegernoThe offer's limit.Yes
couponstringnoThe offer's code/coupon.Yes
enabledbooleannoThe offer's status.Yes


Restrictions for use offers API endpoints

  • Offers can only be created, updated or removed by Users level 0 or level 2 (Type: Administrator or Business Owner).

Offer types

The type of offer is used to distinguish if the discount is direct by business order or if it is a coupon ( promotional code). The types are shown bellow:

Offer nameOffer valueDescription
Offer1This discount is automatically applied to the orders if it exists in the business and if the order meets the conditions set.
Coupon2This discount is applied at the request of the user if he has permission. That is to say that it has a code that allows you to access the discount, this discount is applied if the order meets the requirements.

Rate type

Actually, there are two rate types, percentage and fixed.

Rate typeRate valyeDescription
Percentage1This discount depends on the total amount of the order.
Fixed2This discount is fixed and the value is chosen by the business.