# 신규 비즈니스 생성 API

플랫폼 서비스에서 개별 유저가 전자서명을 생성하고 관리할 수 있도록 비즈니스 계정 생성 API를 제공합니다.

<br>

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

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

<br>

## Example

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

```json
{
  "input": {
    "user": {
      "email": "test@prix.im",
      "password": "thisistestpassword"
    },
    "profile": {
      "name": "ABC 컴퍼니"
    },
    "customConfig": {
      "customerCustomName": "매장"
    }
  }
}
```

<br>

## Request Body

### 1. input.user

| Key      | Description                                                 | Required |
| -------- | ----------------------------------------------------------- | -------- |
| email    | 새로 생성할 비즈니스의 이메일. 추후 해당 비즈니스로 서명을 요청하는 경우 서명 요청자의 이메일로 적용됨. | yes      |
| password | 영문과 숫자를 포함한 8자리 이상의 값                                       | yes      |

### 2. input.profile

| Key                | Description | Required |
| ------------------ | ----------- | -------- |
| name               | 기업명         | yes      |
| registrationNumber | 사업자등록번호     | no       |
| ceo                | 대표자명        | no       |
| address            | 사업자주소       | no       |

### 3. input.customConfig

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

<br>

## Response

```json
{
  "ok": true,
  "data": {
    "apiKey": "API_KEY_STRING", // API key 값을 저장해서 사용해 주세요.
    "uuid": "686961a8-3975-4ad5-bf4e-134706efee15" // 비즈니스 식별값
  }
}
```

```json
{
  "ok": false, // api 실패
  "message": "error message", // Error가 존재하면 message(string)로 전달
  "errorCode": "ERROR_CODE"
}
```

<br>

## Error Codes

| Status Code | Error Code                         | Description                       |
| ----------- | ---------------------------------- | --------------------------------- |
| 400         | INVALID\_REQUEST\_INPUT            | 파라미터가 잘못된 경우                      |
| 400         | INVALID\_PASSWORD\_MINIMUM\_LENGTH | password가 최소 길이 미만인 경우            |
| 400         | INVALID\_REQUEST\_PARAM            | 프로필에 이름이 누락된 경우                   |
| 400         | INVALID\_CUSTOMER\_CUSTOM\_NAME    | customerCustomName이 생성 규칙을 벗어난 경우 |
| 400         | EXISTING\_EMAIL                    | email이 이미 존재하는 경우                 |
| 500         | FAILED\_CREATE\_SIGNUP             | 사용자 생성 과정에서 알 수 없는 에러가 발생한 경우     |
| 500         | FAILED\_CREATE\_BUSINESS           | 비즈니스 생성 과정에서 알 수 없는 에러가 발생한 경우    |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-kit.prix.im/platform/create-business.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
