Data types

Data types and format restrictions are separated in AFD 2.0. The result of this is that AFD 2.0 only has six native data types: integer, decimal, string, date, time and boolean. The inclusion of boolean instead of ADNLOG implements a much-anticipated wish from the industry. In terms of format, time and date are adapted to the applicable standards within XML and JSON: date is written as CCYY-MM-DD (with dashes) within AFD 2.0, time as hh: mm: ss (with colon).

AFD data type Description XML JSON
Integer Number without decimal places Integer Integer
Decimal Number with decimal places Decimal Number
String Alphanumeric field String String
Date Date of format CCYY-MM-DD Date String¹
Time Time of format hh:mm:ss Time String²
Boolean True or false Boolean Boolean

¹ Note that JSON does not specify a format for date. A string of length 8 with a date pattern is accepted. From JSON Schema 7.0 on, specific date formats can be validated of type CCYY-MM-DD.
² Note that JSON does not specify a format for time. A string of length 8 with a time pattern is accepted. From JSON Schema 7.0 on, specific time formats can be validated of type hh:mm:ss.


Another innovation is the addition of arrays. By reducing the number of entities in AFD 2.0, it will increasingly occur that entities occur repeatedly in a message or function. With the newly introduced support from JSON, a syntax has been chosen that intrinsically supports arrays, as opposed to XML. That is why it becomes possible in AFD 2.0 messages to include entities as array. Building on this development, and also regarding eliminating redundancy in the data catalog, some attributes are also used as array. Example attributes are area (_GEBIED) and companyTypeSpecification (_SBISPCC): a coverage can apply to multiple areas (codelist ADNDKG) and a company can have multiple company types from the corresponding codelist (ADNABS). In XML, arrays will be represented as an xs:list.

Attributes used as an array always contain an array of one specific data type or codelist. In the data catalog this is indicated by square brackets; area is of type [ADNDKG] for example. The following is a (non-exhaustive) list of attributes used as Array, and their respective attributes in AFD 1.0.

Examples of attributes used as Array

Attribute Description Data type Corresponding attribute(s) in AFD 1.0
calculationFactor Collection of calculation factors. [decimal] FACTORS, RFCTR1, RFCTR2, etc.
companyTypeSpecification Coded specification of company type. This is an additional specification on the SBI code. The code is company specific. [ADNABS] SBISPCC
discountPercentages Company specific discount percentages, used for calculations. [decimal] KRTPRC1, KRTPRC2, etc.
previousFundType Types of old/previous funds. [ADNFON] FNDCDO
detectedChanges Changes detected by the acceptance system. [string] MUTAT1, MUTAT2, etc.
surchargeAmount Amounts of surcharges. [decimal] TOEWR1, TOEWR2, etc.

Example message using Array

	"party" : [ {
		"entityType": "company",
		"companyTypeSpecification": ["1006", "1007"],
		"ceaCode": "1234567",
	} ],

Note: array attributes that have only one value within the message are still written as array (in JSON with square brackets). See "companyTypeSpecification": ["1006", "1007"] in the example above.


Thanks for your feedback.

Post your comment on this topic.

Post Comment