User Postbacks Print

  • 0

Description

Used to get a list of the user (affiliate) postbacks.

URL: https://api2.cpapanel.com/api/v3/cpa/user_postbacks/

METHODS: GET

Request

Headers

Key

Value

Description

Content-Type

application/json

Request data type

Authorization

Api-key <User api-key>

Authorization type

Params

Field

Required

Validation rules

Type

Min length

Max length

Description

limit

No

-

Integer

1 digit

-

Limit for pagination

offset

No

-

Integer

1 digit

-

Offset for pagination

ordering

No

UserPostbacksOrdering validation

String

-

-

Order by field

created_start

No

Date

String

-

-

Filter by created date (start date)

created_end

No

Date

String

-

-

Filter by created date (end date)

offers

No

-

Integer

-

-

Filter by Offer ID

conversion_id

No

-

String

-

-

Filter by conversion id (UUID)

url

No

-

String

1

-

Filter by URL

fields*

No

-

Array

0 items

-

The array of fields for export

 

* only for export

Ordering supports the following fields/values:

created\-created
conversion__offer__id/-conversion__offer__id

 

Request example:

https://api2.advendor.net/api/v3/cpa/user_postbacks/?limit=50&ordering=-created&timezone=UTC&created_start=2020-09-01&created_end=2020-09-30

You can send statistics to export if specify ".export" suffix in URL

https://api2.advendor.net/api/v3/cpa/user_postbacks.export/?limit=50&ordering=-created&timezone=UTC&created_start=2020-09-01&created_end=2020-09-30

Response

Field

Condition

Type

Min length

Max length

Description

error

Wrong request

Integer

1 digit

-

Error code (look below)

fields

Wrong request

Array

1 item

-

Array with field names in request with the error

message

Wrong request

String

1 char

-

Error code description

results

Valid request

Array

-

-

List of UserPostback objects

count

Valid request

Integer

-

-

Count of available elements with filters

 

UserPostback object

(results)

Field

Condition

Type

Min length

Max length

Description

id

Always present

Integer

-

-

UserPostback ID

url

Always present

String

-

-

UserPostback URL

created

Always present

String

27 chars

27 chars

UserPostback created date

conversion

Always present

Object

-

-

Conversion object

conversion_comment

Always present

String

-

-

Conversion comment

http_code

Always present

Integer or null

-

-

Response HTTP code

error

Always present

String

-

-

Error message

old_values

Always present

Object or null

-

-

Conversion old values

new_values

Always present

Object

-

-

Conversion new values

 

Conversion object
(UserPostback object: conversion)

Field

Condition

Type

Min Length

Max Length

Description

id

Always present

String

-

-

Conversion ID (UUID)

goal

Always present

Object

-

-

Goal object

offer

Always present

Object

-

-

Offer object

 

Goal object
(Conversion object: goal)

Field

Condition

Type

Min Length

Max Length

Description

id

Always present

Integer

-

-

Goal ID

title

Always present

Object

-

-

GoalTitle object

 

GoalTitle object
(Goal object: title)

Field

Condition

Type

Min Length

Max Length

Description

id

Always present

Integer

1

-

Goal title ID

name

Always present

String

1 char

50 chars

Offer title name

abbr

Always present

String

-

50

Goal title abbreviation

 

Offer object
(Conversion object: offer)

Field

Condition

Type

Min Length

Max Length

Description

id

Always present

Integer

-

-

Offer ID

title

Always present

String

1 char

50 chars

Offer title

 

Values object
(UserPostback object: old_values, new_values)

Field

Condition

Type

Min length

Max length

Description

payout

Always present

Integer

-

-

Conversion payout

status

Always present

Integer

-

-

Status of conversion

Conversion statuses list:

  • 1 - Hold

  • 2 - Approved

  • 3 - Declined

Valid answer example:

Status code: 200

{
    "count": 3,
    "results": [
        {
            "conversion": {
                "goal": {
                    "id": 4102,
                    "title": {
                        "abbr": "DOI - PC",
                        "id": 27,
                        "name": "Confirmed Registration (DOI) - Promocode"
                    }
                },
                "id": "7d183882-e3c4-4775-bc3e-859a69160baa",
                "offer": {
                    "id": 11,
                    "title": "Test offer"
                }
            },
            "conversion_comment": "",
            "created": "2020-09-20T10:00:03.003606Z",
            "error": "Remote server error",
            "http_code": null,
            "id": 352911,
            "new_values": {
                "payout": 1.0,
                "status": 2
            },
            "old_values": {
                "payout": 1.0,
                "status": 1
            },
            "url": "http://example.com"
        },
        {
            "conversion": {
                "goal": {
                    "id": 4102,
                    "title": {
                        "abbr": "DOI - PC",
                        "id": 27,
                        "name": "Confirmed Registration (DOI) - Promocode"
                    }
                },
                "id": "7d183882-e3c4-4775-bc3e-859a69160baa",
                "offer": {
                    "id": 11,
                    "title": "Test offer"
                }
            },
            "conversion_comment": "",
            "created": "2020-09-20T10:00:02.313619Z",
            "error": "Remote server error",
            "http_code": null,
            "id": 352910,
            "new_values": {
                "payout": 1.0,
                "status": 2
            },
            "old_values": {
                "payout": 1.0,
                "status": 1
            },
            "url": "http://example.com"
        },
        {
            "conversion": {
                "goal": {
                    "id": 4102,
                    "title": {
                        "abbr": "DOI - PC",
                        "id": 27,
                        "name": "Confirmed Registration (DOI) - Promocode"
                    }
                },
                "id": "7d183882-e3c4-4775-bc3e-859a69160baa",
                "offer": {
                    "id": 11,
                    "title": "Test offer"
                }
            },
            "conversion_comment": "",
            "created": "2020-09-10T09:52:43.478343Z",
            "error": "Remote server error",
            "http_code": null,
            "id": 350943,
            "new_values": {
                "payout": 1.0,
                "status": 1
            },
            "old_values": null,
            "url": "http://example.com"
        }
    ]
}

 

Wrong answer example:

Status code: 401

{
    "error": -3,
    "message": "Token invalid or expired",
    "fields": [
        "detail"
    ]
}
 Full descriptions of errors (click here to expand...)
Common codes

Error code

Description

-1

Access denied

-2

Error parsing input JSON

-3

Token invalid or expired

-4

Unsupported media type in request

-5

Method not allowed

-6

Page not found

-7

Other unknown error

-8

Recaptcha error

 

Validation codes

Error code

Description

1

Field is required

2

Field cannot be null

3

Field cannot be blank

4

Field is invalid

5

Field contains too many characters (or values if it is an array)

6

Field contains less characters (or values if it is an array) than it is needed

7

Field contains greater value than it is needed

8

Field contains less value than it is needed

9

Field contains too large value (number decoded to string)

10

The total number of digits in the field is greater than allowed

11

The decimal places of digits in the field is greater than allowed

12

The digits before the decimal point in the field is greater than allowed

13

Expected a datetime but got a date

14

Invalid datetime for the used timezone

15

Expected a date but got a datetime

16

Field contains an invalid selection

17

The field does not contain a list of items

18

Field cannot be empty

19

The uploaded file is not an image or a damaged image

20

Object does not exist

21

Object is not unique

22

Deletion is protected. Object has links to other objects

23

File is too large


Was this answer helpful?
Back