Authentication

All API endpoints require authentication via API keys (Bearer token) that are restricted to specific IP addresses.

Using API Keys

You must include your API key in the Authorization header as a Bearer token:

Authorization: Bearer <your_api_key>

Note: Contact your API administrator to obtain an API key and configure IP restrictions.


API Usage

Get Customer by ID

GET /api/customer/{id}
  • {id} must start with b (BOS) or p (POS), e.g. b1234 or p5678.
  • Returns customer info, order history, and related data.
  • Returns HTTP 400 for invalid IDs.

Example Response:

{
  "id": 1234,
  "name": "Voorbeeld Bedrijf B.V.",
  "website": "https://www.voorbeeld-bedrijf.example.com",
  "expectations": "Hoge kwaliteit producten met uitstekende klantenservice",
  "moments": "Kerst, Nieuwjaar, Bedrijfsjubileum",
  "history": "Langdurige klant sinds 2010, gestaag groeiende bestelvolumes",
  "orders": [
    {
      "orderid": 2024001,
      "created_at": "2024-01-15 09:30:00.000",
      "delivered_at": "2024-02-10 14:20:00.000",
      "finished_at": "2024-01-25 16:45:00.000",
      "status": "Afgerond",
      "cancel_reason": null,
      "cancel_date": null,
      "orderlines": [
        {
          "orderregelid": 1001,
          "orderid": "2024001",
          "artikelnummer": "PRD-001",
          "titel": "Premium Promotiepen",
          "omschrijving": "Hoogwaardige promotiepen met bedrijfslogo bedrukking. Beschikbaar in blauw, zwart en rood. Gemaakt van duurzaam plastic met chroom accenten.",
          "aantal": "500",
          "prijs": "1250.000",
          "opmerking_leverancier": "Standaard levertijd: 2-3 weken",
          "omschrijving_order": "Hoogwaardige promotiepen met bedrijfslogo bedrukking. Beschikbaar in blauw, zwart en rood. Gemaakt van duurzaam plastic met chroom accenten. Bewerkingen: Bedrijfslogo gedrukt in 2 kleuren op de pen.",
          "afbeelding": "https://example.com/afbeeldingen/pen-voorbeeld.jpg",
          "product_afbeelding": "https://example.com/afbeeldingen/pen-product.jpg"
        },
        {
          "orderregelid": 1002,
          "orderid": "2024001",
          "artikelnummer": "PRD-002",
          "titel": "USB Geheugenstick 8GB",
          "omschrijving": "8GB USB geheugenstick met custom branding. Beschikbaar in verschillende kleuren. Inclusief koordje bevestiging.",
          "aantal": "200",
          "prijs": "1800.000",
          "opmerking_leverancier": "Bulk korting toegepast",
          "omschrijving_order": "8GB USB geheugenstick met custom branding. Beschikbaar in verschillende kleuren. Inclusief koordje bevestiging. Bewerkingen: Bedrijfslogo gelaserst op USB body.",
          "afbeelding": "https://example.com/afbeeldingen/usb-voorbeeld.jpg",
          "product_afbeelding": "https://example.com/afbeeldingen/usb-product.jpg"
        }
      ]
    },
    {
      "orderid": 2024002,
      "created_at": "2024-03-20 11:15:00.000",
      "delivered_at": null,
      "finished_at": null,
      "status": "In behandeling",
      "cancel_reason": null,
      "cancel_date": null,
      "orderlines": [
        {
          "orderregelid": 1003,
          "orderid": "2024002",
          "artikelnummer": "PRD-003",
          "titel": "Bedrijfspolo",
          "omschrijving": "100% katoen polo met bedrijfsbranding. Beschikbaar in maten S-XXL. Verschillende kleuren beschikbaar.",
          "aantal": "100",
          "prijs": "850.000",
          "opmerking_leverancier": "Productietijd: 4-5 weken",
          "omschrijving_order": "100% katoen polo met bedrijfsbranding. Beschikbaar in maten S-XXL. Verschillende kleuren beschikbaar. Bewerkingen: Bedrijfslogo geborduurd op linkerborst.",
          "afbeelding": "https://example.com/afbeeldingen/polo-voorbeeld.jpg",
          "product_afbeelding": "https://example.com/afbeeldingen/polo-product.jpg"
        }
      ]
    },
    {
      "orderid": 2024003,
      "created_at": "2024-02-10 08:45:00.000",
      "delivered_at": null,
      "finished_at": null,
      "status": "Vervallen",
      "cancel_reason": "Klant heeft bestelling geannuleerd vanwege budgetoverschrijding",
      "cancel_date": "2024-02-12 14:30:00.000",
      "orderlines": [
        {
          "orderregelid": 1004,
          "orderid": "2024003",
          "artikelnummer": "PRD-004",
          "titel": "Bedrijfsmokken Set",
          "omschrijving": "Keramische mokken met bedrijfslogo. Set van 6 stuks. Geschikt voor vaatwasser en magnetron.",
          "aantal": "50",
          "prijs": "950.000",
          "opmerking_leverancier": "Minimale bestelling: 25 sets",
          "omschrijving_order": "Keramische mokken met bedrijfslogo. Set van 6 stuks. Geschikt voor vaatwasser en magnetron. Bewerkingen: Bedrijfslogo gedrukt in 1 kleur op de mokken.",
          "afbeelding": "https://example.com/afbeeldingen/mokken-voorbeeld.jpg",
          "product_afbeelding": "https://example.com/afbeeldingen/mokken-product.jpg"
        }
      ]
    }
  ]
}

Products API Proxy

This endpoint acts as a proxy to the European Sourcing API, allowing access to the European Sourcing API using a single API key.

📖 API Documentation: For detailed endpoint information, see the European Sourcing API Swagger Documentation

Endpoints:
GET /api/products/{endpoint}
POST /api/products/{endpoint}

Where {endpoint} can be any path that exists in the European Sourcing API.

Examples

1. Get product categories in english:
GET /api/products/categories/en
2. Search products (strict match on supplier reference):
POST /api/products/search

{
    "lang": "en",
    "search_handlers": [{
        "include_fields": [],
        "exclude_fields": [],
        "search_handlers": [
            {
                "supplier_base_reference": {
                    "include": [
                        "KC3314-03"
                    ],
                    "type": "strict"
                }
            }
        ]
        }
    ]
}
3. Get product details:
GET /api/products/products/{product_id}/details

Features

  • Timeout: 30-second timeout for external API calls
  • Query Parameters: All query parameters are forwarded to the European Sourcing API
  • Request Body: All request body data is forwarded to the European Sourcing API
  • HTTP Methods: Supports GET and POST only (matching the European Sourcing API)

Error Responses

  • 500: API key not configured or proxy error
  • 403: Unauthorized (same as /customer endpoint)
  • Various status codes from the European Sourcing API are forwarded as-is