lookupABNOrNZBN
Lookup a business by ABN or NZBN
Look up a business by ABN or NZBN
/Spenda/Tenant/Business/findByBusinessNumber/{countryName}/{businessNumber}
Usage and SDK Samples
curl -X GET \
-H "Accept: application/json" \
"https://api.dev.spenda.co/api/Spenda/Tenant/Business/findByBusinessNumber/{countryName}/{businessNumber}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BusinessApi;
import java.io.File;
import java.util.*;
public class BusinessApiExample {
public static void main(String[] args) {
// Create an instance of the API class
BusinessApi apiInstance = new BusinessApi();
String businessNumber = businessNumber_example; // String | The Australian or New Zealand Business Number to look up
String countryName = countryName_example; // String | Represents the name of the country
try {
httpActionResult_abnLookupResponse result = apiInstance.lookupABNOrNZBN(businessNumber, countryName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BusinessApi#lookupABNOrNZBN");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String businessNumber = new String(); // String | The Australian or New Zealand Business Number to look up
final String countryName = new String(); // String | Represents the name of the country
try {
final result = await api_instance.lookupABNOrNZBN(businessNumber, countryName);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->lookupABNOrNZBN: $e\n');
}
import org.openapitools.client.api.BusinessApi;
public class BusinessApiExample {
public static void main(String[] args) {
BusinessApi apiInstance = new BusinessApi();
String businessNumber = businessNumber_example; // String | The Australian or New Zealand Business Number to look up
String countryName = countryName_example; // String | Represents the name of the country
try {
httpActionResult_abnLookupResponse result = apiInstance.lookupABNOrNZBN(businessNumber, countryName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BusinessApi#lookupABNOrNZBN");
e.printStackTrace();
}
}
}
// Create an instance of the API class
BusinessApi *apiInstance = [[BusinessApi alloc] init];
String *businessNumber = businessNumber_example; // The Australian or New Zealand Business Number to look up (default to null)
String *countryName = countryName_example; // Represents the name of the country (default to null)
// Lookup a business by ABN or NZBN
[apiInstance lookupABNOrNZBNWith:businessNumber
countryName:countryName
completionHandler: ^(httpActionResult_abnLookupResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SpendaServicesTenantManagement = require('spenda_services_tenant_management');
// Create an instance of the API class
var api = new SpendaServicesTenantManagement.BusinessApi()
var businessNumber = businessNumber_example; // {String} The Australian or New Zealand Business Number to look up
var countryName = countryName_example; // {String} Represents the name of the country
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.lookupABNOrNZBN(businessNumber, countryName, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class lookupABNOrNZBNExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new BusinessApi();
var businessNumber = businessNumber_example; // String | The Australian or New Zealand Business Number to look up (default to null)
var countryName = countryName_example; // String | Represents the name of the country (default to null)
try {
// Lookup a business by ABN or NZBN
httpActionResult_abnLookupResponse result = apiInstance.lookupABNOrNZBN(businessNumber, countryName);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling BusinessApi.lookupABNOrNZBN: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\BusinessApi();
$businessNumber = businessNumber_example; // String | The Australian or New Zealand Business Number to look up
$countryName = countryName_example; // String | Represents the name of the country
try {
$result = $api_instance->lookupABNOrNZBN($businessNumber, $countryName);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BusinessApi->lookupABNOrNZBN: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BusinessApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::BusinessApi->new();
my $businessNumber = businessNumber_example; # String | The Australian or New Zealand Business Number to look up
my $countryName = countryName_example; # String | Represents the name of the country
eval {
my $result = $api_instance->lookupABNOrNZBN(businessNumber => $businessNumber, countryName => $countryName);
print Dumper($result);
};
if ($@) {
warn "Exception when calling BusinessApi->lookupABNOrNZBN: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.BusinessApi()
businessNumber = businessNumber_example # String | The Australian or New Zealand Business Number to look up (default to null)
countryName = countryName_example # String | Represents the name of the country (default to null)
try:
# Lookup a business by ABN or NZBN
api_response = api_instance.lookup_abnor_nzbn(businessNumber, countryName)
pprint(api_response)
except ApiException as e:
print("Exception when calling BusinessApi->lookupABNOrNZBN: %s\n" % e)
extern crate BusinessApi;
pub fn main() {
let businessNumber = businessNumber_example; // String
let countryName = countryName_example; // String
let mut context = BusinessApi::Context::default();
let result = client.lookupABNOrNZBN(businessNumber, countryName, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| businessNumber* |
String
The Australian or New Zealand Business Number to look up
Required
|
| countryName* |
String
Represents the name of the country
Required
|