# Addresses

This endpoint returns any address associated with the business, such as registered addresses, trading address etc.

Using geolocation data, we have also incorporated latitude and longitude coordinates into our addresses. A value in decimal degrees to 5 decimal places is precise to approximately 1 metre.

### Example URL:

```
https://api2.redflagalert.net/v4/companies/01777777/addresses/
```

### JSON Structure:

```javascript
{
	"data": [{
		"attributes": {
			"town": "West Drayton",
			"type": "trading",
			"location": {
				"lat": 51.5373252879822,
				"lon": -0.487355421766335
			},
			"county": "Middlesex",
			"postcode": "UB7 0GB",
			"address_line_4": null,
			"address_line_2": null,
			"address_line_3": null,
			"address_line_1": "Po Box 365"
		},
		"type": "address",
		"id": "645323-645323"
	}]
}
```

### Attributes

| Field Key                                                                                                                                   | Description                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `town`                                                                                                                                      | The town of the registered address.                                                                 |
| `type`                                                                                                                                      | Type of address, such as trading, registered etc.                                                   |
| `location`                                                                                                                                  | A dictionary of key/value pairs containing the latitude and longitude of the business or post code. |
| `county`                                                                                                                                    | The county containing the address.                                                                  |
| `postcode`                                                                                                                                  | The post code of the business address.                                                              |
| <p><code>address\_line\_1</code><br><code>address\_line\_2</code><br><code>address\_line\_3</code><br><code>address\_line\_4</code><br></p> | Lines of the business address. `null` will be returned on empty lines.                              |
