UN/EDIFACT D96A APERAK Message
Review the APERAK segment sequence, mandatory fields, repeat counts and valid codes for the D96A EDIFACT directory.
What the APERAK message is for
Application Error and Acknowledgement Message. Tells a trading partner what happened to a message their system already sent: accepted, accepted with warnings, or rejected with a reason.
APERAK closes the loop above the transport layer. A CONTRL message confirms a file was syntactically well formed and arrived; APERAK reports what the receiving application then made of its contents. That distinction matters in practice: an order can pass syntax validation, be acknowledged by CONTRL, and still be rejected because the buyer code is unknown or a line references a product that has been discontinued. Without APERAK the sender has no structured way to learn that, and the failure usually surfaces days later as a missing delivery.
Who exchanges it
Sent by the party that received and processed a business message, received by the original sender of that message. Sent in response to almost any inbound message, most commonly ORDERS, DESADV or INVOIC.
Segments that carry the parts people get wrong
ERCCarries the application error code. This is the segment that says why something was rejected.FTXFree text explaining the error in words a human can act on.RFFReferences the original message number, and often the original document date.
In practice: Treat an APERAK with an ERC as an exception that needs a person, not a log line. The most common integration mistake is accepting APERAK messages and discarding them, which leaves rejected orders invisible until the delivery date passes.
- In D96A, APERAK defines 15 segments
- 7 mandatory
Trading partners whose EDI programmes use APERAK
APERAK is part of the document set on 1 trading partner connection documented on this site. Each page covers that partner's onboarding route, requirements and the rest of the messages they exchange.
UNH Unknown Segment (Max 1) Required
BGM To indicate the type and function of a message and to transmit the identifying number. (Max 1) Required
-
C002 – Identification of a type of document/message by code or name. Code preferred.
-
1001 – Document/message identifier expressed in code.
Type: an, Max Length: 3Valid Codes:1– Certificate of analysis2– Certificate of conformity3– Certificate of quality4– Test report5– Product performance report6– Product specification report7– Process data report8– First sample test report9– Price/sales catalogue10– Party information11– Federal label approval12– Mill certificate13– Post receipt14– Weight certificate15– Weight list16– Certificate17– Combined certificate of value and origin18– Movement certificate A.TR.119– Certificate of quantity20– Quality data message
Showing 20 of 335 values defined for element 1001 in D96A.
-
1131 – Identification of a code list.
Type: an, Max Length: 3Valid Codes:12– Telephone directory16– Postcode directory23– Clearing house automated payment25– Bank identification35– Rail additional charges36– Railways networks37– Railway locations38– Rail customers39– Rail unified nomenclature of goods42– Business function43– Clearing House Interbank Payment System Participants ID44– Clearing House Interbank Payment System Universal ID52– Value added tax identification53– Passport number54– Statistical object55– Quality conformance56– Safety regulation57– Product code58– Business account number59– Railway services harmonized code
Showing 20 of 120 values defined for element 1131 in D96A.
-
3055 – Code identifying the agency responsible for a code list.
Type: an, Max Length: 3Valid Codes:1– CCC (Customs Co-operation Council)2– CEC (Commission of the European Communities)3– IATA (International Air Transport Association)4– ICC (International Chamber of Commerce)5– ISO (International Organization for Standardization)6– UN/ECE (United Nations - Economic Commission for Europe)7– CEFIC (Conseil Europeen des Federations de l'Industrie Chimique)8– EDIFICE9– EAN (International Article Numbering association)10– ODETTE11– Lloyd's register of shipping12– UIC (International union of railways)13– ICAO (International Civil Aviation Organisation)14– ICS (International Chamber of Shipping)15– RINET (Reinsurance and Insurance Network)16– DUNS (Dun & Bradstreet)17– S.W.I.F.T.18– Conventions on SAD and transit (EC and EFTA)19– FRRC (Federal Reserve Routing Code)20– BIC (Bureau International des Containeurs)
Showing 20 of 168 values defined for element 3055 in D96A.
-
1000 – Plain language identifier specifying the function of a document/message.
Type: an, Max Length: 35
-
1001 – Document/message identifier expressed in code.
-
1004 – Reference number assigned to the document/message by the issuer.
Type: an, Max Length: 35 -
1225 – Code indicating the function of the message.
Type: an, Max Length: 3Valid Codes:1– Cancellation2– Addition3– Deletion4– Change5– Replace6– Confirmation7– Duplicate8– Status9– Original10– Not found11– Response12– Not processed13– Request14– Advance notification15– Reminder16– Proposal17– Cancel, to be reissued18– Reissue19– Seller initiated change20– Replace heading section only
Showing 20 of 54 values defined for element 1225 in D96A.
-
4343 – Code specifying the type of acknowledgement required or transmitted.
Type: an, Max Length: 3Valid Codes:AA– Debit adviceAB– Message acknowledgementAC– Acknowledge - with detail and changeAD– Acknowledge - with detail, no changeAF– Debit advice/message acknowledgementAG– AuthenticationAI– Acknowledge only changesAP– AcceptedCA– Conditionally acceptedCO– Confirmation of measurementsNA– No acknowledgement neededRE– Rejected
DTM To specify date, and/or time, or period. (Max 9)
-
C507 – Date and/or time, or period relevant to the specified date/time/period type.
-
2005 – Code giving specific meaning to a date, time or period.
Type: an, Max Length: 3 (Required)Valid Codes:2– Delivery date/time, requested3– Invoice date/time4– Order date/time7– Effective date/time8– Order received date/time9– Processing date/time10– Shipment date/time, requested11– Despatch date and or time12– Terms discount due date/time13– Terms net due date14– Payment date/time, deferred15– Promotion start date/time16– Promotion end date/time17– Delivery date/time, estimated18– Installation date/time/period20– Cheque date/time21– Charge back date/time22– Freight bill date/time35– Delivery date/time, actual36– Expiry date
Showing 20 of 321 values defined for element 2005 in D96A.
-
2380 – The value of a date, a date and time, a time or of a period in a specified representation.
Type: an, Max Length: 35 -
2379 – Specification of the representation of a date, a date and time or of a period.
Type: an, Max Length: 3Valid Codes:2– DDMMYY3– MMDDYY101– YYMMDD102– CCYYMMDD103– YYWWD105– YYDDD106– MMDD107– DDD108– WW109– MM110– DD201– YYMMDDHHMM202– YYMMDDHHMMSS203– CCYYMMDDHHMM204– CCYYMMDDHHMMSS301– YYMMDDHHMMZZZ302– YYMMDDHHMMSSZZZ303– CCYYMMDDHHMMZZZ304– CCYYMMDDHHMMSSZZZ305– MMDDHHMM
Showing 20 of 70 values defined for element 2379 in D96A.
-
2005 – Code giving specific meaning to a date, time or period.
FTX To provide free form or coded text information. (Max 9)
-
C107 – Coded reference to a standard text and its source.
-
4441 – Free text in coded form.
Type: an, Max Length: 3 (Required) -
1131 – Identification of a code list.
Type: an, Max Length: 3Valid Codes:12– Telephone directory16– Postcode directory23– Clearing house automated payment25– Bank identification35– Rail additional charges36– Railways networks37– Railway locations38– Rail customers39– Rail unified nomenclature of goods42– Business function43– Clearing House Interbank Payment System Participants ID44– Clearing House Interbank Payment System Universal ID52– Value added tax identification53– Passport number54– Statistical object55– Quality conformance56– Safety regulation57– Product code58– Business account number59– Railway services harmonized code
Showing 20 of 120 values defined for element 1131 in D96A.
-
3055 – Code identifying the agency responsible for a code list.
Type: an, Max Length: 3Valid Codes:1– CCC (Customs Co-operation Council)2– CEC (Commission of the European Communities)3– IATA (International Air Transport Association)4– ICC (International Chamber of Commerce)5– ISO (International Organization for Standardization)6– UN/ECE (United Nations - Economic Commission for Europe)7– CEFIC (Conseil Europeen des Federations de l'Industrie Chimique)8– EDIFICE9– EAN (International Article Numbering association)10– ODETTE11– Lloyd's register of shipping12– UIC (International union of railways)13– ICAO (International Civil Aviation Organisation)14– ICS (International Chamber of Shipping)15– RINET (Reinsurance and Insurance Network)16– DUNS (Dun & Bradstreet)17– S.W.I.F.T.18– Conventions on SAD and transit (EC and EFTA)19– FRRC (Federal Reserve Routing Code)20– BIC (Bureau International des Containeurs)
Showing 20 of 168 values defined for element 3055 in D96A.
-
4441 – Free text in coded form.
-
C108 – Free text; one to five lines.
-
4440 – Free text field available to the message sender for information.
Type: an, Max Length: 70 (Required) -
4440 – Free text field available to the message sender for information.
Type: an, Max Length: 70 -
4440 – Free text field available to the message sender for information.
Type: an, Max Length: 70 -
4440 – Free text field available to the message sender for information.
Type: an, Max Length: 70 -
4440 – Free text field available to the message sender for information.
Type: an, Max Length: 70
-
4440 – Free text field available to the message sender for information.
-
4451 – Code specifying subject of a free text.
Type: an, Max Length: 3 (Required)Valid Codes:AAA– Goods descriptionAAB– Terms of paymentsAAC– Dangerous goods additional informationAAD– Dangerous goods, technical nameAAE– Acknowledgement descriptionAAF– Rate additional informationAAG– Party instructionsAAH– Customs informationAAI– General informationAAJ– Additional conditions of sale/purchaseAAK– Price conditionsAAL– Goods dimensions in charactersAAM– Equipment re-usage restrictionsAAN– Handling restrictionAAO– Error description (free text)AAP– Response (free text)AAQ– Package content's descriptionAAR– Terms of deliveryAAS– Bill of lading remarksAAT– Mode of settlement information
Showing 20 of 173 values defined for element 4451 in D96A.
-
4453 – Code specifying how to handle the text.
Type: an, Max Length: 3Valid Codes:1– Text for subsequent use2– Text replacing missing code3– Text for immediate use4– No action required
-
3453 – Code of language (ISO 639-1988).
Type: an, Max Length: 3
CNT To provide control total. (Max 9)
-
C270 – Control total for checking integrity of a message or part of a message.
-
6069 – Determines the source data elements in the message which forms the basis for 6066 Control value.
Type: an, Max Length: 3 (Required)Valid Codes:1– Algebraic total of the quantity values in line items in a message2– Number of line items in message3– Number of line and sub items in message4– Number of invoice lines5– Number of Customs item detail lines6– Number of Customs entries7– Total gross weight8– Total pieces9– Total number of ULD (Unit Load Device)10– Total number of consignments11– Total number of packages12– Invoice total amount13– Number of loading lists14– Number of Customs commercial detail lines15– Total consignment, cube16– Total number of equipment17– Declared total Customs value18– Total reported quantity in net weight19– Total reported quantity in supplementary units20– Total reported invoice(s) value
Showing 20 of 31 values defined for element 6069 in D96A.
-
6066 – Value obtained from summing the values specified by the Control Qualifier throughout the message (Hash total).
Type: n, Max Length: 18 (Required) -
6411 – Indication of the unit of measurement in which weight (mass), capacity, length, area, volume or other quantity is expressed.
Type: an, Max Length: 3
-
6069 – Determines the source data elements in the message which forms the basis for 6066 Control value.
Group SG1 (Max 9)
RFF To specify a reference. (Max 1) Required
-
C506 – Identification of a reference.
-
1153 – Code giving specific meaning to a reference segment or a reference number.
Type: an, Max Length: 3 (Required)Valid Codes:AAA– Acknowledgement of order numberAAB– Proforma invoice numberAAC– Documentary credit numberAAD– Contract addendum numberAAE– Goods declaration numberAAG– Offer numberAAJ– Delivery order numberAAK– Despatch advice numberAAL– Drawing numberAAM– Waybill numberAAN– Delivery schedule numberAAO– Consignee's shipment reference numberAAP– Part consignment numberAAQ– Unit load device (e.g. container) identification numberAAS– Transport document numberAAT– Master label numberAAU– Despatch note numberAAV– Enquiry numberAAY– Carrier's agent reference numberAAZ– Standard Carrier Alpha Code (SCAC) number
Showing 20 of 436 values defined for element 1153 in D96A.
-
1154 – Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.
Type: an, Max Length: 35 -
1156 – Number of the line in the document/message referenced in 1154 Reference number.
Type: an, Max Length: 6 -
4000 – To uniquely identify a reference by its revision number.
Type: an, Max Length: 35
-
1153 – Code giving specific meaning to a reference segment or a reference number.
DTM To specify date, and/or time, or period. (Max 9)
Elements and codes as defined at DTM above.
Group SG2 (Max 9)
NAD To specify the name/address and their related function, either by CO82 only and/or unstructured by CO58 or structured by CO80 thru 3207. (Max 1) Required
-
C082 – Identification of a transaction party by code.
-
3039 – Code identifying a party involved in a transaction.
Type: an, Max Length: 35 (Required) -
1131 – Identification of a code list.
Type: an, Max Length: 3Valid Codes:12– Telephone directory16– Postcode directory23– Clearing house automated payment25– Bank identification35– Rail additional charges36– Railways networks37– Railway locations38– Rail customers39– Rail unified nomenclature of goods42– Business function43– Clearing House Interbank Payment System Participants ID44– Clearing House Interbank Payment System Universal ID52– Value added tax identification53– Passport number54– Statistical object55– Quality conformance56– Safety regulation57– Product code58– Business account number59– Railway services harmonized code
Showing 20 of 120 values defined for element 1131 in D96A.
-
3055 – Code identifying the agency responsible for a code list.
Type: an, Max Length: 3Valid Codes:1– CCC (Customs Co-operation Council)2– CEC (Commission of the European Communities)3– IATA (International Air Transport Association)4– ICC (International Chamber of Commerce)5– ISO (International Organization for Standardization)6– UN/ECE (United Nations - Economic Commission for Europe)7– CEFIC (Conseil Europeen des Federations de l'Industrie Chimique)8– EDIFICE9– EAN (International Article Numbering association)10– ODETTE11– Lloyd's register of shipping12– UIC (International union of railways)13– ICAO (International Civil Aviation Organisation)14– ICS (International Chamber of Shipping)15– RINET (Reinsurance and Insurance Network)16– DUNS (Dun & Bradstreet)17– S.W.I.F.T.18– Conventions on SAD and transit (EC and EFTA)19– FRRC (Federal Reserve Routing Code)20– BIC (Bureau International des Containeurs)
Showing 20 of 168 values defined for element 3055 in D96A.
-
3039 – Code identifying a party involved in a transaction.
-
C058 – Unstructured name and address: one to five lines.
-
3124 – Free form name and address description.
Type: an, Max Length: 35 (Required) -
3124 – Free form name and address description.
Type: an, Max Length: 35 -
3124 – Free form name and address description.
Type: an, Max Length: 35 -
3124 – Free form name and address description.
Type: an, Max Length: 35 -
3124 – Free form name and address description.
Type: an, Max Length: 35
-
3124 – Free form name and address description.
-
C080 – Identification of a transaction party by name, one to five lines. Party name may be formatted.
-
3036 – Name of a party involved in a transaction.
Type: an, Max Length: 35 (Required) -
3036 – Name of a party involved in a transaction.
Type: an, Max Length: 35 -
3036 – Name of a party involved in a transaction.
Type: an, Max Length: 35 -
3036 – Name of a party involved in a transaction.
Type: an, Max Length: 35 -
3036 – Name of a party involved in a transaction.
Type: an, Max Length: 35 -
3045 – Specification of the representation of a party name.
Type: an, Max Length: 3Valid Codes:1– Name components in sequence as defined in description below
-
3036 – Name of a party involved in a transaction.
-
C059 – Street address and/or PO Box number in a structured address: one to three lines.
-
3042 – Street and number in plain language, or Post Office Box No.
Type: an, Max Length: 35 (Required) -
3042 – Street and number in plain language, or Post Office Box No.
Type: an, Max Length: 35 -
3042 – Street and number in plain language, or Post Office Box No.
Type: an, Max Length: 35 -
3042 – Street and number in plain language, or Post Office Box No.
Type: an, Max Length: 35
-
3042 – Street and number in plain language, or Post Office Box No.
-
3035 – Code giving specific meaning to a party.
Type: an, Max Length: 3 (Required)Valid Codes:AA– Party to be billed (AAR Accounting rule 11)AB– Buyer's agent/representativeAE– Declarant's agent/representativeAF– Transit principalAG– Agent/representativeAH– Transit principal's agent/representativeAI– Successful job applicantAJ– Party issuing mutually agreed codesAK– Acknowledgement recipientAL– PrincipalAM– Authorized officialAN– Approved importerAO– Account ofAP– Accepting partyAQ– Approved consignorAR– Authorized exporterAT– Authorized importerAU– Authorized trader (transit)AV– Authorizing officialAW– Applicant's bank
Showing 20 of 299 values defined for element 3035 in D96A.
-
3164 – Name of a city (a town, a village) for addressing purposes.
Type: an, Max Length: 35 -
3229 – Identification of the name of sub-entities (state, province) defined by appropriate governmental agencies.
Type: an, Max Length: 9 -
3251 – Code defining postal zones or addresses.
Type: an, Max Length: 9 -
3207 – Identification of the name of a country or other geographical entity as specified in ISO 3166.
Type: an, Max Length: 3
CTA To identify a person or a department to whom communication should be directed. (Max 9)
-
C056 – Code and/or name of a department or employee. Code preferred.
-
3413 – Internal identification code.
Type: an, Max Length: 17 -
3412 – The department or person within an organizational entity.
Type: an, Max Length: 35
-
3413 – Internal identification code.
-
3139 – Code specifying the function of a contact (e.g. department or person).
Type: an, Max Length: 3Valid Codes:AA– Insurance contactAB– Workshop contactAC– Accepting contactAD– Accounting contactAE– Contract contactAF– Land registry contactAG– AgentAH– Coordination contactAI– Project management contactAJ– Investment contactAK– Works management contactAL– Personnel contactAM– Claims contactAN– Laboratory contactAO– Plant/equipment contactAP– Accounts payable contactAQ– Quantity surveyor contactAR– Accounts receivable contactAS– Public relations contactAT– Technical contact
Showing 20 of 85 values defined for element 3139 in D96A.
COM To identify a communication number of a department or a person to whom communication should be directed. (Max 9)
-
C076 – Communication number of a department or employee in a specified channel.
-
3148 – The communication number.
Type: an, Max Length: 512 (Required) -
3155 – Code identifying the type of communication channel being used.
Type: an, Max Length: 3 (Required)Valid Codes:AA– Circuit switchingAB– SITAAC– ARINCAD– AT&T mailboxAE– Peripheral deviceCA– Cable addressEI– EDI transmissionEM– Electronic mailEX– ExtensionFT– File transfer access methodFX– TelefaxGM– GEIS (General Electric Information Service) mailboxIE– IBM information exchangeIM– Internal mailMA– MailPB– Postbox numberPS– Packet switchingSW– S.W.I.F.T.TE– TelephoneTG– Telegraph
Showing 20 of 25 values defined for element 3155 in D96A.
-
3148 – The communication number.
Group SG3 (Max 999)
ERC To identify the type of application error within a message. (Max 1) Required
-
C901 – Code assigned by the recipient of a message to indicate a data validation error condition.
-
9321 – The code assigned by the receiver of a message to the identification of a data validation error condition.
Type: an, Max Length: 8 (Required) -
1131 – Identification of a code list.
Type: an, Max Length: 3Valid Codes:12– Telephone directory16– Postcode directory23– Clearing house automated payment25– Bank identification35– Rail additional charges36– Railways networks37– Railway locations38– Rail customers39– Rail unified nomenclature of goods42– Business function43– Clearing House Interbank Payment System Participants ID44– Clearing House Interbank Payment System Universal ID52– Value added tax identification53– Passport number54– Statistical object55– Quality conformance56– Safety regulation57– Product code58– Business account number59– Railway services harmonized code
Showing 20 of 120 values defined for element 1131 in D96A.
-
3055 – Code identifying the agency responsible for a code list.
Type: an, Max Length: 3Valid Codes:1– CCC (Customs Co-operation Council)2– CEC (Commission of the European Communities)3– IATA (International Air Transport Association)4– ICC (International Chamber of Commerce)5– ISO (International Organization for Standardization)6– UN/ECE (United Nations - Economic Commission for Europe)7– CEFIC (Conseil Europeen des Federations de l'Industrie Chimique)8– EDIFICE9– EAN (International Article Numbering association)10– ODETTE11– Lloyd's register of shipping12– UIC (International union of railways)13– ICAO (International Civil Aviation Organisation)14– ICS (International Chamber of Shipping)15– RINET (Reinsurance and Insurance Network)16– DUNS (Dun & Bradstreet)17– S.W.I.F.T.18– Conventions on SAD and transit (EC and EFTA)19– FRRC (Federal Reserve Routing Code)20– BIC (Bureau International des Containeurs)
Showing 20 of 168 values defined for element 3055 in D96A.
-
9321 – The code assigned by the receiver of a message to the identification of a data validation error condition.
FTX To provide free form or coded text information. (Max 1)
Elements and codes as defined at FTX above.
UNT Unknown Segment (Max 1) Required
Sources and further reading
- GS1 EDI standards GS1 guidance on EDI standards used for supply-chain document exchange.
- UNECE introduction to UN/EDIFACT United Nations guidance on UN/EDIFACT for structured business data exchange.
- X12 EDI standards Official X12 standards body for North American EDI transaction standards.
- OpenPeppol post-award specifications OpenPeppol documentation for e-procurement and e-invoicing specifications.