Create an offer item for an offer

POST /company/offers/@id/offer-items

Create an offer item for an offer

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Body

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.

Example request 1

POST /company/offers/@id/offer-items HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.8.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 148
{
    "applies_to": "category",
    "item_id": 11,
    "type": "percentage",
    "percentage": 16,
    "minimum_amount": 14,
    "free_amount": 13
}

Response

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.

Example response 1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 162

{
    "applies_to": "category",
    "item_id": 14,
    "type": "percentage",
    "id": 17,
    "percentage": 13,
    "minimum_amount": 16,
    "free_amount": 16
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.8.0 stable