Why is a space inserted within the outcode of the postcode?
Associated product(s): Product name: Pro
Views: 168 | Created: 2 years ago | Last updated: 2 years ago
In certain API integrations a spurious space character could be inserted within the outbound postcode of the returned address. This outputted postcode is what is classed as being in its raw format.
Examples of what postcodes resemble in their raw format include:
M 2 6LH
SW 4 0QL
SW1 H0AA
There are two possible reasons for the postcode being returned in an unexpected format. The first is a configuration file setting that controls the postcode format, the second concerns the specific function call used in an API integration.
The PostcodeFormat configuration setting:
It is possible to change the format in which the postcode is returned by altering the configuration file line:
PostCodeFormat=S or 4 or S4 or blank
Possible formats are as follows:
S Insert a space between incode and outcode SW11 2AZ
4 Justifies the outcode to four characters SW112AZ ; L1 1AA
S4 Inserts a space and justifies to 4 char's SW11 2AZ ; L1 1AA
Blank No spaces to occur in the postcode SW112AZ ; L11AA
The default is S, which is the usual format of a postcode with a single space between the outcode and incode.
High Level/UI API Integration
The integrator/programmer could be including the API function call to QA***UI_ DPPopup. This API function is expecting six variables, two of which are the returned buffer for the retrieved address, rsAddress, and the returned postcode, rsPostcode. The postcode returned to rsPostcode is in raw format. To retrieve the formatted postcode, it is necessary to retrieve the postcode from the rsAddress buffer.
Primary/Low Level API Integration
If the programmer is conducting a primary API integration and the postcode is returned in this raw format, then the postcode is being outputted from the QA***_AddrLine function instead of the QA*** FormatLine function. It is thus recommended that QA***_FormatLine is called since this API function returns a single formatted address, with the postcode in its standard format, as specified in the configuration file.
Send to friend