MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

API versions

/api/v2/ is the current API. Authenticate with a bearer token from POST /api/v2/auth/login.

Legacy endpoints under /api/ (everything except /api/v2/) are deprecated. Support will end on 01.01.2027. Please migrate to /api/v2/.

Rate limits

All routes under /api/* are limited to 60 requests per minute per client IP. If you exceed this limit, the API responds with HTTP 429 Too Many Requests. Space out polling (for example, status/deposit sync jobs) and retry after a short delay when you receive 429.

Authenticating requests

This API is not authenticated.

API v2

Exchange affiliate credentials for an API v2 token pair.

Example request:
curl --request POST \
    "http://localhost:8003/api/v2/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"aff_id\": 123,
    \"aff_password\": \"12345678\"
}"
const url = new URL(
    "http://localhost:8003/api/v2/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "aff_id": 123,
    "aff_password": "12345678"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "...",
    "refresh_token": "...",
    "token_type": "Bearer",
    "expires_in": 86400,
    "refresh_expires_in": 2592000
}
 

Example response (401):


{
    "error": "Affiliate authorization failed!"
}
 

Request      

POST api/v2/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

aff_id   integer     

Affiliate's user id. Example: 123

aff_password   string     

Affiliate's password, same as the one used for main site authorization. (min:6) Example: 12345678

Rotate a refresh token into a fresh token pair.

Example request:
curl --request POST \
    "http://localhost:8003/api/v2/auth/refresh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"refresh_token\": \"...\"
}"
const url = new URL(
    "http://localhost:8003/api/v2/auth/refresh"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "refresh_token": "..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "...",
    "refresh_token": "...",
    "token_type": "Bearer",
    "expires_in": 86400,
    "refresh_expires_in": 2592000
}
 

Example response (401):


{
    "error": "Invalid or expired refresh token."
}
 

Request      

POST api/v2/auth/refresh

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

refresh_token   string     

The refresh token issued on login. Example: ...

Revoke the current user's token pair.

Example request:
curl --request POST \
    "http://localhost:8003/api/v2/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/v2/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Tokens revoked."
}
 

Example response (401):


{
    "error": "Unauthenticated."
}
 

Request      

POST api/v2/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Create lead (API v2) Endpoint for creating a lead. Authenticate with the bearer token obtained from POST /api/v2/auth/login; the affiliate is inferred from the token, so aff_id and aff_password are not required.

Example request:
curl --request POST \
    "http://localhost:8003/api/v2/leads" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"campaignID\": 960,
    \"firstName\": \"Test\",
    \"lastName\": \"McTesty\",
    \"email\": \"example@m.com\",
    \"language\": \"EN\",
    \"country\": \"US\",
    \"phone_number\": \"1234567890\",
    \"phone_code\": \"380\",
    \"password\": \"87654321\",
    \"key\": \"87654321\",
    \"affiliate\": 7,
    \"referer\": \"https:\\/\\/google.com\",
    \"lander\": \"https:\\/\\/google.com\",
    \"ip\": \"145.12.5.13\",
    \"landuuid\": \"...\"
}"
const url = new URL(
    "http://localhost:8003/api/v2/leads"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "campaignID": 960,
    "firstName": "Test",
    "lastName": "McTesty",
    "email": "example@m.com",
    "language": "EN",
    "country": "US",
    "phone_number": "1234567890",
    "phone_code": "380",
    "password": "87654321",
    "key": "87654321",
    "affiliate": 7,
    "referer": "https:\/\/google.com",
    "lander": "https:\/\/google.com",
    "ip": "145.12.5.13",
    "landuuid": "..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
    "result": 200,
    "success": true,
    "data": {
        "id": 457080,
        "url": "https://www.source.com/?token=example"
    },
    "lead_id": 457080,
    "email": "test-mail0684595@msn.com",
    "url": "https://www.source.com/?token=example",
    "autologin": "https://www.source.com/?token=example"
}
 

Request      

POST api/v2/leads

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

campaignID   integer     

Campaign id. Example: 960

firstName   string     

Lead customer's first name. (max: 100) Example: Test

lastName   string     

Lead customer's last name. (max: 100) Example: McTesty

email   string     

Lead customer's email. (max: 100) Example: example@m.com

language   string     

Language ISO 639-2. (max: 2) Example: EN

country   string     

Country ISO 3166 codes by alpha-2. (max: 2) Example: US

phone_number   string     

Lead customer's phone number without country code. (max: 20) Example: 1234567890

phone_code   string     

Lead customer's phone country calling code. (max: 10) Example: 380

password   string  optional    

Lead customer's password, usually autogenerated and used for autologin. Example: 87654321

key   string  optional    

Unique partner's click id. Example: 87654321

affiliate   integer     

To credit the lead to the token holder's affiliate account pass 1. Example: 7

referer   string  optional    

Attribute indicating the page where lead creation occurred. (max: 500) Example: https://google.com

lander   string  optional    

Page before the lead creation page. (max: 500) Example: https://google.com

ip   string  optional    

Customer's IP address. Sometimes is required, ask your manager. Example: 145.12.5.13

landuuid   string  optional    

Specific UUID of the land, ask your manager if you need it. Example: ...

Virtual endpoint to create a lead for test your settings Endpoint for creating a lead (It doesn't save any data just give you the response virtual data).

Example request:
curl --request POST \
    "http://localhost:8003/api/v2/leads/test?campaignID=rerum&firstName=Test&lastName=McTesty&email=example%40m.com&language=EN&country=US&referer=0&lander=0&phone_number=1234567890&phone_code=380&password=87654321&key=87654321&traffic_source=ABC123_AB_C&ip=145.12.5.13&affiliate=9&aff_id=qui&aff_password=2Wed%24Iof6327&landuuid=91888350-9c15-34b1-9d5a-f2601d8ed92d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/v2/leads/test"
);

const params = {
    "campaignID": "rerum",
    "firstName": "Test",
    "lastName": "McTesty",
    "email": "example@m.com",
    "language": "EN",
    "country": "US",
    "referer": "0",
    "lander": "0",
    "phone_number": "1234567890",
    "phone_code": "380",
    "password": "87654321",
    "key": "87654321",
    "traffic_source": "ABC123_AB_C",
    "ip": "145.12.5.13",
    "affiliate": "9",
    "aff_id": "qui",
    "aff_password": "2Wed$Iof6327",
    "landuuid": "91888350-9c15-34b1-9d5a-f2601d8ed92d",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200, Success):


{
    "result": 200,
    "success": true,
    "data": {
        "id": 457080,
        "url": "https://www.source.com/?token=example"
    },
    "lead_id": 457080,
    "email": "test-mail0684595@msn.com",
    "url": "https://www.source.com/?token=example",
    "autologin": "https://www.cloudflare.com/?token=example"
}
 

Request      

POST api/v2/leads/test

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

campaignID   string     

Campaign id. Example: rerum

firstName   string     

Lead customer's first name. (max: 100) Example: Test

lastName   string     

Lead customer's last name. (max: 100) Example: McTesty

email   string     

Lead customer's email. (max: 100) Example: example@m.com

language   string     

Language ISO 639-2. (max: 2) Example: EN

country   string     

Country ISO 3166 codes by alpha-2. (max: 2) Example: US

referer   integer  optional    

Attribute indicating the page where lead creation occurred. (max: 500) Example: 0

lander   integer  optional    

Page before the lead creation page. (max: 500) Example: 0

phone_number   string     

Lead customer's phone number without country code. (max: 20) Example: 1234567890

phone_code   string     

Lead customer's phone country calling code. (max: 10) Example: 380

password   string     

Lead customer's password, usually autogenerated and used for autologin. Example: 87654321

key   string  optional    

Unique partner's click id. Example: 87654321

traffic_source   string  optional    

Lead's traffic source. Example: ABC123_AB_C

ip   string  optional    

Customer's IP address. Sometimes is required, ask your manager. Example: 145.12.5.13

affiliate   integer  optional    

Required for Affiliate: Attribute that indicates that the lead should be credited to affiliate's account. Should always be {1} and followed by aff_id. Example: 9

aff_id   string  optional    

Required for Affiliate: Attribute that specifies which affiliate should be credited with the lead. Must be used if affiliate parameter is present. Your aff_id can be seen on the main site, on the right side of the nav bar. Example: qui

aff_password   string  optional    

Required for Affiliate: Affiliate's password, same as the one used for main site authorization. (min:8) Example: 2Wed$Iof6327

landuuid   string  optional    

Specific UUID of the land, ask your manager if you need it Example: 91888350-9c15-34b1-9d5a-f2601d8ed92d

Retrieve lead statuses Endpoint for getting lead response statuses. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).

Example request:
curl --request GET \
    --get "http://localhost:8003/api/v2/status?aff_id=123&aff_password=12345678GH&startDate=2023-01-01&finishDate=2023-02-01&page=11&per_page=4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/v2/status"
);

const params = {
    "aff_id": "123",
    "aff_password": "12345678GH",
    "startDate": "2023-01-01",
    "finishDate": "2023-02-01",
    "page": "11",
    "per_page": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "aff_id": "123",
            "lead_id": "XXXXXX",
            "first_name": "Test",
            "last_name": "Test",
            "email": "test0@gmail.com",
            "phone": "XXXXXXXXXXXXX",
            "created_at": "2025-05-30T12:00:00.000000Z",
            "status": "Not interested",
            "deposit_date": "0"
        }
    ],
    "next_page_url": "https://sferanetwork.com/api/status?page=2",
    "path": "https://sferanetwork.com/api/status",
    "per_page": 500,
    "prev_page_url": null,
    "to": 500,
    "total": 1100
}
 

Request      

GET api/v2/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

aff_id   string  optional    

optional Identifies which affiliate requests to see his leads (can be found on the main site, on the right side of the nav bar). Example: 123

aff_password   string  optional    

optional Affiliate's password, same as the one used for main site authorization. (min:8) Example: 12345678GH

startDate   string  optional    

YYYY-MM-DD Start of lead creation date range (inclusive). Applied only when finishDate is also provided. Example: 2023-01-01

finishDate   string  optional    

YYYY-MM-DD End of lead creation date range (inclusive, full day). Applied only when startDate is also provided. Example: 2023-02-01

page   integer  optional    

Page number. Default: 1 Example: 11

per_page   integer  optional    

Records per page. Default: 500. Max: 500 Example: 4

Retrieve deposits Endpoint for getting leads that ended up with deposits. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).

Example request:
curl --request GET \
    --get "http://localhost:8003/api/v2/deposits?aff_id=123&aff_password=12345678&startDate=2023-01-01&finishDate=2023-12-01&page=11&per_page=6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/v2/deposits"
);

const params = {
    "aff_id": "123",
    "aff_password": "12345678",
    "startDate": "2023-01-01",
    "finishDate": "2023-12-01",
    "page": "11",
    "per_page": "6",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "lead_id": "a91jsid7191jbc7s719a",
            "deposit_date": "1970-02-01 00:00:01",
            "amount": "1"
        }
    ],
    "next_page_url": "https://sferanetwork.com/api/deposits?page=2",
    "path": "https://sferanetwork.com/api/deposits",
    "per_page": 500,
    "prev_page_url": null,
    "to": 500,
    "total": 1100
}
 

Request      

GET api/v2/deposits

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

aff_id   string  optional    

optional Identifies which affiliate requests to see his leads (can be found on the main site, on the right side of the nav bar). Example: 123

aff_password   string  optional    

optional Affiliate's password, same as the one used for main site authorization. (min:8) Example: 12345678

startDate   string  optional    

YYYY-MM-DD Start of deposit date range (inclusive). Applied only when finishDate is also provided. Example: 2023-01-01

finishDate   string  optional    

YYYY-MM-DD End of deposit date range (inclusive, full day). Applied only when startDate is also provided. Example: 2023-12-01

page   integer  optional    

Page number. Default: 1 Example: 11

per_page   integer  optional    

Records per page. Default: 500. Max: 500 Example: 6

Legacy API

These endpoints are deprecated. Support will end on 01.01.2027. Prefer /api/v2/.

Create lead Endpoint for creating a lead (your aff_id can be found on the main site, on the right side of the nav bar).

deprecated

Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.

Example request:
curl --request POST \
    "http://localhost:8003/api/leads?campaignID=aspernatur&firstName=Test&lastName=McTesty&email=example%40m.com&language=EN&country=US&referer=0&lander=0&phone_number=1234567890&phone_code=380&password=87654321&key=87654321&traffic_source=ABC123_AB_C&ip=145.12.5.13&affiliate=18&aff_id=provident&aff_password=2Wed%24Iof6327&landuuid=fb58156e-6a8b-39ca-82ab-4207cb770d60" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/leads"
);

const params = {
    "campaignID": "aspernatur",
    "firstName": "Test",
    "lastName": "McTesty",
    "email": "example@m.com",
    "language": "EN",
    "country": "US",
    "referer": "0",
    "lander": "0",
    "phone_number": "1234567890",
    "phone_code": "380",
    "password": "87654321",
    "key": "87654321",
    "traffic_source": "ABC123_AB_C",
    "ip": "145.12.5.13",
    "affiliate": "18",
    "aff_id": "provident",
    "aff_password": "2Wed$Iof6327",
    "landuuid": "fb58156e-6a8b-39ca-82ab-4207cb770d60",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/leads

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

campaignID   string     

Campaign id. Example: aspernatur

firstName   string     

Lead customer's first name. (max: 100) Example: Test

lastName   string     

Lead customer's last name. (max: 100) Example: McTesty

email   string     

Lead customer's email. (max: 100) Example: example@m.com

language   string     

Language ISO 639-2. (max: 2) Example: EN

country   string     

Country ISO 3166 codes by alpha-2. (max: 2) Example: US

referer   integer  optional    

Attribute indicating the page where lead creation occurred. (max: 500) Example: 0

lander   integer  optional    

Page before the lead creation page. (max: 500) Example: 0

phone_number   string     

Lead customer's phone number without country code. (max: 20) Example: 1234567890

phone_code   string     

Lead customer's phone country calling code. (max: 10) Example: 380

password   string     

Lead customer's password, usually autogenerated and used for autologin. Example: 87654321

key   string  optional    

Unique partner's click id. Example: 87654321

traffic_source   string  optional    

Lead's traffic source. Example: ABC123_AB_C

ip   string  optional    

Customer's IP address. Sometimes is required, ask your manager. Example: 145.12.5.13

affiliate   integer  optional    

Required for Affiliate: Attribute that indicates that the lead should be credited to affiliate's account. Should always be {1} and followed by aff_id. Example: 18

aff_id   string  optional    

Required for Affiliate: Attribute that specifies which affiliate should be credited with the lead. Must be used if affiliate parameter is present. Your aff_id can be seen on the main site, on the right side of the nav bar. Example: provident

aff_password   string  optional    

Required for Affiliate: Affiliate's password, same as the one used for main site authorization. (min:8) Example: 2Wed$Iof6327

landuuid   string  optional    

Specific UUID of the land, ask your manager if you need it Example: fb58156e-6a8b-39ca-82ab-4207cb770d60

Virtual endpoint to create a lead for test your settings Endpoint for creating a lead (It doesn't save any data just give you the response virtual data).

deprecated

Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.

Example request:
curl --request POST \
    "http://localhost:8003/api/leads/test?campaignID=sed&firstName=Test&lastName=McTesty&email=example%40m.com&language=EN&country=US&referer=0&lander=0&phone_number=1234567890&phone_code=380&password=87654321&key=87654321&traffic_source=ABC123_AB_C&ip=145.12.5.13&affiliate=12&aff_id=qui&aff_password=2Wed%24Iof6327&landuuid=f7700044-66fb-3273-a58f-b65e75593309" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/leads/test"
);

const params = {
    "campaignID": "sed",
    "firstName": "Test",
    "lastName": "McTesty",
    "email": "example@m.com",
    "language": "EN",
    "country": "US",
    "referer": "0",
    "lander": "0",
    "phone_number": "1234567890",
    "phone_code": "380",
    "password": "87654321",
    "key": "87654321",
    "traffic_source": "ABC123_AB_C",
    "ip": "145.12.5.13",
    "affiliate": "12",
    "aff_id": "qui",
    "aff_password": "2Wed$Iof6327",
    "landuuid": "f7700044-66fb-3273-a58f-b65e75593309",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200, Success):


{
    "result": 200,
    "success": true,
    "data": {
        "id": 457080,
        "url": "https://www.source.com/?token=example"
    },
    "lead_id": 457080,
    "email": "test-mail0684595@msn.com",
    "url": "https://www.source.com/?token=example",
    "autologin": "https://www.cloudflare.com/?token=example"
}
 

Request      

POST api/leads/test

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

campaignID   string     

Campaign id. Example: sed

firstName   string     

Lead customer's first name. (max: 100) Example: Test

lastName   string     

Lead customer's last name. (max: 100) Example: McTesty

email   string     

Lead customer's email. (max: 100) Example: example@m.com

language   string     

Language ISO 639-2. (max: 2) Example: EN

country   string     

Country ISO 3166 codes by alpha-2. (max: 2) Example: US

referer   integer  optional    

Attribute indicating the page where lead creation occurred. (max: 500) Example: 0

lander   integer  optional    

Page before the lead creation page. (max: 500) Example: 0

phone_number   string     

Lead customer's phone number without country code. (max: 20) Example: 1234567890

phone_code   string     

Lead customer's phone country calling code. (max: 10) Example: 380

password   string     

Lead customer's password, usually autogenerated and used for autologin. Example: 87654321

key   string  optional    

Unique partner's click id. Example: 87654321

traffic_source   string  optional    

Lead's traffic source. Example: ABC123_AB_C

ip   string  optional    

Customer's IP address. Sometimes is required, ask your manager. Example: 145.12.5.13

affiliate   integer  optional    

Required for Affiliate: Attribute that indicates that the lead should be credited to affiliate's account. Should always be {1} and followed by aff_id. Example: 12

aff_id   string  optional    

Required for Affiliate: Attribute that specifies which affiliate should be credited with the lead. Must be used if affiliate parameter is present. Your aff_id can be seen on the main site, on the right side of the nav bar. Example: qui

aff_password   string  optional    

Required for Affiliate: Affiliate's password, same as the one used for main site authorization. (min:8) Example: 2Wed$Iof6327

landuuid   string  optional    

Specific UUID of the land, ask your manager if you need it Example: f7700044-66fb-3273-a58f-b65e75593309

Retrieve lead statuses Endpoint for getting lead response statuses. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).

deprecated

Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.

Example request:
curl --request GET \
    --get "http://localhost:8003/api/status?aff_id=123&aff_password=12345678GH&startDate=2023-01-01&finishDate=2023-02-01&page=17&per_page=12" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/status"
);

const params = {
    "aff_id": "123",
    "aff_password": "12345678GH",
    "startDate": "2023-01-01",
    "finishDate": "2023-02-01",
    "page": "17",
    "per_page": "12",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "aff_id": "123",
            "lead_id": "XXXXXX",
            "first_name": "Test",
            "last_name": "Test",
            "email": "test0@gmail.com",
            "phone": "XXXXXXXXXXXXX",
            "created_at": "2025-05-30T12:00:00.000000Z",
            "status": "Not interested",
            "deposit_date": "0"
        }
    ],
    "next_page_url": "https://sferanetwork.com/api/status?page=2",
    "path": "https://sferanetwork.com/api/status",
    "per_page": 500,
    "prev_page_url": null,
    "to": 500,
    "total": 1100
}
 

Request      

GET api/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

aff_id   string  optional    

optional Identifies which affiliate requests to see his leads (can be found on the main site, on the right side of the nav bar). Example: 123

aff_password   string  optional    

optional Affiliate's password, same as the one used for main site authorization. (min:8) Example: 12345678GH

startDate   string  optional    

YYYY-MM-DD Start of lead creation date range (inclusive). Applied only when finishDate is also provided. Example: 2023-01-01

finishDate   string  optional    

YYYY-MM-DD End of lead creation date range (inclusive, full day). Applied only when startDate is also provided. Example: 2023-02-01

page   integer  optional    

Page number. Default: 1 Example: 17

per_page   integer  optional    

Records per page. Default: 500. Max: 500 Example: 12

Retrieve deposits Endpoint for getting leads that ended up with deposits. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).

deprecated

Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.

Example request:
curl --request GET \
    --get "http://localhost:8003/api/deposits?aff_id=123&aff_password=12345678&startDate=2023-01-01&finishDate=2023-12-01&page=3&per_page=16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8003/api/deposits"
);

const params = {
    "aff_id": "123",
    "aff_password": "12345678",
    "startDate": "2023-01-01",
    "finishDate": "2023-12-01",
    "page": "3",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "lead_id": "a91jsid7191jbc7s719a",
            "deposit_date": "1970-02-01 00:00:01",
            "amount": "1"
        }
    ],
    "next_page_url": "https://sferanetwork.com/api/deposits?page=2",
    "path": "https://sferanetwork.com/api/deposits",
    "per_page": 500,
    "prev_page_url": null,
    "to": 500,
    "total": 1100
}
 

Request      

GET api/deposits

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

aff_id   string  optional    

optional Identifies which affiliate requests to see his leads (can be found on the main site, on the right side of the nav bar). Example: 123

aff_password   string  optional    

optional Affiliate's password, same as the one used for main site authorization. (min:8) Example: 12345678

startDate   string  optional    

YYYY-MM-DD Start of deposit date range (inclusive). Applied only when finishDate is also provided. Example: 2023-01-01

finishDate   string  optional    

YYYY-MM-DD End of deposit date range (inclusive, full day). Applied only when startDate is also provided. Example: 2023-12-01

page   integer  optional    

Page number. Default: 1 Example: 3

per_page   integer  optional    

Records per page. Default: 500. Max: 500 Example: 16