# Get company data

`POST https://api.foxentry.com/company/get`

Foxentry allows you to get information about company based on the dataScope option. Country and registrationNumber parameters are required.

## Headers

| Header | Value |
|---|---|
| `Api-Version` | `2.1` or `2.0` |
| `Authorization` | `Bearer <your API key>` |
| `Content-Type` | `application/json` |

## Request body

### request.query

Parameters you want to validate or search for.

| Field | Type | Description |
|---|---|---|
| `country` | string | Country code in format ISO-3166-1 alpha-2. |
| `registrationNumber` | string | Company registration number. |

### request.options

Options that change how the endpoint behaves.

| Field | Type | Description |
|---|---|---|
| `dataScope` | string | Data scope of returned data. One of: `basic`, `extended`, `full`. Default: `"basic"`. |
| `dataSource` | array[string] | Array of allowed data sources, which restricts countries the module searches. Although we use the request.client object to provide most relevant results, it is generally recommended to to limit this option to only the necessary sources - especially if you don't utilize the request.client object. Default: `["CZ", "SK", "PL"]`. |
| `includeTerminatedSubjects` | boolean | Whether or not to include entities that have already ended their existence in the output. Default: `false`. |
| `zipFormat` | boolean | Whether to return locally formatted ZIP code or not. (130 00 vs 13000). Default: `false`. |
| `cityFormat` | string | This option determines the format in which the city is returned. Minimal = Praha, basic = Praha 8, extended = Praha 8 - Karlín. One of: `minimal`, `basic`, `extended`. Default: `"basic"`. |
| `countryFormat` | string | This option determines the format in which the country is returned. Supported formats: alpha2 = CZ, alpha3 = CZE, local = Česká republika, international = Czech republic, localShortened = Česko, internationalShortened = Czechia. One of: `alpha2`, `alpha3`, `local`, `localShortened`, `international`, `internationalShortened`. Default: `"alpha2"`. |

### request.client

Information about your user, to make results more relevant.

| Field | Type | Description |
|---|---|---|
| `ip` | string |  |
| `country` | string | Country code in ISO-3166-1 alpha-2 format. |
| `location.lat` | number | Client's latitude |
| `location.lon` | number | Client's longitude |

### Example

```json
{
  "request": {
    "query": {
      "country": "CZ",
      "registrationNumber": "04997476"
    },
    "options": {
      "dataScope": "full",
      "includeTerminatedSubjects": false,
      "cityFormat": "basic",
      "zipFormat": false
    },
    "client": {
      "country": "CZ",
      "location": {
        "lat": 50.0628,
        "lon": 13.9271
      }
    }
  }
}
```

## Responses

- `200` Successful response. Examples: `basicDataScope`, `extendedDataScope`, `fullDataScope`
- `400` Bad Request
- `401` Unauthorized
- `402` Payment Required
- `403` Forbidden
- `404` Not Found
- `405` Method Not Allowed
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable
