API Documentation

Wexl Grupp API Overview

The Wexl Grupp API provides a straightforward RESTful (JSON-only) interface over HTTPS, allowing third-party applications to access the features of the Wexl Grupp e-commerce platform. Designed according to RESTful principles, the API is stateless and leverages standard HTTP methods and response codes wherever possible.

This document is intended for customers who want to integrate Wexl Grupp functionality into their own applications.

Base URL for all requests: https://api.b2b.wexlgrupp.ee/

Revision History

Date Change
2025-12-20 Initial version of API

Authentication

All API requests require an API key included in the request headers. This key identifies your application and allows you to access the API securely.

Header Format

X-API-Key: <your-api-key>

How to Obtain an API Key

You can obtain your API key from your Wexl Grupp B2B My account section. Keep your key secret and do not share it publicly.

Example Request

curl -H "X-API-Key: YOUR_API_KEY" https://api.b2b.wexlgrupp.ee/v1/products

Security Tips

Errors

The API uses standard HTTP status codes to indicate errors. Error responses follow the format {"error": "message"}.

Available Request Parameters

GET Requests

You can filter GET endpoints using query parameters. Example for /products:

?lang=en&categories=32,42&brands=23,24

POST Requests (Request Body)

POST requests accept a JSON body. Example for creating an order:

{
  "products": [
    { "id": "12345678", "quantity": 2 },
    { "id": "87654321", "quantity": 1 }
  ]
}

Brands

GET /v1/brands

Returns all available brands.

Example Request

curl -X GET "https://api.b2b.wexlgrupp.ee/v1/brands" -H "X-API-Key: YOUR_KEY"
Response 200 ▼
{
  "brands": [
    { "id": 1, "name": "Apple" },
    { "id": 2, "name": "Samsung" }
  ]
}
Response 404 ▼
{
  "error": "No brands found"
}

Categories

GET /v1/categories

Returns all available categories with names in all supported languages.

Example Request

curl -X GET "https://api.b2b.wexlgrupp.ee/v1/categories" -H "X-API-Key: YOUR_KEY"
Response 200 ▼
{
  "categories": [
    {
      "id": 1,
      "name": {
        "en": "Phones",
        "et": "Telefonid",
        "ru": "Телефоны"
      }
    },
    {
      "id": 2,
      "name": {
        "en": "Laptops",
        "et": "Sülearvutid",
        "ru": "Ноутбуки"
      }
    }
  ]
}
Response 404 ▼
{
  "error": "No categories found"
}
Response 500 ▼
{
  "error": "No languages found"
}

Products

List Products

GET /v1/products

Returns a list of products. Results can be filtered based on query parameters.

price - purchase price for B2B customer without VAT
retail_price - Recommended Retail Price(RRP) that includes the value-added tax (VAT), representing the final price a consumer pays

Query Parameters (optional)

  • lang - language code (e.g., en, et, ru). Defaults to en.
  • brands - comma-separated manufacturer IDs, e.g., 23,24
  • categories - comma-separated category IDs, e.g., 32,42

Example Request

curl -X GET "https://api.b2b.wexlgrupp.ee/v1/products?brands=1,2&lang=en" -H "X-API-Key: YOUR_KEY"
Response 200 ▼
{
  "products": [
    {
      "id": "12345678",
      "ean": "0123456789123",
      "name": { "en": "iPhone 15" },
      "brand": { "id": 1, "name": "Apple" },
      "category": { "id": 3, "name": "Phones" },
      "short_desc": { "en": "The newest iPhone." },
      "full_desc": { "en": "..." },
      "images": [ "https://b2b.wexlgrupp.ee/img/p/1/2/3/123.jpg" ],
      "price": 999.00,
      "retail_price": 1099.00,
      "stock": 50,
      "features": [
        { "id": 1, "name": "Color", "value": "Black" }
      ]
    }
  ]
}
Response 400 ▼
{
  "error": "Language missing - xyz"
}
Response 404 ▼
{
  "error": "No products found"
}

Get Product by ID

GET /v1/products/<id>

Returns details for a specific product by its ID.

price - purchase price for B2B customer without VAT
retail_price - Recommended Retail Price(RRP) that includes the value-added tax (VAT), representing the final price a consumer pays

Example Request (by numeric ID)

curl -X GET "https://api.b2b.wexlgrupp.ee/v1/products/42" -H "X-API-Key: YOUR_KEY"
Response 200 ▼
{
  "products": {
    "id": "12345678",
    "ean": "0123456789123",
    "name": { "en": "iPhone 15" },
    "brand": { "id": 1, "name": "Apple" },
    "category": { "id": 3, "name": "Phones" },
    "short_desc": { "en": "The newest iPhone." },
    "full_desc": { "en": "..." },
    "images": [ "https://b2b.wexlgrupp.ee/img/p/1/2/3/123.jpg" ],
    "price": 999.00,
    "retail_price": 1099.00,
    "stock": 50,
    "features": [
      { "id": 1, "name": "Color", "value": "Black" }
    ]
  }
}
Response 404 ▼
{
  "error": "Product not found"
}

Orders

POST /v1/orders

Creates a new order for the customer. Products are identified by their ID.

Request Body

{
  "products": [
    { "id": "12345678", "quantity": 2 },
    { "id": "87654321", "quantity": 1 }
  ]
}

Example Request

curl -X POST "https://api.b2b.wexlgrupp.ee/v1/orders" -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" -d '{"products": [{"id": "12345678", "quantity": 2}]}'
Response 200 ▼
{
  "id": "AZERTY",
  "status": "created"
}
Response 400 (Bad Request) ▼
{
  "error": "Missing products"
}
/* OR */
{
  "error": "Missing required field: id"
}
/* OR */
{
  "error": "Could not find pricelist"
}
/* OR */
{
  "error": "Non-existing id"
}
Response 500 (Server Error) ▼
{
  "error": "Customer does not have addresses"
}
/* OR */
{
  "error": "Payment module disabled"
}
/* OR */
{
  "error": "PrestaShop general exception message"
}