# Pagero APIs and regions

## Regions in Pagero Online

Pagero Online is divided into different regions to comply with local regulations and to optimize performance.

A company will be associated with a specific region based on its location.
When using our REST APIs, it's important to be aware of the region your company is associated with, as this will affect how you interact with the API.

## Regional endpoints

Each region has its own API endpoints. When making API requests, the endpoint corresponding to the relevant company's region must be used.

The base URL for Pagero APIs looks like this:
```http request
https://api.{region}.pageroonline.com/
```

Refer to the [API guidelines](api-guidelines.md) for more information on constructing API requests.

### Fallback region

The region can be omitted in the URL, in which case the `europe1` (Rest of the world) region will be used as the default.

## Identifying a company's region

To identify a company's region, the [Company API](https://app.swaggerhub.com/apis-docs/pagero-api/company-api) can be used to retrieve company details which will include the region information. The request can be made to any region.

The company’s region is available in the `Company` schema, which includes the full baseUrl for invoking APIs in the company’s regional environment.

```json
"region": {
  "id": "europe1",
  "baseUrl": "https://api.europe1.pageroonline.com"
}
```

## Working with companies in multiple regions

When interacting with companies in multiple regions, it's important to ensure that requests are sent to the correct region based on the company being accessed.

## Authentication
Authentication tokens are generally valid across all regions and users can authenticate using any region's authentication endpoint.

## Available regions
Currently only one region is supported:

| Region            | Code        |
|-------------------|-------------|
| Rest of the world | `europe1`   |

However, additional regions will be added to support specific geographical areas.
