# Business Objects

| [BusinessRequest](#businessrequest)                       | Request wrapper for REST methods.                                                                                                     |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [HostedBusinessRestResponse](#hostedbusinessrestresponse) | Response wrapper for REST methods                                                                                                     |
| [BusinessSummary](#businesssummary)                       | Business summary information from [find ](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#find)API            |
| [BusinessDetail](#businessdetail)                         | Detail information of Business from [retrieve ](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#retrieve)API. |
| [BusinessEntity](#businessentity)                         | Object which is included in the [BusinessDetail ](#businessdetail)for other names of the entity                                       |

### BusinessRequest

BusinessRequest object is used when invoking the Harmony RightAddress business [<mark style="color:blue;">Find</mark>](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#find)<mark style="color:blue;">/</mark>[Retrieve ](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#retrieve)REST service methods. (\* means mandatory field)

**name\***

Type: String. Mandatory field for both Find/Retrieve API.

For [Find](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#find) API ,it can be a business number, company or any entity names.

For [Retrieve](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#retrieve) API, it can be Id value from Find API or clear text business/company number.

**country\***

Type: String. Country ISO2 code. (e.g. AU)

**hits**

Type: Integer. Optional, the maximum number of results returned from the lookup. If empty default will be 20.

**taxStatus**

Type: String. TAX/GST status want to search, default will be empty which will search ALL. ACT -> Active, CAN -> Cancelled, NON -> None

**bnStatus**

Type: String. Business number status want to search, default will be empty which will search ALL. ACT -> Active, CAN -> Cancelled

**nameTypes**

Type: String Array. Depending on country the available filters differ. Entity types want to search from, default will search ALL. \["TRD", "BN", "OTN"] -> search against trading names and business names

Australia:

* MN → main entity name;&#x20;
* LGL → legal entity name (individuals/sole traders). Use with MN;&#x20;
* TRD → trading name in Other Entity;&#x20;
* BN → business name in Other Entity;&#x20;
* OTN → other name in Other Entity;&#x20;
* PRV → Australian Private Company
* DGR → deductible gift recipient&#x20;

Note: Here is the link to the complete list of entity types →  <https://abr.business.gov.au/Documentation/ReferenceData>&#x20;

New Zealand:

* MN → main entity name;&#x20;
* TRD → trading name in Other Entity;&#x20;
* OTN → other name in Other Entity;&#x20;

**state**

Type: String Array. The state of the entity for searching, default will search ALL. It accept multiple states. e.g. \["NSW", "QLD"] -> search against NSW and QLD entities

**caseType**

Type: String. Case type for entity name, default is whatever the case in the reference data. *Available values* : UP, LOW, TITLE.

#### JSON Representation

```json
{
  "name": "name, abn or acn",
  "hits": 20,
  "country": "au",
  "taxStatus": "ACT",
  "bnStatus": "ACT",
  "nameTypes": [
    "MN",
    "BN"
  ],
  "state": [
    "VIC",
    "NSW"
  ],
  "caseType": "UP"
}
```

### HostedBusinessRestResponse

An HostedBusinessRestResponse object is returned from the Harmony RightAddress Business find/retrieve REST service method invocation

#### payload

Type: The list of [BusinessSummary ](#hostedbusinesssummary)for find API or list of [BusinessDetail ](#businessdetail)for retrieve API

#### status

Type: String. The status of the request (i.e. 'SUCCESS' or 'ERROR').

#### messages

Type: String Array. Any error messages generated during the REST service method invocation (e.g. '\[ "Access is denied" ]')

#### JSON Representation

For Find API

```json
  {
  "status": "SUCCESS",
  "messages": [],
  "payload": [
    {
      "name": "INSURANCE ADVICE & ADVOCACY STONES CORNER",
      "bn": "xxxxx1825",
      "postcode": "4120",
      "id": "XEE0eyRpm1UY80rNOdIDvQ=="
    },
    {
      "name": "Insurance Glass",
      "bn": "xxxxx8910",
      "postcode": "6172",
      "id": "dETz7USYQoDM1OuyzrjmLQ=="
    }]
    }
```

### BusinessSummary

BusinessSummary is the result from the [find ](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#find)API. It contains summary information of the business. id can be used for retrieve API for full information of the business entity.&#x20;

**name**

Type: String. The Main or Legal name of the business entity.&#x20;

**bn**

Type: String. Partial business number of the business entity, in order to get the all information will require to call the retrieve API.&#x20;

**postcode**

Type: String. Postcode of the business entity.

**id**

Type: String. Id to use for the retrieve API call in order to get [full detail of the business entity](#businessdetail) information.&#x20;

#### JSON Representation

```json
  {
      "name": "INSURANCE ADVICE & ADVOCACY STONES CORNER",
      "bn": "xxxxx1825",
      "postcode": "4120",
      "id": "XEE0eyRpm1UY80rNOdIDvQ=="
    }
```

### BusinessDetail

BusinessDetail is the object return from the [retrieve ](https://docs.mastersoftgroup.com/loqate-harmony-api/business-validation#retrieve)API. It includes a list of [BusinessEntity ](#businessentity)object for other names of the business entity.&#x20;

**name**

Type: String. Main/Legal name of the business entity.

**country**

Type: String. Country ISO2 code. (e.g. AU)

**bn**

Type: String. Business number of the entity.

**cn**

Type: String. Company number of the entity.

**postcode**

Type: String. Postcode of the business entity.

**state**

Type: String.  State of the business entity.

**name\_entity\_type**

Type: String. Type of the name of the entity. MN → Main Entity Name; LGL → legal Entity Name.&#x20;

**other\_entities**

Type: List of [BusinessEntity ](#businessentity)object for other entity names.

**last\_updated\_date**

Type: String. The last updated date.

**bn\_status**

Type: String. Status of the business number. ACT -> Active, CAN -> Cancelled.

**bn\_status\_from\_date**

Type: String. Date of the business number from

**entity\_type\_ind**

Type: String. Indicator of the entity type with description the the entity\_type\_text field.&#x20;

**entity\_type\_text**

Type: String. Description for the entity\_type\_ind value.

**tax\_status**

Type: String. The status of the GST. ACT -> Active, CAN -> Cancelled, NON -> None.

**tax\_status\_from\_date**

Type: String. The date for the tax\_status valu&#x65;*.* If tax\_status is NON, date value is 19000101 .

**attributes**

Type: List of name value pairs for extra attributes.&#x20;

#### JSON Representation

```json
 {
      "name": "SIMON PETER KENDALL",
      "bn": "51321301825",
      "state": "QLD",
      "postcode": "4120",
      "country": "au",
      "name_entity_type": "LGL",
      "other_entities": [
        {
          "entity_name": "INSURANCE ADVICE & ADVOCACY STONES CORNER",
          "entity_type": "BN"
        }
      ],
      "last_updated_date": "20190510",
      "bn_status": "CAN",
      "bn_status_from_date": "20190510",
      "entity_type_ind": "IND",
      "entity_type_text": "Individual/Sole Trader",
      "tax_status": "NON",
      "tax_status_from_date": "19000101"
    }
```

### BusinessEntity

BusinessEntity object is used for other business entities names like other trading name etc. One [Business ](#businessdetail)can have a list of BusinessEntity objects if applicable.&#x20;

**entity\_name**

Type: String. Name of the business entity.

**entity\_type**

Type: String. Type of the name.  TRD → trading name; BN → business name ; OTN → other name; DGR → DGR name.

#### JSON Representation

```json
{
  "entity_name": "INSURANCE ADVICE & ADVOCACY STONES CORNER",
  "entity_type": "BN"
}
```
