# Custom

## 특정 유저의 특정 이미지의 커스텀을 생성합니다.

<mark style="color:green;">`POST`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

#### Request Body

| Name                                    | Type   | Description                                      |
| --------------------------------------- | ------ | ------------------------------------------------ |
| key<mark style="color:red;">\*</mark>   | String | <p>key (proptier 측에서 사용할 key)</p><p>ex) area</p> |
| value<mark style="color:red;">\*</mark> | String | <p>value ( key 의 밸류)</p><p>ex) 30</p>            |

{% tabs %}
{% tab title="200: OK 커스텀 생성 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "id": "FUVr4LfwcR",
        "image_id": "d06054b8-9bee-4f41-84c1-8154731094bd",
        "key": "area",
        "value": "30",
        "created_at": "20240305_154643",
        "updated_at": "20240305_154643"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 커스텀 생성 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request POST 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs' \
--header 'Authorization: User {YOUR_TOKEN}' \
--form 'key="{YOUR_KEY}"' \
--form 'value="{YOUR_VALUE}"'
```

{% endtab %}
{% endtabs %}

## 특정 유저의 특정 이미지의 커스텀을 조회합니다.

<mark style="color:blue;">`GET`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

{% tabs %}
{% tab title="200: OK 커스텀 조회 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": [
        {
            "id": "4ynQSwzvsV",
            "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
            "key": "test",
            "value": "test",
            "created_at": "20240304_103113",
            "updated_at": "20240304_103113"
        }
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request 커스텀 조 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request GET 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs' \
--header 'Authorization: User {YOUR_TOKEN}' 
```

{% endtab %}
{% endtabs %}

## 특정 유저의 특정 이미지의 커스텀을 수정합니다.

<mark style="color:orange;">`PUT`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs/{custom_id}`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

#### Request Body

| Name  | Type   | Description                                      |
| ----- | ------ | ------------------------------------------------ |
| key   | String | <p>key (proptier 측에서 사용할 key)</p><p>ex) area</p> |
| value | String | <p>value ( key 의 밸류)</p><p>ex) 30</p>            |

{% tabs %}
{% tab title="200: OK 커스텀 수정 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "id": "FUVr4LfwcR",
        "image_id": "d06054b8-9bee-4f41-84c1-8154731094bd",
        "key": "area",
        "value": "30",
        "created_at": "20240305_154643",
        "updated_at": "20240305_154643"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 커스텀 수정 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request PUT 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs/{custom_id}' \
--header 'Authorization: User {YOUR_TOKEN}' \
--form 'key="{YOUR_KEY}"' \
--form 'value="{YOUR_VALUE}"'
```

{% endtab %}
{% endtabs %}

## 특정 유저의 특정 이미지의 커스텀을 삭제합니다.

<mark style="color:red;">`DELETE`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs/{custom_id}`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

{% tabs %}
{% tab title="200: OK 커스텀 삭제 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "deleted_custom": "7tSLqjfx4j"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 커스텀 생성 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request DELETE 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/customs/{custom_id}' \
--header 'Authorization: User {YOUR_TOKEN}' 
```

{% endtab %}
{% endtabs %}


---

# 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://docs.pic-origin.com/reference/api-reference/v1/user/custom.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.
