WhoCPA API documentation

GET https://whocpa.asia/api/goal

List of goals for offer(s)

Request parameters

Parameter Type Description
offer_id int or array_int Offer id
is_active bool Show only active goals

Note: the highlighted parameters are required.

Request example

GET https://whocpa.asia/api/goal/?
      offer_id=6397,6498,6142,6390,6332,6260,6151,6292,6182,6400,6287,6012
     &per_page=10

Response description

The response field objects Contains a list of goals that match the specified filter. It is necessary to use pagination.

Field Description
id Goal ID
offer_id ID of the offer this goal belongs to
description Goal description
is_active Is the target active
is_auto_approve Are targeted actions approved automatically
category Goal category. Decoding codes:
  • 0 uncategorized
  • 34 CPA
  • 38 CPL
currency_id Currency ID. A complete list of used currencies is given by the method currency / list
date_created Goal creation date
is_otol Flag at which for one "tid" there can be only one action (one tid one lead)
hold_period 22
money_type Payment type.
  • 1 fixed
  • 2 percent
  • 3 float
payment

The field value should be interpreted differently, depending on the valuemoney_type.

If money_type == 1 , that is, the payment is fixed, then the payment field contains a specific amount in the currency currency_id .

If money_type == 2 , that is, payment is expressed as a percentage of the transaction amount, then the field contains the number of percent.

If money_type == 3 , that is, the amount depends on the decision of the advertiser, the field will contain a range of payments, or a single entry (type: line). Examples:

  • 16% - 28%
  • $1.7
  • $1.5 - $3.4