Action | Method | Resource | Description |
---|---|---|---|
Get all |
|
| Get all offers. |
Get |
|
| Get offer with id |
Create |
|
| Create an offer with |
Update |
|
| Update an offer with |
Delete |
|
| Delete an offer with |
The offer model is composed of the following attributes:
Attribute | Type | Required | Description | Whereable |
---|---|---|---|---|
name | string | no, required to create. | The offer's name. | Yes |
type | integer | no, required to create. | The offer's type. | Yes |
minimum | float | no | The offer's minimum purshase. | Yes |
rate_type | integer | no, required to create. | The offer's type discount. | Yes |
rate | float | no, required to create. | The offer's rate. | Yes |
start | date | no | The offer's start. (e.g. | Yes |
end | date | no | The offer's end. (e.g. | Yes |
limit | integer | no | The offer's limit. | Yes |
coupon | string | no | The offer's code/coupon. | Yes |
enabled | boolean | no | The 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 name | Offer value | Description |
---|---|---|
Offer |
| This discount is automatically applied to the orders if it exists in the business and if the order meets the conditions set. |
Coupon |
| This 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 type | Rate valye | Description |
---|---|---|
Percentage |
| This discount depends on the total amount of the order. |
Fixed |
| This discount is fixed and the value is chosen by the business. |