Billing Sales Statistics 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.

Display billing sales statistics.

request

GET https://dashboard-api.gamepot.ntruss.com/v1/api/project/{projectId}/purchase/statistics?startDate={startDate}&endDate={endDate}&currency={currency}
Item type Required Explanation Remark
projectId String O ProjectId in GamePot SDK
startDate String X Payment sales statistics search start date YYYY-MM-DD
endDate String X Payment Sales Statistics Search End Date YYYY-MM-DD
currency String X Payment Sales Statistics Currency Search (all ...) It follows ISO 4217 regulations.
Note

If startDate and endDate are not included in the query, data for the last 30 days is retrieved.

Request header

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

answer

Field name type Explanation
status Int Result value (1: success)
totalCount Int Number of search result values
currencyList String Currency list
We follow ISO 4217 regulations.
date String Statistics date
count String Sales statistics amount

example

Request example


curl --request GET \
  --url https://dashboard-api.gamepot.ntruss.com/v1/api/project/12a0f2ff-xxxx-xxxx-xxxx-9c13ef02f5fs/purchase/statistics?startDate=2020-05-01&endDate=2020-06-01&currency=all \
  --header 'accept-language: ko' \
  --header 'x-api-key: 86dcgffae0641745432as02a8801ce5a5475f764fxxxxxxxxx'

Example response

"status": 1,
  "result": {
    "totalCount": 13,
    "currencyList": [
      "KRW",
      "USD"
    ],
    "edges": [
      {
        "node": {
          "date": "2020-05-01",
          "count": 0
        }
      },
      {
        "node": {
          "date": "2020-05-02",
          "count": 0
        }
      },

...

      {
        "node": {
          "date": "2020-05-13",
          "count": 4008857.31
        }
      }
    ]
  }
}

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."
}

This is the error code that occurs when the payment sales statistics inquiry API is requested.

Error code Explanation
-11 If the format of the startDate value is incorrect, only YYYY-MM-DD format is possible
-12 If the format of the endDate value is incorrect, only YYYY-MM-DD format is possible