Get all available periods in a category

GET /company/categories/@category_id/availableperiods

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Example request 1

GET /company/categories/@category_id/availableperiods HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.9.0
Accept-Language: en-US,en;q=0.5

Response

Array of company.CategoryAvailablePeriod: [company.CategoryAvailablePeriod]

company.CategoryAvailablePeriod

The available periods for a category

Field Type Description
start_date Date Start date of the period
end_date Date End date of the period
available Bool Are products available during this period or not?
all_products Bool Does this concern all products in this category?
id Int ID of the period
category_id Int Id of the linked category
products [Int] Optional. List of products for which this is active
has_priority Bool Optional. Does this have priority over the product available periods

Example response 1

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

[
    {
        "start_date": "2019-01-31",
        "end_date": "2019-01-31",
        "available": true,
        "all_products": true,
        "id": 15,
        "category_id": 18,
        "products": [
            11,
            16,
            17
        ],
        "has_priority": false
    },
    {
        "start_date": "2019-01-31",
        "end_date": "2019-01-31",
        "available": false,
        "all_products": false,
        "id": 14,
        "category_id": 12,
        "products": [
            17,
            14,
            18
        ],
        "has_priority": false
    },
    {
        "start_date": "2019-01-31",
        "end_date": "2019-01-31",
        "available": true,
        "all_products": false,
        "id": 16,
        "category_id": 13,
        "products": [
            16,
            18,
            15
        ],
        "has_priority": true
    }
]
1.9.0 stable