VDA EDI Tools

CONTRL vs APERAK: Reading EDIFACT Acknowledgements and Fixing Rejections

VDA EDI Tools Blog · 2026-11-21

You send a VDA 4987 DESADV at 09:30. Ten minutes later an unfamiliar message type lands in your mailbox: is your file accepted, or is something wrong? The answer arrives as one of two EDIFACT acknowledgement messages, and confusing them sends you debugging the wrong layer.

CONTRL answers a mechanical question: did your file arrive intact and parseable? APERAK answers a business question: did the receiving application accept the content? This guide shows how to read both, and how to run a rejection from first alert to closed loop.

Two acknowledgements, two layers

CONTRLAPERAK
LayerSyntax and service levelBusiness or application level
ConfirmsEnvelope intact, message structure readable, segment counts consistentContent acceptable under the partner's rules
ReferencesInterchange control reference from UNB, message reference from UNH, per-message resultsThe original message reference plus functional error information
Typical contentAcceptance, or syntax errors with the position where parsing failedAcceptance, or rejection with an error code and a coded or free-text reason
ArrivesShortly after transmission, often gateway-generatedLater, after mapping into the partner's application

Think of CONTRL as the postal service confirming the parcel was not crushed; APERAK is the recipient opening it and deciding whether the order inside is acceptable. A parcel can arrive in perfect shape and still hold the wrong part number.

CONTRL: the syntax report card

CONTRL works at the envelope, the layer our UNA, UNB and UNH field guide covers in detail. It echoes your interchange control reference (the value UNB element 0020 carries and UNZ repeats at end of file) and reports per message whether the pairing rules held: the UNH message reference repeated in UNT, and the UNT-1 segment count matching the real segment count. When the report is negative, the error points at the envelope itself.

The usual suspects live exactly there: a UNA service string that disagrees with the separators the body uses, or a segment terminator swallowed by an unescaped apostrophe in the data, which our segment terminator article dissects byte by byte. A CONTRL rejection means the file never really got read; no content validation ever ran. Fixing anything below the envelope is wasted effort until the envelope passes.

APERAK: the business verdict

Once the file parses, the partner's application judges the content, and APERAK is how that verdict travels back. It points back to your original message through its message reference, so you know which outbound file it answers, and it carries functional error information: an error code together with a coded or free-text reason, plus a reference to the data element or segment where the problem was found.

What kind of problems? The ones that survive syntax checks. A party code that does not exist in the receiver's master data. A date riding in the wrong format or with the wrong width. A code value outside the agreed list. A quantity the application cannot reconcile against its open orders. The error codes themselves vary by partner and guideline, so use the code as a pointer into the partner's documentation and the free-text reason as your fastest map back to the offending data.

A rejection loop that actually closes

  1. Match the acknowledgement to the original. Match the message reference the APERAK echoes to your outbound file whose UNH carries the same reference number. Store acknowledgements keyed by that reference and the UNB interchange control reference; without the join, you are guessing which file failed.
  2. Open the original at the reported position. The error information points at a segment or element; go there first.
  3. Classify the layer. If the position data makes no sense or the file would not parse at all, suspect the envelope and run the local envelope check. If the file parses cleanly, you are in content territory: codes, dates, references, quantities.
  4. Fix, regenerate, resend with a fresh control reference. Reusing the original interchange control reference can trip the receiver's duplicate detection, which then silently drops your corrected file. A blind resend turns one incident into two.
  5. Wait for the pair. The new transmission gets its own CONTRL first, then its own APERAK. Only when the APERAK reports acceptance is the loop closed; a clean CONTRL alone proves readability, not approval.
  6. Log everything. Original control reference, acknowledgement reference, error code, fix applied. Three months later that log is the difference between a five-minute answer and a week of archaeology.

The rejection causes we see most

Frequently asked questions

Do all trading partners send both CONTRL and APERAK?

Many send CONTRL for every interchange because it is cheap to generate at the gateway. APERAK depends on the partner's application and your onboarding agreement: some send it for every message, some only for rejections, some not at all. Confirm this during onboarding rather than discovering it in an incident.

Is no acknowledgement good news or bad news?

Neither by itself. OFTP2 session receipts prove a file reached a server, not that it was parsed or accepted. If an expected CONTRL or APERAK does not arrive within the agreed window, treat it as a transport problem and ask before resending.

Can a message pass CONTRL and still get rejected?

Yes, and that is APERAK's entire purpose. Syntax-clean only means readable. The business layer can still refuse the content, and it will tell you so in the APERAK.

Should I auto-retry a rejected message?

No. Fix the cause first and resend with a new control reference; an automated retry of an unchanged file is how one bad transmission becomes a standing outage.

Where can I check the envelope before sending?

Run the structural check locally before transmission. The VDA 4987 and VDA 4984 validators parse the UNA, UNB and UNH envelope, verify control references and segment counts, and check date formats and code lists in your browser, nothing uploaded.

Try it: Check the envelope and structure of your outbound files before your partner's gateway does, locally in your browser. Open the tool →

← All articles