# Customer Domain API

Customer Domain API.


Version: 0.0.1

## Servers

Test
```
https://customer.test.api.reece.tech
```

Stage
```
https://customer.stage.api.reece.tech
```

Training
```
https://customer.training.api.reece.tech
```

Production
```
https://customer.api.reece.tech
```

## Security

### jwt-authorizer

Type: oauth2

## Download OpenAPI description

[Customer Domain API](https://test.docs.reece.tech/_bundle/apis/customer/openapi/@current/openapi.yaml)

## Accounts

Account operations

### Get accounts

 - [GET /v1/{countryCode}/accounts](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/accounts/getaccounts.md): Returns the current state of accounts. Soft-deleted accounts are included by default and may be filtered using isDeleted. Results are ordered by createdAt ascending, then accountId ascending.

### Get account by accountId

 - [GET /v1/{countryCode}/accounts/{accountId}](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/accounts/getaccount.md): Returns the current state of the specified account. If the account has been soft-deleted, its deleted state is returned.

### Get account versions

 - [GET /v1/{countryCode}/accounts/{accountId}/versions](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/accounts/getaccountversions.md): Returns the retained version history of the specified account, including versions that represent a soft-deleted state. Results are ordered by updatedAt ascending, then version ascending.

### Get account version by version

 - [GET /v1/{countryCode}/accounts/{accountId}/versions/{version}](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/accounts/getaccountversion.md): Returns the state of the specified account at the requested version. A version that is unknown or no longer retained returns 404.

## Events

Customer Domain event retrieval operations

### Get events

 - [GET /v1/{countryCode}/events](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/events/getevents.md): Returns retained Customer Domain events. Results may be filtered by creation time and event type, and are ordered by createdAt ascending, then eventId ascending.

### Get event by eventId

 - [GET /v1/{countryCode}/events/{eventId}](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/events/getevent.md): Returns the retained Customer Domain event identified by eventId. An event that does not exist within the selected country or is no longer retained returns 404.

## Reference Data

Reference data lookup operations

### Get industry types

 - [GET /v1/{countryCode}/industry-types](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/reference-data/getindustrytypes.md): Returns the full set of valid industryType values for the account industryType field.

### Get segments

 - [GET /v1/{countryCode}/segments](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/reference-data/getsegments.md): Returns the full set of valid values for the account segment field.

### Get sub-segments

 - [GET /v1/{countryCode}/sub-segments](https://test.docs.reece.tech/apis/customer/openapi/openapi-1/reference-data/getsubsegments.md): Returns the full set of valid values for the account subSegment field.

