• API 레퍼런스

Revenue Report

레비뉴 리포트(Revenue Report)는 매출에 관한 다양한 지표를 확인할 수 있는 통계 리포트입니다. 에어브릿지 사용자는 이 리포트에서 설정한 기간에 앱을 설치하거나 딥링크로 앱에 유입된 유저가 발생시킨 매출 관련 성과를 일자별(Day N)로 확인할 수 있습니다.

또한, 요청 횟수에 대한 제한이 없어 필요할 때마다 자유롭게 리포트를 생성할 수 있습니다.


리포트 생성하기

POST

https://api.airbridge.io/reports/api/v3/apps/{app_name}/revenue/query

Revenue Report의 통계 데이터를 요청합니다.

해당 API를 호출하여 task_id를 생성한 뒤, 생성한 task_id를 '리포트 가져오기' 호출에 사용하여 요청 상황을 확인하고 데이터를 확인할 수 있습니다. 리포트 결과는 요청에 따라 최대 5분까지 소요될 수 있습니다.

rate limit: 일반적인 사용량에는 별도의 제한이 없습니다. 다만, 서비스 안정성을 위협하는 과도한 요청이 감지될 경우, 일시적으로 429 Too Many Requests 응답이 반환될 수 있습니다.

Request

Headers

Accept-Language
string

API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.

Content-Type
string

리소스의 미디어 타입을 나타냅니다. 기본값으로 application/json을 사용합니다.

Authorization
string

API 요청에 사용하는 키값입니다. 키값 생성 및 조회 방법을 확인하여 획득할 수 있습니다.

Path Params

app_name
필수string

에어브릿지 앱 이름(App Name)

Body Params

from
필수string

요청할 리포트 데이터의 시작일.

  • YYYY-MM-DD 형태입니다.

  • 에어브릿지 앱의 타임존이 적용된 날짜이어야 합니다.

to
필수string

요청할 리포트 데이터의 종료일.

  • YYYY-MM-DD 형태입니다.

  • 에어브릿지 앱의 타임존이 적용된 날짜이어야 합니다.

  • 현재 날짜까지 설정할 수 있으며 한 번에 조회할 수 있는 최대 기간은 92일입니다.

cohorts
object[]

최대 1개의 코호트를 설정할 수 있습니다.

여기에서 코호트 코드 예시를 확인할 수 있습니다.

groupBy
필수object

그룹바이는 조회할 메트릭의 수치를 나누는 기준입니다.
조회에 사용할 그룹바이 항목 혹은 코호트를 설정할 수 있습니다.

granularity
필수enum

분석 기간 주기.

ENUM VALUES
day

일별로 데이터를 분석합니다.

week

주별로 데이터를 분석합니다. 시작일로부터 7일 단위로 계산됩니다.

month

월별로 데이터를 분석합니다. 시작일로부터 다음달 같은 일자까지를 같은 달로 계산합니다. 예를 들어 3월 10일이 시작일이면 4월 10일까지를 같은 달로 봅니다.

intervalsPeriod
integer

주기에 따라 최대로 제공되는 구간 개수.

레비뉴 리포트 결과는 주기에 따라 조회 기간이 여러 구간으로 나뉘어 제공됩니다.

  • 주기가 day, week, month면 기본값으로 각각 30, 11, 5를 사용합니다.

  • 주기가 day, week, month면 최댓값은 각각 120, 52, 36입니다. 최솟값은 모두 0입니다.

  • 결과는 0번째 구간부터 시작합니다.

startEvents
필수enum[]

설정한 기간에 유저가 유입되면서 발생한 이벤트.

스타트 이벤트를 실행하지 않은 유저는 레비뉴 리포트의 분석 대상에서 제외됩니다.

ENUM VALUES
app_install

Install (App). 선택 기간 내 발생한 Install 이벤트.

app_deeplink_open

Deeplink Open (App). 선택 기간 내 발생한 Deeplink Open 이벤트.

app_deeplink_pageview

Deeplink Pageview (App). 선택 기간 내 발생한 Deeplink Pageview 이벤트.

app_sign_up

회원가입 (App). 선택 기간 내 발생한 앱 회원가입 이벤트.

app_sign_in

로그인 (App). 선택 기간 내 발생한 앱 로그인 이벤트.

returnEvents
필수enum[]

스타트 이벤트를 실행한 유저가 발생시킨 리턴 이벤트. 서비스 또는 캠페인 특성에 따라 여러 개의 리턴 이벤트를 설정할 수 있습니다.

ENUM VALUES
app_order_complete

구매 완료 (App). Start Event를 수행한 사용자 중 선택 기간 내 수행한 구매 완료 이벤트.

app_first_order_complete

첫 구매 완료 (App). Start Event를 수행한 사용자 중 선택 기간 내 수행한 첫 구매 이벤트.

app_ad_impression

Ad Impression (App). Start Event를 수행한 사용자 중 선택 기간 내 수행한 광고 노출 이벤트.

app_ad_click

광고 클릭 (App). Start Event를 수행한 사용자 중 선택 기간 내 수행한 광고 클릭 이벤트.

app_subscribe

구독 (App). Start Event를 수행한 사용자 중 선택 기간 내 수행한 구독 이벤트.

metric
필수enum

레비뉴 리포트 메트릭.

스타트 이벤트와 레비뉴 이벤트를 실행한 유저를 대상으로 아래의 메트릭을 일자별로 계산할 수 있습니다.

ENUM VALUES
app_revenue

Revenue (App). 앱에서 발생한 결제의 매출액 (현지 통화기준). cumulative, on-day 집계 방식을 지원합니다.

app_user_count

User Count (App). 레비뉴 이벤트를 실행한 고유 유저수

app_event_count

Event Count (App). 레비뉴 이벤트 횟수

app_roas

ROAS (App). 광고 비용당 매출. 마케팅 활동에 지출한 비용 대비 매출액 (현지 통화 기준). cumulative 집계 방식만 지원합니다.

app_arpu

ARPU (App). 유저당 평균 매출액 (현지 통화기준). cumulative 집계 방식만 지원합니다.

app_arppu

ARPPU (App). 결제 유저(Paying User)당 평균 매출액.

aggregationType
필수enum

데이터의 집계 방식. [참고]

ENUM VALUES
cumulative

누적 집계. 분석 기간 첫 날(Day 0)부터 마지막 날(Day N)까지의 수치를 누적합니다.

on-day

분절 집계. 수치를 누적하지 않고 날짜 단위로 분절합니다.

filters
필수object[]

'그룹바이'로 제공하는 항목들에 대한 필터.

조건을 만족하는 데이터에 대한 통계 데이터를 리포트에서 조회할 수 있습니다.

sorts
필수object[]

'그룹바이' 또는 '메트릭'을 기준으로 리포트 데이터를 정렬할 수 있습니다.

resultSpec
object

결과 값의 형태를 선택할 수 있습니다.

Request
curl -X POST 'https://api.airbridge.io/reports/api/v3/apps/{app_name}/revenue/query' \ -H 'Accept-Language: ko' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \ -d '{"from":"2022-11-04","to":"2022-11-11","groupBy":{"fields":["channel"]},"granularity":"day","intervalsPeriod":30,"startEvents":["app_install"],"returnEvents":["app_order_complete"],"metric":"app_revenue","aggregationType":"cumulative","filters":[{"field":"campaign","filterType":"IN","values":["App"]}],"sorts":[{"fieldName":"totalRevenue","isAscending":true}],"resultSpec":{"csv":{"includesTotal":true}}}'
Payload
{ "from": "2022-11-04", "to": "2022-11-11", "groupBy": { "fields": [ "channel" ] }, "granularity": "day", "intervalsPeriod": 30, "startEvents": [ "app_install" ], "returnEvents": [ "app_order_complete" ], "metric": "app_revenue", "aggregationType": "cumulative", "filters": [ { "field": "campaign", "filterType": "IN", "values": [ "App" ] } ], "sorts": [ { "fieldName": "totalRevenue", "isAscending": true } ], "resultSpec": { "csv": { "includesTotal": true } }}

Response

200SUCCESS

400ERROR

Response
{ "data": { "taskId": "5e286bd4-b4b1-4c04-8f6a-asdf1234zxcv" }}
Response
{}

리포트 가져오기

GET

https://api.airbridge.io/reports/api/v3/apps/{app_name}/revenue/query/{task_id}

비동기 요청 상태

비동기 요청 상태는 API 요청 결과의 task.status로 확인할 수 있습니다.

안내 메세지(Notification)

집계 과정에서 일부 데이터를 제거한 경우, 결과 반환 시 notification[0].code에 해당 사유를 담아 반환합니다.

Request

Headers

Accept-Language
string

API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.

Content-Type
string

리소스의 미디어 타입을 나타냅니다. 기본값으로 application/json을 사용합니다.

Authorization
string

API 요청에 사용하는 키값입니다. 키값 생성 및 조회 방법을 확인하여 획득할 수 있습니다.

Path Params

app_name
필수string

에어브릿지 앱 이름(App Name)

task_id
필수string

'리포트 생성하기' API의 결과값에서 반환한 task_id입니다.

Query Params

skip
number

결과값에서 건너뛸 Row의 수.

결과값에서 처음 N개의 Row를 제외하고 가져옵니다.

기본값은 0 입니다.

size
number

반환할 Row 수.

skip으로 건너뛴 결과의 다음부터 N개의 Row를 가져옵니다.

기본값은 50입니다.

예시) ?skip=200&size=100

이면 처음 200개를 건너뛰고 201번쨰부터 300번째 까지의 Row를 가져옵니다.

Request
curl -X GET 'https://api.airbridge.io/reports/api/v3/apps/{app_name}/revenue/query/{task_id}?skip=0&size=50' \ -H 'Accept-Language: ko' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}'

Response

200SUCCESS

404ERROR

Response
{ "data": { "stats": { "rows": [ { "rows": [ { "date": "2021-11-01", "total": { "totalCost": { "value": 0 }, "totalRevenue": { "value": 10 }, "totalUniqueUsers": { "value": 1, "isMasked": true } }, "values": [ { "value": 1, "isMasked": false }, { "value": 2, "isMasked": false }, { "value": 3, "isMasked": false }, { "value": 4, "isMasked": false } ] } ], "total": { "rows": [ { "value": 1, "isMasked": false }, { "value": 2, "isMasked": false }, { "value": 3, "isMasked": false }, { "value": 4, "isMasked": false } ], "totalCost": { "value": 0 }, "totalRevenue": { "value": 10.45 }, "totalUniqueUsers": { "value": 1, "isMasked": false } }, "metadata": [ "<groupBy>" ] } ] }, "status": "SUCCESS", "taskId": "5e286bd4-b4b1-4c04-8f6a-670dc7ce637d", "endedAt": "2022-01-17T19:10:00.286939+09:00", "hasNext": false, "metadata": { "totalCount": 48 } }, "notification": [ { "code": "AGG_DATA_MASKING_BY_FACEBOOK", "type": "info", "message": "some data is masked by facebook privacy policy." } ]}

메타데이터 가져오기 (Metric)

GET

https://api.airbridge.io/dataspec/v1/apps/{app_name}/revenue-report/metrics

사용할 수 있는 리포트 메트릭을 조회합니다. [참고]

Request

Headers

Accept-Language
string

API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.

Content-Type
string

리소스의 미디어 타입을 나타냅니다. 기본값으로 application/json을 사용합니다.

Authorization
string

API 요청에 사용하는 키값입니다. 키값 생성 및 조회 방법을 확인하여 획득할 수 있습니다.

Path Params

app_name
필수string

에어브릿지 앱 이름(App Name)

Request
curl -X GET 'https://api.airbridge.io/dataspec/v1/apps/{app_name}/revenue-report/metrics' \ -H 'Accept-Language: ko' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}'

Response

200SUCCESS

404ERROR

입력한 필드에 오류가 있거나 해당하는 리소스가 없습니다.

Response
{ "data": [ { "name": "Metric", "metrics": [ { "key": "app_revenue", "name": "Revenue", "description": "Sum of value generated from revenue events", "valueType": "number", "aggregationType": [ "cumulative", "on-day" ] }, { "key": "app_user_count", "name": "User Count", "description": "The total number of unique users who performed revenue events", "valueType": "integer", "aggregationType": [ "on-day", "unique-cumulative" ] } ] }, { "name": "Sub Metric", "metrics": [ { "key": "customer_acquisition_cost", "name": "CAC", "description": "Customer Acquisition Cost; the average cost to acquire a user who performed Start Event within the set date range<br>Total Cost/Users", "valueType": "number", "aggregationType": null }, { "key": "start_event_users", "name": "Users", "description": "The number of users who performed Start Event to open the app within the set date range", "valueType": "integer", "aggregationType": null } ] } ]}
Response
{ "type": "about:blank", "title": "Not Found", "status": 404, "traceId": "1-000000-000000000000000"}

메타데이터 가져오기 (GroupBy)

GET

https://api.airbridge.io/dataspec/v1/apps/{app_name}/revenue-report/groupbys

사용할 수 있는 리포트 그룹바이를 조회합니다. [참고]

Request

Headers

Accept-Language
string

API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.

Content-Type
string

리소스의 미디어 타입을 나타냅니다. 기본값으로 application/json을 사용합니다.

Authorization
string

API 요청에 사용하는 키값입니다. 키값 생성 및 조회 방법을 확인하여 획득할 수 있습니다.

Path Params

app_name
필수string

에어브릿지 앱 이름(App Name)

Request
curl -X GET 'https://api.airbridge.io/dataspec/v1/apps/{app_name}/revenue-report/groupbys' \ -H 'Accept-Language: ko' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}'

Response

200SUCCESS

404ERROR

입력한 필드에 오류가 있거나 해당하는 리소스가 없습니다.

Response
{ "data": [ { "name": "Event Details", "fields": [ { "key": "is_first_event_per_user_id", "name": "Is First Event per User ID", "description": "Boolean type data to show whether the event has happened in the past. (per user id)\n- true: First Event. \n- false: Not the First Event\n\n(Both Web/App Event Available)", "example": "true", "isFilter": true, "type": "boolean", "isCost": false }, { "key": "is_first_event_per_device_id", "name": "Is First Event per Device ID", "description": "Boolean type data to show whether the event has happened in the past. (per airbridge device id)\n- true: First Event. \n- false: Not the First Event\n\n(App Event Available Only)", "example": "true", "isFilter": true, "type": "boolean", "isCost": false } ] }, { "name": "Touchpoint", "fields": [ { "key": "channel", "name": "Channel", "description": "The media source of the touchpoint.", "example": "moloco", "isFilter": true, "type": "string", "isCost": true }, { "key": "campaign", "name": "Campaign", "description": "The campaign that generated the touchpoint. The campaign name entered in SAN or collected by the campaign parameter of the tracking link.", "example": "2018_summer_campaign", "isFilter": true, "type": "string", "isCost": true } ] } ]}
Response
{ "type": "about:blank", "title": "Not Found", "status": 404, "traceId": "1-000000-000000000000000"}

메타데이터 가져오기 (Event)

GET

https://api.airbridge.io/dataspec/v1/apps/{app_name}/revenue-report/events

사용할 수 있는 리포트 이벤트를 조회합니다. [참고]

Request

Headers

Accept-Language
string

API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.

Content-Type
string

리소스의 미디어 타입을 나타냅니다. 기본값으로 application/json을 사용합니다.

Authorization
string

API 요청에 사용하는 키값입니다. 키값 생성 및 조회 방법을 확인하여 획득할 수 있습니다.

Path Params

app_name
필수string

에어브릿지 앱 이름(App Name)

Request
curl -X GET 'https://api.airbridge.io/dataspec/v1/apps/{app_name}/revenue-report/events' \ -H 'Accept-Language: ko' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}'

Response

200SUCCESS

404ERROR

입력한 필드에 오류가 있거나 해당하는 리소스가 없습니다.

Response
{ "data": [ { "name": "Return Event", "events": [ { "subGroup": "App Standard Event", "key": "app_first_order_complete", "name": "First Order Complete (App)", "description": "First Order Complete (App) event performed by users who performed the start event within the set date range" }, { "subGroup": "App Standard Event", "key": "app_order_complete", "name": "Order Complete (App)", "description": "Order Complete (App) event performed by users who performed the start event within the set date range" } ] }, { "name": "Start Event", "events": [ { "subGroup": "", "key": "app_install", "name": "Install (App)", "description": "Install occurred within the set date range" }, { "subGroup": "", "key": "app_deeplink_open", "name": "Deeplink Open (App)", "description": "Deeplink Open occurred within the set date range" } ] } ]}
Response
{ "type": "about:blank", "title": "Not Found", "status": 404, "traceId": "1-000000-000000000000000"}