🚀 GS API

Global Stocks – JSON API Documentation

🔐 Authentication Required

All endpoints except /api/docs require HTTP Basic Authentication.

Example usage: curl -u "username:password" "https://api.globalstocks.eu/api/product-catalog"

Example JSON responses (auth required): https://www.api.globalstocks.eu/api/docs/examples

MethodPathDescription
GET/api/docsAPI documentation (this page).Try it →
GET/api/pages-contentPagesContent – pagestranslation (id, parent_id, lang, title, content).Try it →
GET/api/category-listCategoryList – stockcategorylist (id, parent_id, title, route, language, level).Try it →
GET/api/site-pagesSitePages – sitepagesconfig (id, route, title, type, lang).Try it →
GET/api/domain-configurationDomainConfiguration – domainconfiguration.Try it →
GET/api/product-catalogProduct list (default limit 30, totalCount in meta) or single item by id. Filters: region, category.Try it →
GET/api/product-catalog-searchSearch title/description. Filters: region, category. All matches by default; optional pagination.Try it →
GET/api/product-countTotal count. Optional by=category or by=region for grouped breakdown.Try it →
GET/api/product-filesDocuments and pictures for one product. Returns files[] and images[]. Query: id (required).Try it →
GET/api/banner-configBannerConfig – bannerconfig.Try it →
GET/api/seasonal-offerStatic franchise seasonal offer (HTML header + content). Visible 2026-06-01 to 2026-06-30 (active flag).Try it →

Product endpoints

Filter values region and category use route slugs from product data (regionRoute, categoryRoute), not display titles. Paginated list/search responses put meta before data.

EndpointPurpose
/api/product-catalogList or fetch one product (includes embedded files / images).
/api/product-catalog-searchText search with optional region/category filters.
/api/product-countAggregate counts (total, by category, or by region).
/api/product-filesDocuments and pictures for one product id (files[] + images[]).

Asset paths (config.ini [paths]): stockDataRoot = portal root containing public/data/…; stockDataDirectRoot = flat layout with {id}/files and {id}/pictures. JSON paths always use public/data/{id}/…. Reload PHP after config changes.

GET /api/product-catalog

Returns products ordered by id DESC. Each list row includes files and images path arrays.

ParameterRequiredDescription
idNoReturn a single product by id. When set, pagination, filters, and meta are omitted.
limitNoPage size. Default 30.
offsetNoPagination offset. Default 0.
regionNoFilter by regionRoute (exact match).
categoryNoFilter by categoryRoute (exact match).

List meta: limit, offset, region, category, count, totalCount. To load only asset paths without product fields, use /api/product-files?id=.

GET /api/product-catalog-search

Substring search in title and description (LIKE %query%). By default returns all matching products. Pass limit and/or offset to paginate.

ParameterRequiredDescription
queryYesSearch term matched against title and description.
regionNoFilter by regionRoute (exact match).
categoryNoFilter by categoryRoute (exact match).
limitNoPage size. Only used when paginating; default is all matches.
offsetNoPagination offset. Only used when paginating.

Meta fields: query, region, category, limit, offset, count (items in current response), totalCount (all matches for the current filters).

GET /api/product-count

Returns aggregate product counts. Use the optional by parameter to choose grouping.

ParameterRequiredDescription
byNocategory – group by category with by_region nested in each category. region – group by region with by_category nested in each region. Omit for total count only.

Default response: data.count only (no category or region breakdown).

by=category: data.count, data.by_category[] with category, categoryRoute, count, by_region[].

by=region: data.count, data.by_region[] with region, regionRoute, count, by_category[].

GET /api/product-files

Returns documents and pictures for one product in a single response. This is the only dedicated assets endpoint (no separate pictures route).

ParameterRequiredDescription
idYesProduct id.

Response: data.id, data.files[] (documents from public/data/{id}/files/), data.images[] (pictures from public/data/{id}/pictures/, or stub images when empty).

Example: curl -u "username:password" "https://api.globalstocks.eu/api/product-files?id=12345"

Seasonal offer

Static franchise promotion content (no database). Use the active flag together with showFrom / showTo to decide whether to display the modal on the portal.

GET /api/seasonal-offer

Returns the current seasonal franchise offer. No query parameters.

FieldDescription
data.seasonal_offer.headerModal title (plain text).
data.seasonal_offer.contentModal body as HTML (<p>, links, <br/>).
data.seasonal_offer.showFromFirst date the offer may be shown (YYYY-MM-DD). Currently 2026-06-01.
data.seasonal_offer.showToLast date the offer may be shown (YYYY-MM-DD). Currently 2026-06-30.
data.seasonal_offer.activetrue when today's date is between showFrom and showTo (inclusive); otherwise false.

Display logic: show the modal when active is true. Content is always returned; clients may ignore it when active is false.

Example: curl -u "username:password" "https://api.globalstocks.eu/api/seasonal-offer"