The Ultimate weclapp API Guide: Integration, Webhooks & AI

Master the weclapp API with this complete guide covering REST API v2, webhooks, and building AI-powered product consultants for intelligent e-commerce automation.

Profile picture of Kevin Lücke, Co-Founder at Qualimero
Kevin Lücke
Co-Founder at Qualimero
February 2, 202618 min read

Why the weclapp API Is More Than Just a Data Interface

In the modern ERP landscape, the weclapp API serves as the central nervous system for automated business processes. While many integration partners and middleware solutions like Synesty or Make (formerly Integromat) do excellent work moving data from point A to point B, a crucial aspect is often overlooked: the intelligent use of real-time data.

Most documentation and tutorials focus on pure syncing—importing orders, reconciling inventory levels. That's important, but it's "dumb" automation. In this comprehensive guide, we go a step further. We view the weclapp REST API not just as a data transfer tool, but as the foundation for AI-powered applications that can transform your customer interactions.

Imagine your chatbot could not only answer FAQs, but actually know: which product the customer purchased last week (via `/party` and `/salesOrder`), whether the accessory they're asking about is compatible and actually in stock (via `/article`), and could directly create a quote (via `/quotation`). This is the power of combining your Shopware ERP integration with intelligent AI systems.

This article takes you from the technical fundamentals of the weclapp interface all the way to the architecture of an AI product consultant. We fill the gaps that the official weclapp API documentation leaves open, particularly regarding modern Python workflows and intelligent data queries. By the end, you'll understand how to build systems that don't just move data, but actually think.

Getting Started with the weclapp REST API

Before we can feed complex AI models, we need to master the fundamentals. The weclapp API is a RESTful API that uses JSON as its primary data format. According to weclapp's official documentation, understanding these basics is essential for any successful integration project.

Authentication and Security

Access to the API is granted via an API token. This is the standard method and is more secure than using username and password combinations. The token-based approach simplifies integration while maintaining robust security standards.

How to obtain your token: First, log into your weclapp instance. Then navigate to My Settings > API. Finally, copy the API token displayed there. Store this token securely—it provides full access to your weclapp data.

The Header Configuration: Every request must include this token in the `AuthenticationToken` header. A common mistake is attempting to use OAuth flows where a simple token header suffices, or passing the token as a query parameter (which is insecure). The proper implementation looks like this:

Base URL and Versioning: v1 vs v2

This is where many developers fall into their first trap. Two versions of the API exist, and choosing the wrong one can lead to significant integration headaches down the road.

Version 1 (Legacy): Outdated, supports both XML and JSON, less strict validation. While it still works, using v1 for new projects is strongly discouraged. Version 2 (Recommended): The current standard. JSON-only, stricter validation, more consistent behavior with Custom Attributes. All new development should target v2 exclusively.

The correct Base URL format: `https://<YOUR-TENANT>.weclapp.com/webapp/api/v2` — The `<YOUR-TENANT>` portion is the subdomain where you log into weclapp (e.g., `example-company.weclapp.com`). This tenant-specific URL structure is fundamental to all API interactions.

The Instance ID Trap

Some integrations (especially multi-tenant applications) stumble over the dynamic nature of the tenant URL. If you're building an app for third parties, you must ensure the tenant subdomain is configurable. There is no central API that lists "all my weclapp instances"—the user must know their instance URL. This architectural decision requires careful planning in your application design.

weclapp API authentication flow diagram showing token-based security

Key Endpoints for Product Logic and Sales

For our goal—an intelligent product consultant—we don't need all hundreds of endpoints. We focus on the strategically important resources that provide context for an AI. This targeted approach, similar to what's described in our Shopware API automation guide, ensures efficient data retrieval without unnecessary complexity.

GET /article: The Product Knowledge Base

The `/article` endpoint is the heart of product data. For AI consultation, not just name and price are relevant, but especially technical data and descriptions that enable intelligent recommendations.

Critical fields for AI context: The `articleNumber` serves as the unique ID for communication. The `description` and `descriptionLong` fields contain the knowledge that an LLM (Large Language Model) needs to answer questions intelligently. The `customAttributes` field is where companies often store technical specifications (e.g., "Compatibility", "Material"). In v2, these are handled more consistently.

GET /party: Understanding Customer Context

As mentioned earlier, in v2 you use the `/party` endpoint instead of the deprecated `/customer` endpoint. To find only customers, you must apply filters. For example: `GET /party?partyType-eq=ORGANIZATION` (or `PERSON` for individual customers).

Why is this important for AI? An intelligent integration examines the `salesOrderHistory` (often retrievable via linked endpoints). When a customer asks: "Do you have accessories for my machine?", the AI must know which machine the customer purchased 6 months ago. This historical context transforms generic responses into personalized recommendations.

GET /quotation and POST /salesOrder

The goal of every consultation is ultimately the sale. These endpoints enable your AI to take action, not just provide information.

GET /quotation allows you to check existing quotes, while POST /salesOrder lets you generate an order draft directly from the consultation. Important: In v2, default values from `erpSettings` (e.g., payment terms) are automatically applied when not provided in the request. This massively simplifies the creation of valid orders.

weclapp Webhooks: Transform Your ERP Into Real-Time

Polling (constantly querying the API: "Is there anything new?") is inefficient and quickly leads to rate limits. weclapp webhooks are the solution for building responsive, event-driven systems that react instantly to changes.

Why Polling Is the Enemy of Performance

If you fetch all articles every 5 minutes to find inventory changes, you're unnecessarily burdening both your server and the weclapp instance. According to Tyk's API management best practices, this approach doesn't scale and leads to degraded performance as your data grows. Webhooks inform your application proactively as soon as an event occurs.

Setting Up Webhooks

The process is described in the weclapp Knowledge Base, but here's the quick summary for developers: Navigate to Settings > Integration > Webhooks. Create a new webhook. Select the Event (e.g., `article.updated`, `salesOrder.created`, `party.created`). Enter your Callback URL (your API that receives the data). According to HCL Software's integration documentation, properly configured webhooks can reduce API calls by up to 90%.

Webhook Setup Process
1
Access Settings

Navigate to Settings > Integration > Webhooks in weclapp

2
Create Webhook

Click 'New Webhook' and configure basic settings

3
Select Events

Choose triggers like article.updated or salesOrder.created

4
Configure Callback

Enter your API endpoint URL that will receive notifications

5
Test & Activate

Verify the webhook fires correctly and enable it

Use Case: The Proactive AI Consultant

Imagine a webhook fires on `incomingGoods.created` (goods receipt). The webhook reports: "Article 123 is available again." Your system checks: "Which customers have this article on their waitlist or in a quote?" The AI generates an email: "Hello Mr. Miller, the part for your machine has just arrived." This proactive approach, central to effective Conversational Commerce, is often difficult to implement with pure "connector" tools, as business logic is required.

Ready to Build Intelligent API Integrations?

Discover how our AI-powered consultation platform can transform your weclapp data into personalized customer experiences that drive conversions.

Start Your Free Trial

Advanced Integration: Building an AI Product Consultant

Here we leave the standard paths of weclapp integration and create real added value. We build (conceptually) a bridge between weclapp and an LLM (like GPT-4). This represents the cutting edge of what's possible with Conversational AI in the e-commerce space.

The Problem with Static Chatbots

Conventional chatbots access static FAQs. They don't know that "Article X" is currently sold out or that customer "Company Y" has special pricing. As we explore in our guide on Digital Product Consultants, this limitation creates frustrating customer experiences where the bot provides outdated or irrelevant information.

The Solution: RAG with weclapp

We use the weclapp API to give the language model the necessary context through a technique called RAG (Retrieval-Augmented Generation). This approach combines the reasoning capabilities of large language models with real-time data from your ERP system.

AI Product Consultation Data Flow
1
User Query

Customer asks: 'Which power supply do I need for the printer I bought last year?'

2
AI Analysis

Extracts intent (accessory search) and entity (printer, last year)

3
API Lookup: Customer History

Search via /party and /salesOrder for user's purchases → Result: 'Printer Model X500'

4
API Lookup: Product Search

Search via /article for 'power supply' with compatibility filter for X500

5
API Lookup: Stock Check

Check availableStock for the found power supply

6
AI Response

'For your Printer Model X500, you need the NT-500 power supply. We have 3 in stock. Shall I reserve one?'

This architecture enables what we call AI-powered consultation—systems that don't just answer questions, but understand context, check real-time data, and take meaningful actions on behalf of customers.

Code Example: Semantic Search with Python

This example shows how to fetch data for context using Python and the `requests` library. We use modern Python (type hinting, f-strings), which is missing from many PHP-heavy examples found in typical documentation. This approach aligns with building AI-powered consultation solutions that scale.

AI product consultant architecture connecting weclapp API with language model

Comparison: Static Bot vs API-Connected AI

Understanding the dramatic difference between traditional and API-connected approaches is crucial for making informed technology decisions. This comparison illustrates why connecting your AI to live ERP data creates superior customer experiences:

FeatureStatic Chatbotweclapp API-Connected AI
Data FreshnessOutdated (trained every X weeks)Real-time (live API queries)
Inventory AwarenessUnknown ('Should be there')Precise ('3 units available')
Personalization'Hello Customer''Hello Mr. Miller (Customer #1023)'
ActionabilityOnly links to web pagesCan create quotes and orders
Data SourceManually maintained FAQsERP data (Single Source of Truth)

This transformation from static to dynamic consultation is exactly what successful AI product consultation implementations deliver—personalized, accurate, and actionable customer interactions at scale.

Critical Fields Cheatsheet for E-Commerce

For developers building integrations, having quick access to the most important field names is invaluable. This cheatsheet covers the essential fields for e-commerce and AI applications:

Field NameTypeDescriptionAI Relevance
articleNumberStringUnique SKU identifierPrimary reference for product matching
nameStringProduct display nameUsed in user-facing responses
descriptionStringShort product descriptionContext for AI understanding
descriptionLongTextDetailed product informationRich context for semantic search
salesPriceDecimalStandard selling priceRequired for quote generation
availableStockIntegerCurrent inventory levelCritical for availability checks
activeBooleanProduct visibility statusFilter inactive items from results
manufacturerIdStringManufacturer referenceCross-reference capabilities
customAttributesArrayCustom field dataTechnical specs for compatibility

Common Pitfalls and Best Practices

When developing with the weclapp API, there are several hurdles that are often only mentioned in passing in standard documentation. Learning from these common mistakes can save significant development time.

Rate Limiting: Understanding Error 429

weclapp protects its cloud infrastructure through rate limits. If you send too many requests in a short time, you'll receive HTTP status code `429 Too Many Requests`. This is a critical consideration for high-traffic applications like AI customer support implementations.

Strategy: Implement "Exponential Backoff". When a 429 occurs, wait 1 second, then 2, then 4, before retrying. Caching: Don't query master data (like article categories or tax rates) with every request. Cache these locally and update them only once daily or via webhook. This approach can reduce your API calls by 80% or more.

API Performance Impact
90%
Reduced API Calls

Webhook-based architecture vs polling

429
Rate Limit Error

Most common integration failure point

80%
Cache Hit Rate

Typical master data caching efficiency

<100ms
Response Time Target

For real-time AI consultation

Data Hygiene Is AI Hygiene

An AI is only as smart as the data it reads. If your article descriptions in weclapp are full of abbreviations and internal codes ("Cbl. 5m blk f. ext. dev."), the AI will struggle to provide meaningful assistance.

Tip: Use the `descriptionLong` fields for well-formulated, semantically valuable text. This not only improves your webshop (SEO) but also the AI processability. Clean, descriptive data enables the kind of intelligent AI product consultation that drives conversions.

Understanding Filter Syntax

The weclapp API uses its own syntax for filters, not the OData standard that many developers expect. Getting this wrong is one of the most common integration mistakes.

Wrong: `?filter=name eq 'Test'` — Correct: `?name-eq=Test` or `?createdDate-gt=1672531200000` (Greater Than Timestamp). Performance: Filter as early as possible. Don't load 1000 articles and filter in code—let the API do the work. Server-side filtering dramatically improves response times and reduces bandwidth.

weclapp API best practices visualization showing caching and rate limiting strategies

Frequently Asked Questions About the weclapp API

Yes, access to the API is included in most weclapp packages (Cloud ERP). There are no separate fees per call, but the platform's fair use policy and rate limits apply. For high-volume applications, you should implement caching and use webhooks to stay within acceptable usage limits.

Version v2 is the current, evolved interface. It enforces JSON as the format (no more XML), has stricter validation on POST/PUT requests (unknown fields throw errors instead of being ignored), and structures entities more logically (e.g., consolidating customers and suppliers under /party). New projects should always build on v2.

weclapp doesn't offer a public sandbox without an account, but you can work in your own test account (or during a 30-day trial period). Tools like Postman or Insomnia work excellently. Import the OpenAPI specification (Swagger) that weclapp provides to have all endpoints immediately accessible for testing.

Focus on articleNumber (SKU), name and description for product identification, salesPrice for quotes, availableStock for availability checks, active to filter inactive items, customAttributes for technical specifications, and manufacturerId for cross-referencing. These fields provide the essential context for AI-powered product consultation.

Implement exponential backoff (wait 1s, then 2s, then 4s on 429 errors), cache master data locally and refresh daily or via webhooks, batch similar requests where possible, and use webhooks instead of polling for real-time updates. Most production applications can reduce API calls by 80-90% with proper caching strategies.

Conclusion: From Data Sync to Intelligent Consultation

The weclapp API is far more than a tool for nightly data reconciliation. It's the key to modern, AI-driven customer experiences. By moving from pure synchronization to intelligent querying (consultation), you elevate your ERP system to the next level.

Start with clean authentication in v2, use webhooks for real-time reactivity, and experiment with Python scripts to teach your ERP system to "speak." The future of enterprise software isn't static—it's integrated and intelligent. Whether you're implementing Guided Selling solutions or building comprehensive product advisors, the weclapp API provides the foundation you need.

The competitive advantage belongs to businesses that transform their ERP data into intelligent customer conversations. By combining the reliability of weclapp's data infrastructure with the reasoning capabilities of modern AI, you create experiences that static chatbots simply cannot match.

Transform Your ERP Into an AI-Powered Sales Engine

Ready to build intelligent product consultants that know your inventory, understand your customers, and close sales? See how our platform makes weclapp API integration effortless.

Get Started Free

Related Articles

Hire your first digital employee now!