Notifying CPA achievement

In a game, when a user achieves the CPA registered in the Promotion Console (Hive Console > Promotion), you can send the information to Hive Server to pay reward to the user. Please call from the game server to the promotion server for the CPA achievement notification.

  • Request URL
    Common URL https://promotion.qpyou.cn/api/cpa
    Sandbox URL https://sandbox-promotion.qpyou.cn/api/cpa
    HTTP Method POST
    Content-Type text/html
    Data Format JSON
  • Header
    Field Name Description Type Required
    Authorization CertificationKey valid through Bearer Authorization String N
  • Header
    Field Name Description Type Required
    Authorization CertificationKey valid through Bearer Authorization String N
  • Request
    Field Name Description Type Required
    appid App ID of the game that achieved CPA String Y
    vid or uid Required to use one, vid or uid - vid: Player ID when using Authentication v4. VID when using Authentication v1 - uid: User ID managed by platform such as HIVE ID and Kakao App Center ID String Y
    server_id The value to distinguish the server of game users String Y
    cpa_code CPA code in progress (Required to check with UA Operation PIC) String Y
    cpa_date CPA achievement time, Korea Standard Time (KST) (Default: API-implementing time) String N
  • Response
    Field Name Description Type
    result_code The result of request. 0=Success Integer
    result_msg Result message String
  • Sample Code

    • Call
    curl -L -v
    -d '{"appid":"com.com2us.hivesdk.normal.freefull.google.global.android.common", "vid":"300000011", "server_id":"kr", "cpa_code":"113", "cpa_date":"2022-03-15 12:00:00"}'
    -H "Content-Type: application/json"
    https://sandbox-promotion.qpyou.cn/api/cpa
    
    • Request
    > POST /api/cpa HTTP/1.1
    > User-Agent: curl/7.29.0
    > Host: sandbox-promotion.qpyou.cn
    > Accept: /
    > Content-Type: application/json
    > Content-Length: 164
    
    • Response
    < HTTP/1.1 200 OK
    < Server: nginx
    < Date: Tue, 15 Mar 2022 03:17:10 GMT
    < Content-Type: text/html; charset=UTF-8
    {"result_code":0,"result_message":"Success."}