# 마일리지

## 마일리지 사용/적립 처리

> \## 기능설명\
> \* 마일리지 사용 또는 적립을 진행합니다.\
> \---\
> \## 상세설명\
> \* 회원의 마일리지 사용 또는 적립을 진행합니다.\
> \* 마일리지 사용 시에는 적립된 마일리지를 사용하는 우선순위가 존재합니다.\
> \* 마일리지 적립 시에는 적립 구분코드에 따라 사용 유효기간이 다르게 설정되어 적립됩니다.\
> \* 마일리지 사용 우선순위\
> &#x20;  \* 마일리지 종료 유효기간이 가장 짧은 마일리지\
> &#x20;  \* 마일리지 금액이 적은 마일리지\
> \* 마일리지 적립 유효기간\
> &#x20;  \* 기본적립, 상품리뷰, 회원등급별추가 적립 : 1년\
> &#x20;  \* 프로모션, 고객보상, 환불, 이벤트 적립 : 30일\
> \---\
> \## 특이사항\
> \* 외부 접속이 차단된 API로, 내부 서버에서만 접근이 가능합니다.\
> \---\
> \## 수정번호\
> \* Release v1.01\_231010: 마일리지 소멸기간 자동화 처리(이벤트/환불/고객보상)\
> \* Release v1.03\_231106: 마일리지 적립 전문 항목 추가(적립대상코드)\
> \* Release v1.03\_231106: 마일리지 적립 시 상품평 월/년 최대 적립 금액 체크 로직 추가<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE Member API","version":"v1"},"servers":[{"url":"https://api-member.x2bee.com/api/member/","description":"prd"}],"paths":{"/v1/mileage/mlgSaveUse":{"post":{"tags":["마일리지"],"summary":"마일리지 사용/적립 처리","description":"## 기능설명\n* 마일리지 사용 또는 적립을 진행합니다.\n---\n## 상세설명\n* 회원의 마일리지 사용 또는 적립을 진행합니다.\n* 마일리지 사용 시에는 적립된 마일리지를 사용하는 우선순위가 존재합니다.\n* 마일리지 적립 시에는 적립 구분코드에 따라 사용 유효기간이 다르게 설정되어 적립됩니다.\n* 마일리지 사용 우선순위\n   * 마일리지 종료 유효기간이 가장 짧은 마일리지\n   * 마일리지 금액이 적은 마일리지\n* 마일리지 적립 유효기간\n   * 기본적립, 상품리뷰, 회원등급별추가 적립 : 1년\n   * 프로모션, 고객보상, 환불, 이벤트 적립 : 30일\n---\n## 특이사항\n* 외부 접속이 차단된 API로, 내부 서버에서만 접근이 가능합니다.\n---\n## 수정번호\n* Release v1.01_231010: 마일리지 소멸기간 자동화 처리(이벤트/환불/고객보상)\n* Release v1.03_231106: 마일리지 적립 전문 항목 추가(적립대상코드)\n* Release v1.03_231106: 마일리지 적립 시 상품평 월/년 최대 적립 금액 체크 로직 추가\n","operationId":"saveMlgUseRfd","parameters":[{"name":"mlgUseRfdRequestVo","in":"query","description":"마일리지 - 사용/적립 요청 정보","required":true,"schema":{"type":"string","description":"MlgUseRfdRequestVo"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MlgUseRfdRequestVo"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MlgUseRfdResponseVo"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"MlgUseRfdRequestVo":{"type":"object","description":"마일리지 사용/적립 처리 RequestVO","properties":{"mbrNo":{"type":"string","description":"회원번호"},"mlgList":{"type":"array","description":"마일리지 사용/적립 내역(리스트)","items":{"$ref":"#/components/schemas/MlgUseRfdRequest"}}},"required":["mbrNo","mlgList"]},"MlgUseRfdRequest":{"type":"object","description":"마일리지 사용/적립 처리 Request","properties":{"astGbCd":{"type":"string","description":"자산구분코드(ME015)","enum":["ACTIVITY","MILEAGE"]},"rsrvUseGbCd":{"type":"string","description":"적립사용구분코드(ME016)","enum":["SAVE","USE"]},"astRsrvUseCausCd":{"type":"string","description":"자산적립사용사유코드(ME020)","enum":["ACT_GOODS_ORDER","ACT_GOODS_REVIEW","MLG_ORDER_ACUM","MLG_GRADE_ACUM","MLG_RESERV_ACUM","MLG_PROMO_ACUM","MLG_REVIEW_ACUM","MLG_EVT_ACUM","MLG_REWARD_ACUM","MLG_ADJ_ACUM","MLG_REFUND_ACUM","MNAL_CLAIM_ACUM","MNAL_EVT_ACUM","MLG_ORDER_USE","MLG_ORDER_CHG_USE","MLG_ETC_USE","MLG_ADJ_USE","MLG_EXPIRE_USE","MLG_EXPIRE_ADJ_USE","MLG_EXCHG_COUPON_USE","MLG_DLVP_USE"]},"rsrvGbCd":{"type":"string","description":"적립구분코드 (CM016)","enum":["BASE","MBR_GRADE","PROMO","MBR_REWARD","GOODS_REVIEW","REFUND","EVENT"]},"rsrvTgtCd":{"type":"string","description":"적립대상코드 (CM017)","enum":["BASE","MBR_GREEN_GRADE","MBR_FAMILY_GRADE","MBR_GOLD_GRADE","MBR_VIP_GRADE","MBR_VVIP_GRADE","PROMO","MBR_REWARD","GOODS_FRST_REVIEW","GOODS_SCND_REVIEW","GOODS_CONT_REVIEW","REFUND","EVENT"]},"ocurMlg":{"type":"integer","format":"int64","description":"마일리지 사용/적립 발생 금액"},"astMgrNo":{"type":"string","description":"자산관리번호"},"astMgrDtlNo":{"type":"string","description":"자산관리상세번호"},"astMgrMemo":{"type":"string","description":"적립상세내용"}},"required":["astGbCd","astMgrNo","astRsrvUseCausCd","ocurMlg","rsrvUseGbCd"]},"MlgUseRfdResponseVo":{"type":"object","description":"마일리지 사용/적립 내역 Response","properties":{"mlgList":{"type":"array","description":"마일리지 사용 적립 내역 List","items":{"$ref":"#/components/schemas/MlgUseRfdResponse"}}}},"MlgUseRfdResponse":{"type":"object","properties":{"astMgrSeq":{"type":"string","description":"자산관리순번"},"ocurMlg":{"type":"integer","format":"int64","description":"마일리지 사용/적립 발생 금액"},"astMgrNo":{"type":"string","description":"자산관리번호"},"astMgrDtlNo":{"type":"string","description":"자산관리상세번호"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}}}
```

## 보유 마일리지 요약 조회

> \## 기능설명\
> \* 마일리지 정보를 요약하여 조회합니다.\
> \---\
> \## 상세설명\
> \* 회원이 보유하고 있는 마일리지 정보를 요약하여 조회합니다.\
> \* 마일리지 요약 종류\
> &#x20;  \* 현재 보유 마일리지\
> &#x20;  \* 당일 소멸 예정 마일리지\
> &#x20;  \* 당월 소멸 예정 마일리지<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE Member API","version":"v1"},"servers":[{"url":"https://api-member.x2bee.com/api/member/","description":"prd"}],"paths":{"/v1/mileage/mlgSum":{"get":{"tags":["마일리지"],"summary":"보유 마일리지 요약 조회","description":"## 기능설명\n* 마일리지 정보를 요약하여 조회합니다.\n---\n## 상세설명\n* 회원이 보유하고 있는 마일리지 정보를 요약하여 조회합니다.\n* 마일리지 요약 종류\n   * 현재 보유 마일리지\n   * 당일 소멸 예정 마일리지\n   * 당월 소멸 예정 마일리지\n","operationId":"getMlgBalAmtInfo","parameters":[{"name":"userDetail","in":"query","description":"회원 정보","required":true,"schema":{"type":"UserDetail"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MlgSumResponse"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"MlgSumResponse":{"type":"object","description":"마일리지 - 잔여금액 Summary Response","properties":{"crrtMlg":{"type":"integer","format":"int64","description":"현재 사용 가능 마일리지"},"tdayDappFcstMlg":{"type":"integer","format":"int64","description":"당일 소멸 예정 마일리지"},"tmthDappFcstMlg":{"type":"integer","format":"int64","description":"당월 소멸 예정 마일리지"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}}}
```

## 마일리지 사용/적립 목록 조회

> \## 기능설명\
> \* 마일리지 사용/적립 목록을 조회합니다.\
> \---\
> \## 상세설명\
> \* 회원의 마일리지 사용/적립 상세 내용 목록을 조회합니다.\
> \* 마일리지 조회 기간\
> &#x20;  \* 1주일 : 조회하는 날짜로부터 1주일 전 까지의 데이터를 조회합니다.\
> &#x20;  \* 1개월 : 조회하는 날짜로부터 1개월 전 까지의 데이터를 조회합니다.\
> &#x20;  \* 3개월 : 조회하는 날짜로부터 3개월 전 까지의 데이터를 조회합니다.\
> &#x20;  \* 상세조회 : 조회 시작 날짜와 종료 날짜를 설정하여 데이터를 조회합니다. 단, 3개월 이내의 데이터만 조회가 가능합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE Member API","version":"v1"},"servers":[{"url":"https://api-member.x2bee.com/api/member/","description":"prd"}],"paths":{"/v1/mileage/mlgDtlList":{"get":{"tags":["마일리지"],"summary":"마일리지 사용/적립 목록 조회","description":"## 기능설명\n* 마일리지 사용/적립 목록을 조회합니다.\n---\n## 상세설명\n* 회원의 마일리지 사용/적립 상세 내용 목록을 조회합니다.\n* 마일리지 조회 기간\n   * 1주일 : 조회하는 날짜로부터 1주일 전 까지의 데이터를 조회합니다.\n   * 1개월 : 조회하는 날짜로부터 1개월 전 까지의 데이터를 조회합니다.\n   * 3개월 : 조회하는 날짜로부터 3개월 전 까지의 데이터를 조회합니다.\n   * 상세조회 : 조회 시작 날짜와 종료 날짜를 설정하여 데이터를 조회합니다. 단, 3개월 이내의 데이터만 조회가 가능합니다.\n","operationId":"getMlgDtlList","parameters":[{"name":"mlgDtlListRequest","in":"query","description":"마일리지 - 사용/적립 상세내역 조회를 위한 정보","required":true,"schema":{"type":"string","description":"MlgDtlListRequest"}},{"name":"userDetail","in":"query","description":"회원 정보","required":true,"schema":{"type":"UserDetail"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MlgDtlListResponseVo"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"MlgDtlListResponseVo":{"type":"object","description":"마일리지 사용/적립 상세내역 조회 Response","properties":{"totCnt":{"type":"integer","format":"int64","description":"조회된 총 건수"},"pageIdx":{"type":"integer","format":"int64","description":"페이지 번호"},"mlgList":{"type":"array","description":"마일리지 사용/적립 상세 내역 List","items":{"$ref":"#/components/schemas/MlgDtlListResponse"}}}},"MlgDtlListResponse":{"type":"object","properties":{"astRsrvUseGbCd":{"type":"string","description":"적립사용구분코드(ME016)"},"astRsrvUseGbNm":{"type":"string","description":"적립사용구분코드 이름"},"astRsrvUseCausCd":{"type":"string","description":"자산적립사용사유코드(ME020)"},"astRsrvUseCausNm":{"type":"string","description":"자산적립사용사유코드 이름 "},"ocurDt":{"type":"string","description":"발생일자"},"ocurAmt":{"type":"integer","format":"int64","description":"발생금액"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}}}
```

## 가용 마일리지 조회

> \## 기능설명\
> \* 회원의 사용 가능한 마일리지를 조회합니다.\
> \---\
> \## 상세설명\
> \* 마일리지로 상품을 결제 하기 전, 회원의 사용 가능 마일리지를 조회합니다.\
> \---\
> \## 특이사항\
> \* 외부 접속이 차단된 API로, 내부 서버에서만 접근이 가능합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE Member API","version":"v1"},"servers":[{"url":"https://api-member.x2bee.com/api/member/","description":"prd"}],"paths":{"/v1/mileage/mlgBalAmtInfo":{"get":{"tags":["마일리지"],"summary":"가용 마일리지 조회","description":"## 기능설명\n* 회원의 사용 가능한 마일리지를 조회합니다.\n---\n## 상세설명\n* 마일리지로 상품을 결제 하기 전, 회원의 사용 가능 마일리지를 조회합니다.\n---\n## 특이사항\n* 외부 접속이 차단된 API로, 내부 서버에서만 접근이 가능합니다.\n","operationId":"getMlgBalAmtInfo_1","parameters":[{"name":"milgAvalRequest","in":"query","description":"마일리지 - 사용가능 금액 조회 Request","required":true,"schema":{"type":"string","description":"MilgAvalRequest"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MilgAvalResponse"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"MilgAvalResponse":{"type":"object","description":"마일리지 - 사용가능 금액조회 Response","properties":{"mlgAvalAmt":{"type":"integer","format":"int64","description":"잔여 마일리지"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}}}
```


---

# 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://tech.x2bee.com/api/store-front-api/member-api/undefined-8.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.
