ATO ABN search

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
migscay
Posts: 5
Joined: Mon Jun 05, 2017 2:27 pm

ATO ABN search

Post by migscay »

Hi,

Has anybody used the SearchByABNv201408 service from ATO.

I turned on Trace in the code and the trace gives:

Command : SEND SERVICE_LIST(UPF,UPV) HOST(abr.business.gov.au) SECURE(*NO) URI(/abrxmlsearch/Forms/SearchByABNv201408.aspx) HANDLER(OutboundNameValue) METHOD(GET)

Create name/value pair content
Name : searchString
Value : "***************"
Name : includeHistoricalDetails
Value : "Y"
Name : authenticationGuid
Value : "************-****-4558-a320-d32f904c2d48"
Using uri : /abrxmlsearch/Forms/SearchByABNv201408.aspx?searchString=***************&includeHistoricalDetails=Y&authenticationGuid=************-****-4558-a320-d32f904c2d48

It says HTTP response received but based on the Trace: HTTP_RESPONSE_CONT received is the html for the ATO online search form, if you try the search on the Form it returns an XML which is what we were expecting in the RDMLX code

https://abr.business.gov.au/abrxmlsearc ... 01408.aspx


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Expires" content="0" />
<link rel="alternate" type="text/xml" href="../AbrXmlSearch.asmx?disco" />
<link rel="stylesheet" href="../Css/screen.css" type="text/css" />
<title>ABRXMLSearch Web Service </title>
</head>
<body>
<div id="content">
<h1>ABRXMLSearch</h1>
<p class="intro">
tsupartono

Re: ATO ABN search

Post by tsupartono »

I have never used that API, but most likely you have the wrong URL.
Services endpoints normally have asmx extension (what you were using, the ASPX page, is just the service test page).

Try this end-point:
https://abr.business.gov.au/abrxmlsearc ... ing=XXXXXX
Post Reply