In short and in plain language
A shop and a stock system share data. Often only one person knows how this works.
If that person is away, each search for an error takes a long time. That costs money.
A file in the OpenAPI format helps. It says which data there is. It also says what happens when there is an error.
The file sits next to the code. Each change is checked against it.
If you change the firm that looks after the code, the file goes with it. We help you with this.
The interface between your shop and your ERP system has been running for years. Which fields it transfers, why the ERP rejects an order and what to do after a failure on a weekend: in case of doubt, a single person knows, namely the developer who built it. As long as that person is around, nobody notices. It gets expensive during the next troubleshooting session, when the interface has to be extended for a new warehouse or when you switch service providers. The OpenAPI Specification defines a standard, programming language-agnostic description for HTTP interfaces that lets humans and computers discover what a service can do without source code, additional documentation or captured network traffic (OpenAPI Specification). This article shows what belongs in such a description, how it becomes a contract for testing and acceptance, how it stays current in the repository and what a handover package should contain when you switch providers. It closes with a roadmap for scheduling the work in 2027.
Key takeaways
- The OpenAPI Specification describes HTTP interfaces so that humans and computers understand them without source code; the current version is 3.2.1, dated September 10, 2026 (OpenAPI Specification).
- A useful description lists, per endpoint, fields, data types, examples, permissions, operating limits and every known error response such as 409 or 429, together with the reaction the client should derive from it.
- Used as a contract, every change passes review, linting and contract tests before the shop or ERP sees it. That also makes acceptance verifiable: all responses from the test runs match the schema.
- The description belongs under version control in the same repository as the code. According to OWASP, outdated documentation makes it harder to find and fix vulnerabilities (OWASP API Security Top 10).
- For the end of an outsourcing relationship, BSI module OPS.2.3 requires fixed rules (BSI IT-Grundschutz). The handover package contains the description, tests, a runbook and usage rights settled in the contract.
- For supplies from January 1, 2027, the transition rule for domestic B2B invoices in other formats ends for businesses with prior-year turnover above EUR 800,000 (German VAT Act). Describe affected interfaces before you change them.
Why tribal knowledge gets expensive
In many shop-ERP projects, the interface is built under time pressure. A developer maps the shop fields to the ERP fields, handles edge cases in code and tests until orders go through. What gets documented is whatever is needed to survive go-live: a wiki page, a few code comments, an email thread with the ERP vendor. What is missing is a description that states exactly which request leads to which result, and that is still accurate after the next release.
Day to day, this shows up as waiting time. In Stack Overflow's worldwide developer survey, 61 percent (Stack Overflow Developer Survey 2024) of the professional developers who answered the productivity section said they spend more than 30 minutes a day searching for answers or solutions; this includes searching on their own, asking colleagues and waiting for their reply. 45 percent (Stack Overflow Developer Survey 2024) of those who rated statements on knowledge sharing in the same section see knowledge silos as a nuisance. An interface that only one person understands is exactly that kind of silo: every question ends up with that person, and every absence drags out troubleshooting.
The labor market adds to the problem. According to the latest study by the German digital association, Germany is short of 79,000 IT specialists (Bitkom), and 78 percent (Bitkom) of the surveyed companies with three or more employees see a shortage. If you lose the only person who knows an interface, you will not easily find a replacement who can reconstruct it from the code. A description does not replace that person. It does shorten onboarding, because the successor no longer has to infer from code and logs what the interface is actually supposed to do.
- Troubleshooting: An order does not arrive in the ERP. Without a description, it is unclear whether the shop sends bad data or the ERP rejects it for good reason.
- Extension: A new field, such as the customer's own item number, needs to be added. Nobody knows for sure which consumers read the current format.
- ERP update: The vendor changes its API. Without a description of your own side, there is no list of what is affected.
- Provider switch: The new partner takes over the interface and first has to reconstruct what the previous one kept in their head.
What the OpenAPI Specification describes
The OpenAPI Specification defines how an HTTP interface is described in a machine-readable document. With it, a consumer should be able to understand the remote service and interact with it using a minimal amount of implementation logic (OpenAPI Specification). The current version is 3.2.1, dated September 10, 2026 (OpenAPI Specification). It belongs to the 3.2 line, whose first release, 3.2.0, dates from September 19, 2025 (OpenAPI Specification). Patch versions such as 3.2.1 fix errors in the document or clarify wording, but do not change the feature set of the line (OpenAPI Specification).
Technically, an OpenAPI description is a JSON object that can be written either as JSON or as YAML (OpenAPI Specification). Data structures are described by the Schema Object, which by default is a superset of JSON Schema Draft 2020-12 (OpenAPI Specification). For interfaces where the ERP or a payment service sends messages on its own, there is the webhooks field: it describes incoming requests that the API consumer may choose to implement (OpenAPI Specification). A description therefore covers both directions of a data flow, not only the endpoints that the shop calls itself. When push pays off and when polling does is compared in the article on webhooks and polling.
The OpenAPI Initiative names one limitation itself: OpenAPI is not capable of describing every possible HTTP API (OpenAPI Initiative). Teams that write code first and describe it later therefore sometimes run into constructs that can only be represented in a twisted way. The Initiative recommends writing the description first and letting the code follow (OpenAPI Initiative). For a new integration, that is the easier path. For existing interfaces it no longer works; there, the approach shown in the section on describing interfaces after the fact helps.
What belongs in an interface description
A description that only lists paths does little for troubleshooting. The OWASP API security project recommends documenting all aspects of an API: authentication, errors, redirects, rate limiting, CORS policy and the endpoints including their parameters, requests and responses (OWASP API Security Top 10). For a shop-ERP interface, this breaks down into six building blocks that together answer what a new developer needs to know on day one.
Endpoints and methods
Every path with its method, purpose and a unique operationId, such as POST /orders for transferring orders. Retired operations carry the deprecated flag.
Fields and data types
Required fields, formats, lengths and allowed values per field, plus the mapping to the ERP field. Recurring structures such as address or line item live once under components.
Error responses
Every known error response with status code, meaning and format. The client has to tell whether to retry, correct the data or ask a human.
Examples
Complete example requests and responses for typical cases: a B2B order with customer item numbers, a partial delivery, a cancellation. Examples explain faster than field lists.
Permissions and scopes
Which mechanism protects the interface and which scopes an operation requires. The security scheme describes the mechanism, not the credentials themselves.
Operating limits
Rate limits, page sizes for lists, timeouts and maintenance windows. These details decide whether a nightly bulk import goes through.
A shortened excerpt of an order interface shows what this looks like. It describes a single operation with its security requirement, idempotency key, example and the responses that make the difference in operation.
openapi: 3.2.1
info:
title: Shop-ERP order interface
version: 2.4.0
paths:
/orders:
post:
operationId: createOrder
summary: Transfer an order from the shop to the ERP
tags: [Orders]
security:
- erpOAuth: [orders.write]
parameters:
- name: Idempotency-Key
in: header
required: true
description: Fixed per order, identical on every retry
schema: { type: string, format: uuid }
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/Order' }
examples:
b2b: { $ref: '#/components/examples/B2bOrder' }
responses:
'200':
description: Order accepted, ERP document number in erpNumber
'409':
description: Order number has already been transferred
content:
application/problem+json:
schema: { $ref: '#/components/schemas/Problem' }
'429':
description: Too many requests, respect Retry-After
headers:
Retry-After:
schema: { type: integer }Three details carry the weight here. The Order schema is defined once under components and included via $ref; objects defined there only take effect when they are referenced from outside (OpenAPI Specification). The B2bOrder example provides a complete order that new developers and test tools can both start from. And the idempotency key in the request header is documented instead of living only in code. Why it prevents duplicate postings on retries is explained in the article on idempotency and retry strategies.
Flag fields with personal data
x-personal-data: true. According to the specification, extensions carry the prefix x- (OpenAPI Specification). The flag helps with the record of processing activities, which under Art. 30(1)(c) has to describe the categories of personal data (GDPR), and with a deletion concept across system boundaries.Error codes: the responses that matter day to day
The specification does not require listing every conceivable status code, because not all of them are known in advance. It does expect the documentation to cover a successful response and any known errors (OpenAPI Specification). For an order interface, these are usually few cases, but consequential ones. What matters is that the description names not only the code, but also the reaction the client should derive from it. Otherwise the middleware retries an order that was booked long ago, or gives up on a case that would have gone through after a minute of waiting.
| Status | Meaning per standard | Typical shop-ERP case | Client reaction |
|---|---|---|---|
| 200 OK | request succeeded (RFC 9110) | order accepted, document number returned | store the document number in the shop |
| 409 Conflict | conflict with the current state of the resource (RFC 9110) | order number already transferred | do not retry, reconcile with the existing document |
| 422 Unprocessable Content | content understood but cannot be processed (RFC 9110) | item blocked in the ERP, required field empty | correct the data, route the case to the business team |
| 429 Too Many Requests | too many requests in a given time (RFC 6585) | rate limit of the cloud ERP reached | wait for Retry-After, then retry |
There is a standard for the format of error responses: RFC 9457 defines “problem details” that let HTTP APIs describe errors in machine-readable form without inventing their own error formats (RFC 9457). A response then carries the media type application/problem+json with members such as type, title, status and detail. In the OpenAPI description, this schema is defined once under components and attached to every error response. With 429, the server can state in the Retry-After header how long the client should wait (RFC 6585). How retries, queues and notifications work together is covered in the article on error handling in interfaces; throttling large imports is the topic of the article on cloud ERP API limits.
What no schema can express
A schema says that quantity is an integer of at least 1. It does not say that an order may only be transferred once the customer exists in the ERP, that ERP prices take precedence over shop prices or that a cancellation after shipping is handled as a return. Such rules still belong in the description, because they are exactly what gets lost when people change. The specification allows CommonMark formatting in description fields (OpenAPI Specification) and custom extensions with the x- prefix (OpenAPI Specification). This lets you record a paragraph on the business rules for each operation and the ERP origin for each field.
- Sequence: which master data must exist before a document is transferred, and what happens if the customer record is missing.
- Leading system per data type: who has the final say on prices, stock, customer master data and document numbers.
- Timing and volumes: when syncs run, how many records a run usually covers and what happens when that is exceeded.
- Mapping to the ERP: shop field, ERP field and conversion, as described in the article on data mapping between ERP and store.
- Responsibility: who decides on which error pattern and how to reach the business team.
Whatever does not fit sensibly into the OpenAPI file belongs in a short runbook in the same repository: restart procedures, known failures, contacts at the ERP vendor. Tax-relevant processes are additionally covered by the GoBD process documentation. The technical description does not replace it, but supplies the field lists and data flows that would otherwise have to be compiled by hand.
The description as a contract for tests and acceptance
A description that runs alongside the code goes stale. The OpenAPI Initiative therefore recommends running validation tools that check the code against the description as part of continuous integration; deviations are then detected promptly and the description can be changed with peace of mind (OpenAPI Initiative). Documentation thus turns into a contract between shop, middleware and ERP: what is written there applies, and whatever deviates from it is a defect, on whichever side.
Contract tests check whether an API still fulfills its documented contract. The article on API versioning describes them as protection against unnoticed breaking changes. Where they can run without loading the real ERP on every commit is shown in the article on test environments for ERP interfaces. For project acceptance, the description has another advantage: it makes the acceptance criterion verifiable. Instead of “the interface works”, the record states that all responses from the test runs match the schema and that every documented error response was triggered at least once.
From change request to accepted interface
- 1
Describe the change
The new field or response is added to the OpenAPI file first, with an example and an error case.
- 2
Review
The business team and developers review the proposal in the repository before any code is written.
- 3
Linting
A linter checks syntax and house rules, for example whether every operation lists its error responses.
- 4
Contract test
Tests compare the implementation's responses against the schema, in the pipeline rather than in production.
- 5
Acceptance
The record names the version of the description that was tested and the error cases that were triggered.
- 6
Release
The description gets a new version number; the changelog states the impact on consumers.
Maintenance in the repository
According to the OpenAPI Initiative, OpenAPI descriptions are not just a documentation artifact but first-class source files that can drive boilerplate generation, testing and documentation rendering. They therefore belong under version control, and among the first files to be committed (OpenAPI Initiative). Equally important is a single source of truth: if you generate the description from code annotations and also commit a hand-edited file, you have two versions, and one of them will sooner or later go stale (OpenAPI Initiative).
- The description lives in the same repository as the interface code, not in a wiki.
- Every change in behavior also changes the description in the same pull request.
-
info.versionis incremented with every release; the field describes the version of the document, not that of the specification (OpenAPI Specification). - Retired operations carry
deprecated: trueinstead of silently disappearing; consumers should then stop using them (OpenAPI Specification). - A changelog states for each version what is an additive change and what is a breaking change.
- The rendered documentation is only accessible to authorized users, not publicly on the web.
OWASP names the last point explicitly: API documentation should only be available to those authorized to use the API (OWASP API Security Top 10). The same chapter explains why maintenance is not an end in itself. Outdated documentation makes it more difficult to find and fix vulnerabilities; missing or outdated documentation is a characteristic of API9:2023, improper inventory management of interfaces (OWASP API Security Top 10). If you maintain your description, you know not only what the interface is supposed to do, but also which versions and endpoints are still reachable.
The handover package when switching providers
Switching service providers is the moment that shows whether an interface is documented. In its IT-Grundschutz module on using outsourcing, Germany's Federal Office for Information Security requires under OPS.2.3.A7 that rules be set for planned and unplanned terminations, including how information and data are returned (BSI IT-Grundschutz). For software-related services, the same module recommends escrow agreements under OPS.2.3.A21 that also define how often the source code is deposited and documented (BSI IT-Grundschutz). If you outsource development and operation of an interface, you can adopt these ideas directly: the handover package is not packed on the last day but maintained continuously.
Legally, it pays to look at usage rights. If an employee creates a computer program in the performance of their duties, Section 69b of the German Copyright Act gives the employer the exclusive right to exercise all economic rights, unless otherwise agreed (German Copyright Act). For an external service provider, the provision makes no such assignment. Which rights to code, description, test suite and runbook transfer should therefore be set out in the contract before the first endpoint is built. This is an organizational recommendation and not legal advice.
| Component | Content | Check question at handover |
|---|---|---|
| OpenAPI description | all operations, schemas, error responses, examples, current version | Does linting pass against the running implementation? |
| Test suite | contract tests, sample data, instructions to run them | Do the tests run at the new partner without help from the old one? |
| Runbook | procedures, schedules, restart, known failures | Can the new partner fix a typical error alone? |
| Mapping table | shop field, ERP field, conversion, leading system | Does the table match the examples in the description? |
| Access | list of technical accounts and scopes, without secrets | Are the previous provider's accounts disabled? |
| Open items | known defects, planned changes, deadlines | Does every item have an owner? |
Credentials do not belong in the package
Describing existing interfaces after the fact
Many existing interfaces have no description. Creating one after the fact is not an afternoon project, but it is not a rebuild either. A sensible order follows risk: first the data flows whose failure costs revenue, then the rest. It is important to describe the actual behavior rather than the desired one; otherwise the description turns into a wish list that fails the first test.
- Take inventory: Which endpoints does the shop call, which does the ERP call, which webhooks come in? Sources are code, configuration and the middleware logs.
- Order by risk: orders, stock and prices before newsletter sync and review import.
- Describe what really happens: derive fields and responses from real requests, not from memory. Record deviations between expectation and behavior as open items.
- Check against production: validate the running interface's responses against the new schema for a while, without interfering with the data flow.
- Adopt it as the contract: from a cutoff date on, the description applies; changes only go through it.
How much effort this takes depends on the number of endpoints, the quality of the logs and whether a middleware bundles the data flows. With middleware, calls, transformations and errors sit in one place, which makes taking inventory much easier than with scattered point-to-point integrations. For very old file-based integrations, the description is often the first step of a migration to modern APIs. As part of our API development work, we assess existing interfaces, including their documentation and versioning, and deliver the OpenAPI description as part of the handover for new integrations.
Planning interface documentation for 2027
Fixed deadlines in the coming year argue against postponing the description to “someday”. For supplies from January 1, 2027, the transition rule that still allows invoices to other businesses in Germany on paper or in other electronic formats instead of e-invoices ends for businesses whose total turnover in the previous year exceeded EUR 800,000; smaller businesses can use it until the end of 2027, and EDI procedures have a separate rule (German VAT Act). Anyone reconnecting invoice data from shop and ERP for this is changing interfaces. The article on the 2027 e-invoicing mandate describes the data paths; a description that exists beforehand makes this change verifiable.
The retail calendar also determines the right timing. During the November order peak, work on interfaces is better put on hold; the article on the Black Week order peak recommends a change freeze. The weeks after that are well suited to inventory and description, so that the documentation is in place before the changes of the new year begin. In the budget, it belongs on its own line next to development and testing; how the other items of an integration add up is covered in the article on the cost of an ERP integration.
- By mid-November: list interfaces and order them by risk, without changing anything in the running system.
- December: describe the two most important data flows and check them against production.
- January to March 2027: add linting and contract tests to the pipeline, assemble the handover package.
- From the second quarter of 2027: implement every change, for example for e-invoicing or an ERP update, only through the description.
The description is the part of the interface that stays
Related Articles
DATEV Rechnungsdatenservice 2.0 ends: switch the data route
DATEV discontinues its Rechnungsdatenservice 2.0 on 31 Dec 2026. How shops and ERP connectors check whether they are affected and move their document route.
Black Week order peak: preparing your ERP interface
Black Week 2026: prepare the order flow between shop and ERP – measure the backlog, move night jobs, add a queue with alerts, freeze changes, define a fallback.
Team AI assistants: ERP access via MCP with permissions
How internal AI assistants reach the ERP through the Model Context Protocol: business-level tools, per-user permissions, approval before writes, audit log.