General coupon usage inquiry

Prev Next

We are preparing a localization service for the content. We will do our best to provide the localization service as soon as possible.

Inquiry of general coupon usage
Keyword coupon usage history is not displayed.

request

GET https://dashboard-api.gamepot.ntruss.com/v1/api/project/{projectId}/coupon/{couponNumber}
Item type Required ExplanationRemark
projectId String O ProjectId in GamePot SDK
couponNumber String O 대시보드에서 발급한 쿠폰 번호Coupon number issued by the dashboard

요청 헤더

Header name Required Explanation
x-api-key O Authentication key issued by GamePot
accept-language X Language used

응답

필드명 타입 설명
status Int 결과값 (1: 성공)
id String 쿠폰 사용 내역 아이디
status Boolean 쿠폰 사용 여부(true: 사용, false: 미사용)
enable Int 사용가능 여부
number String 쿠폰 번호
userdata String 쿠폰 사용 유저 정보
usedAt String 쿠폰 사용일
request String 쿠폰 사용 요청
response String 쿠폰 사용 응답
(coupon_id의) id String 쿠폰 아이디
(coupon_id의) enable int 사용가능 여부
type String 쿠폰 타입
keyword String 키워드 쿠폰 키워드
desc String 쿠폰명
used int 쿠폰 상태
count int 쿠폰 수량
length int 쿠폰 길이
limit String 아이템 수량
prefix String 쿠폰 접미사
suffix String 쿠폰 접두사
store_id String 스토어 아이디 (google,one,apple,galaxy)
startedAt String 쿠폰 사용 시작일
endedAt String 쿠폰 사용 종료일
item_id String 아이템 아이디
store_item_id String 아이템 스토어 아이디
count int 아이템 수량

예시

요청 예시


curl --request GET \
  --url https://dashboard-api.gamepot.ntruss.com/v1/api/project/12a0f2ff-xxxx-xxxx-xxxx-9c13ef02f5fs/coupon/xxxxxx  \
  --header 'accept-language: ko' \
  --header 'x-api-key: 86dcgffae0641745432as02a8801ce5a5475f764fxxxxxxxxx'

응답 예시

{
  "status": 1,
  "result": {
    "id": "xxxxxxxxxxxxxxxx",
    "status": false,
    "enable": 1,
    "number": "xxxxxxxxxxxxxxxx",
    "userdata": "",
    "usedAt": null,
    "createdAt": "Wed May 13 2020 12:12:04 GMT+0900 (Korean Standard Time)",
    "request": null,
    "response": null,
    "coupon_id": {
      "id": "xxxxxxxxxxxxxxxx",
      "enable": 1,
      "type": "normal",
      "keyword": null,
      "desc": "Season 2 Update Pre-Reward Rewards",
      "used": 1,
      "count": 2010,
      "length": 7,
      "limit": null,
      "prefix": "",
      "suffix": "",
      "store_id": "",
      "startedAt": "Sun May 10 2020 16:35:00 GMT+0900 (Korean Standard Time)",
      "endedAt": "Sat May 23 2020 16:35:00 GMT+0900 (Korean Standard Time)",
      "items": [
        {
          "item_id": "xxxxxxxxxxxxxxxx",
          "store_item_id": "xxxxxxxxxxxxxxxx",
          "count": 10
        },
        {
          "item_id": "xxxxxxxxxxxxxxxx",
          "store_item_id": "xxxxxxxxxxxxxxxx",
          "count": 1
        }
      ]
    }
  }
}

Error code

Common error code that occurs when requesting Gamepot Open API.

parameter Explanation
status Error code (1: Refer to Error code in case of success or failure )
message Error details
Error code Explanation
-1 If you used a key that is not on the dashboard
-2 The key of the dashboard and the key of the header are different.
-3 When using a key deleted from the dashboard
-4 The dashboard used unused keys.
-5 If the key has expired
-6 If there is no project ID
{
  "status": -6,
  "message": "projectId was wrong."
}