# 비즈니스 정보 변경 API

플랫폼 서비스에서 생성한 비즈니스 정보를 수정할 수 있도록 API를 제공합니다.

<br>

## `PATCH` kit-api/v1/business

Method: PATCH\
Endpoint: kit-api/v1/business

<br>

## Example

```
...kit-api/v1/business
```

```json
{
  "input": {
    "profile": {
      "name": "홍길동 컴퍼니",
      "registrationNumber": "123-12-12345",
      "ceo": "홍길동",
      "address": "서울특별시 강남구"
    },
    "configuration": {
      "customerCustomName": "매장"
    }
  }
}
```

<br>

## Request Body

### 1. input.profile

| Key                | Type   | Description | Required |
| ------------------ | ------ | ----------- | -------- |
| name               | string | 비즈니스 이름     | yes      |
| registrationNumber | string | 사업자등록번호     | no       |
| ceo                | string | 대표자 이름      | no       |
| address            | string | 회사 주소       | no       |

<br>

### 2. input.configuration

| Key                | Type   | Description | Required |
| ------------------ | ------ | ----------- | -------- |
| customerCustomName | string | 커스텀할 고객명    | no       |

<br>

## Response

### Success Response

```json
{
  "ok": true,
  "data": {
    "profile": {
      // profile 또는 configuration 개별 업데이트 가능
      "name": "홍길동 컴퍼니",
      "registrationNumber": "123-12-12345",
      "ceo": "홍길동",
      "address": "서울특별시 강남구"
    },
    "configuration": {
      "customerCustomName": "매장"
    }
  }
}
```

### Error Response

```json
{
  "ok": false,
  "message": "error message",
  "errorCode": "ERROR_CODE"
}
```

<br>

## Error Codes

| Status Code | Error Code                | Description                 |
| ----------- | ------------------------- | --------------------------- |
| 400         | MISSING\_PROFILE\_NAME    | 프로필의 필수값인 비즈니스 이름이 누락 됐을 경우 |
| 500         | FAILED\_UPDATE\_PROFILE   | 프로필 업데이트 과정에서 에러가 발생했을 경우   |
| 404         | NOT\_FOUND\_CONFIGURATION | 설정 정보가 존재하지 않는 경우           |
