Get affiliate customer performance
curl --request GET \
--url https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"currency": "USD",
"shop_currency": "<string>",
"customer": {
"name": "<string>",
"email": "<string>"
},
"affiliate_link": {
"id": "<string>",
"code": "<string>",
"url": "<string>",
"is_active": true,
"is_approved": true,
"status": "<string>",
"created_at": "<string>",
"affiliate_revenue_percent_override": 123,
"affiliate_customer_discount_percent_override": 123,
"tier_id": "<string>"
},
"affiliate_links": [
{
"id": "<string>",
"label": "<string>",
"code": "<string>",
"url": "<string>",
"status": "<string>",
"is_primary": true,
"is_active": true,
"is_approved": true,
"requested_affiliate_revenue_percent": 123,
"requested_affiliate_customer_discount_percent": 123,
"affiliate_revenue_percent_override": 123,
"affiliate_customer_discount_percent_override": 123,
"total_clicks": 123,
"total_sales": 123,
"total_revenue": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"stats": {
"sales": 123,
"revenue": 123,
"commission": 123,
"pending": 123
},
"commissions": [
{
"id": "<string>",
"invoice_uniqid": "<string>",
"status": "<string>",
"base_amount": 123,
"commission_amount": 123,
"created_at": "<string>",
"paid_at": "<string>",
"converted_at": "<string>"
}
],
"products": [
{
"product_id": "<string>",
"product_title": "<string>",
"total_quantity": 123,
"total_revenue": 123,
"total_commission": 123
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}Affiliates
Get affiliate customer performance
Developer API operation for GET /dev/v1/affiliates/customers//performance.
GET
/
dev
/
v1
/
affiliates
/
customers
/
{customerId}
/
performance
Get affiliate customer performance
curl --request GET \
--url https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/affiliates/customers/{customerId}/performance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"currency": "USD",
"shop_currency": "<string>",
"customer": {
"name": "<string>",
"email": "<string>"
},
"affiliate_link": {
"id": "<string>",
"code": "<string>",
"url": "<string>",
"is_active": true,
"is_approved": true,
"status": "<string>",
"created_at": "<string>",
"affiliate_revenue_percent_override": 123,
"affiliate_customer_discount_percent_override": 123,
"tier_id": "<string>"
},
"affiliate_links": [
{
"id": "<string>",
"label": "<string>",
"code": "<string>",
"url": "<string>",
"status": "<string>",
"is_primary": true,
"is_active": true,
"is_approved": true,
"requested_affiliate_revenue_percent": 123,
"requested_affiliate_customer_discount_percent": 123,
"affiliate_revenue_percent_override": 123,
"affiliate_customer_discount_percent_override": 123,
"total_clicks": 123,
"total_sales": 123,
"total_revenue": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"stats": {
"sales": 123,
"revenue": 123,
"commission": 123,
"pending": 123
},
"commissions": [
{
"id": "<string>",
"invoice_uniqid": "<string>",
"status": "<string>",
"base_amount": 123,
"commission_amount": 123,
"created_at": "<string>",
"paid_at": "<string>",
"converted_at": "<string>"
}
],
"products": [
{
"product_id": "<string>",
"product_title": "<string>",
"total_quantity": 123,
"total_revenue": 123,
"total_commission": 123
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}