POST /company/offers/@id/offer-items
Create an offer item for an offer
This endpoint requires authentication.
Header | Value |
---|---|
Authorization | Set the value to Bearer + + access_token |
Pass the following properties via application/json or form encoding in the body of the request.
Specifies where an offer should get applied. An offer can be applied to a category, a product or a product price.
Field | Type | Description |
---|---|---|
applies_to | String | String enumarion of 'category', 'product', 'product-price' |
item_id | Int | ID of the category, product or product price where the offer applies to. |
type | String | String enumarion of 'percentage', 'volume' |
percentage | Int? | Optional. Nullable. Only required when "type" is percentage. e.g. 10,53% = 1053 |
minimum_amount | Int? | Optional. Nullable. Minimum amount required for the offer to apply. |
free_amount | Int? | Optional. Nullable. Only required when "type" is volume. |
POST /company/offers/@id/offer-items HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.10.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 148
{
"applies_to": "category",
"item_id": 14,
"type": "percentage",
"percentage": 18,
"minimum_amount": 11,
"free_amount": 14
}
Specifies where an offer should get applied. An offer can be applied to a category, a product or a product price.
Field | Type | Description |
---|---|---|
applies_to | String | String enumarion of 'category', 'product', 'product-price' |
item_id | Int | ID of the category, product or product price where the offer applies to. |
type | String | String enumarion of 'percentage', 'volume' |
id | Int | An integer value |
percentage | Int? | Optional. Nullable. Only required when "type" is percentage. e.g. 10,53% = 1053 |
minimum_amount | Int? | Optional. Nullable. Minimum amount required for the offer to apply. |
free_amount | Int? | Optional. Nullable. Only required when "type" is volume. |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 162
{
"applies_to": "category",
"item_id": 15,
"type": "percentage",
"id": 10,
"percentage": 15,
"minimum_amount": 14,
"free_amount": 14
}