Get all offers for a company

GET /company/companies/@id/offers

Get all offers for a company

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Example request 1

GET /company/companies/@id/offers HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.8.0
Accept-Language: en-US,en;q=0.5

Response

Array of Offer: [Offer]

Offer

A special discount for one or multiple products of the shop

Field Type Description
id Int An integer value
shops [Int] Offers are valid for certain shop ids
name String A String value
from_date Date Date in YYYY-MM-DD
until_date Date Date in YYYY-MM-DD
valid_for String Offers are valid on either order date or acquire date.
recurring Bool Offers can be recurring within from_date and until_date
recurring_on String Optional. Offers can be recurring on a day of the week.
items [OfferItem] Optional. Offers are applicable to categories, products or product prices

Example response 1

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

[
    {
        "id": 14,
        "shops": [
            18,
            13,
            11
        ],
        "name": "...",
        "from_date": "2019-01-31",
        "until_date": "2019-01-31",
        "valid_for": "order",
        "recurring": false,
        "recurring_on": "monday",
        "items": [
            {
                "applies_to": "category",
                "item_id": 16,
                "type": "percentage",
                "id": 11,
                "percentage": 15,
                "minimum_amount": 14,
                "free_amount": 10
            },
            {
                "applies_to": "category",
                "item_id": 15,
                "type": "percentage",
                "id": 16,
                "percentage": 10,
                "minimum_amount": 11,
                "free_amount": 18
            },
            {
                "applies_to": "category",
                "item_id": 14,
                "type": "percentage",
                "id": 18,
                "percentage": 17,
                "minimum_amount": 12,
                "free_amount": 13
            }
        ]
    },
    {
        "id": 17,
        "shops": [
            12,
            16,
            19
        ],
        "name": "...",
        "from_date": "2019-01-31",
        "until_date": "2019-01-31",
        "valid_for": "order",
        "recurring": true,
        "recurring_on": "monday",
        "items": [
            {
                "applies_to": "category",
                "item_id": 17,
                "type": "percentage",
                "id": 19,
                "percentage": 12,
                "minimum_amount": 18,
                "free_amount": 13
            },
            {
                "applies_to": "category",
                "item_id": 18,
                "type": "percentage",
                "id": 10,
                "percentage": 19,
                "minimum_amount": 17,
                "free_amount": 14
            },
            {
                "applies_to": "category",
                "item_id": 17,
                "type": "percentage",
                "id": 15,
                "percentage": 10,
                "minimum_amount": 16,
                "free_amount": 12
            }
        ]
    },
    {
        "id": 19,
        "shops": [
            19,
            17,
            10
        ],
        "name": "...",
        "from_date": "2019-01-31",
        "until_date": "2019-01-31",
        "valid_for": "order",
        "recurring": false,
        "recurring_on": "monday",
        "items": [
            {
                "applies_to": "category",
                "item_id": 16,
                "type": "percentage",
                "id": 18,
                "percentage": 13,
                "minimum_amount": 13,
                "free_amount": 11
            },
            {
                "applies_to": "category",
                "item_id": 13,
                "type": "percentage",
                "id": 10,
                "percentage": 11,
                "minimum_amount": 17,
                "free_amount": 11
            },
            {
                "applies_to": "category",
                "item_id": 14,
                "type": "percentage",
                "id": 14,
                "percentage": 12,
                "minimum_amount": 15,
                "free_amount": 12
            }
        ]
    }
]
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.8.0 stable