# 프로모션 정보획득 API

### 프로모션 정보들을 가져옵니다.

해당 API 호출을 통해 프로모션 상태 정보를 획득하고 가맹점 주문페이지에서 카드사프로모션 배너를 띄우거나

기타 프로모셔 행사를 진행하기 위해 필요한 데이터를 받아볼 수 있습니다.

## 카드사 프로모션 정보를 조회합니다.

<mark style="color:blue;">`GET`</mark> `https://api.iamport.kr/promotion/infos`

프로모션 상태코드를 기준으로 과거/현재/미래 프로모션 정보를 획득할 수 있습니다.

#### Query Parameters

| Name                                     | Type    | Description                                                                                                                                                                  |
| ---------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| status<mark style="color:red;">\*</mark> | Integer | <p><mark style="color:red;"><strong>프로모션 상태코드</strong></mark></p><p><code>0: 전체</code> </p><p><code>1: 진행예정</code></p><p><code>2: 진행중</code> </p><p><code>3: 진행완료</code></p> |

{% tabs %}
{% tab title="200: OK 성공" %}
{% tabs %}
{% tab title="PromotionInfosAnnotation" %}
**`code`** <mark style="color:red;">**\***</mark>**&#x20;**<mark style="color:purple;">**integer**</mark>

**응답코드**

0이면 정상적인 조회, 0 이 아닌 값이면 message를 확인해봐야 합니다

**`message`** <mark style="color:red;">**\***</mark>**&#x20;**<mark style="color:green;">**string**</mark>

**응답메세지**

code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다

**`response`** <mark style="color:red;">**(Array\[PromotionInfoDetailAnnotation], optional )**</mark>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PromotionInfoDetailAnnotation" %}
**`promotion_id`` `**<mark style="color:green;">**`string`**</mark>

**`프로모션 아이디`**

&#x20;각 카드사 프로모션 단위별 고유번호

**`user_code`` `**<mark style="color:green;">**`string`**</mark>

**`가맹점 식별코드`**&#x20;

아임포트가 가맹점단위로 부여한 고유번호

**`issuer`` `**<mark style="color:green;">**`string`**</mark>

**`카드사 고유번호`**

카드사 발급사 코드

**`total_discount_amount`` `**<mark style="color:green;">**`string`**</mark>&#x20;

**`총 예산(원)`**

&#x20;

**`hard_cap_rate``  `**<mark style="color:green;">**`string`**</mark>

**초과 허용(%/원)**

&#x20;

**`cancel_rate`` `**<mark style="color:green;">**`string`**</mark>

**환불 예상(%/원)**

**`discount`` `**<mark style="color:green;">**`string`**</mark>

**할인금액(%/원)**

**`limit_discount`` `**<mark style="color:green;">**`string`**</mark>

**최대 할인금액(원)**

**`description`` `**<mark style="color:green;">**`string`**</mark>

**설명(메모)**

**`start`` `**<mark style="color:purple;">**`integer`**</mark>

**시작일시(Unix Timestamp)**

**`end`` `**<mark style="color:purple;">**`integer`**</mark>

**종료일시(Unix Timestamp)**

**`status`` `**<mark style="color:purple;">**`integer`**</mark>

**프로모션 상태**

0:전체 1: 진행예정, 2: 진행중, 3: 진행완료

**`exhausted_at`` `**<mark style="color:purple;">**`integer`**</mark>

**종료일시(실제)**

**`min_amount`` `**<mark style="color:green;">**`string`**</mark>

**최소 결제금액(원)**&#x52;esponse Model Schem
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401: Unauthorized 인증 Token이 전달되지 않았거나 유효하지 않은 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Response Model Schema

<details>

<summary>HTTP status 200</summary>

```json
{
  "code": 0,
  "message": "string",
  "response": [
    {
      "promotion_id": "string",
      "user_code": "string",
      "issuer": "string",
      "total_discount_amount": "string",
      "hard_cap_rate": "string",
      "cancel_rate": "string",
      "discount": "string",
      "limit_discount": "string",
      "description": "string",
      "start": 0,
      "end": 0,
      "status": 0,
      "exhausted_at": 0,
      "min_amount": "string"
    }
  ]
}
```

</details>
