MENU navbar-image

Introduction

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

Authenticating requests

This API is not authenticated.

Agency Earnings

Get agency earnings

requires authentication

Returns agency earnings grouped by date. if from and to query parameters have been provided it will return the agency earning during this period of time.

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/dashboard/nam?from=2019-01-01&to=2019-01-02" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/dashboard/nam"
);

const params = {
    "from": "2019-01-01",
    "to": "2019-01-02",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "dates": [
        {
            "date": "2022-04-10",
            "user_earnings": 2349774,
            "agency_earnings": 0,
            "agency_earnings_avg": 0
        },
        {
            "date": "2022-04-11",
            "user_earnings": "1713475",
            "agency_earnings": "0",
            "agency_earnings_avg": 0
        },
        {
            "date": "2022-04-12",
            "user_earnings": "2397901",
            "agency_earnings": "0",
            "agency_earnings_avg": 0
        }
    ],
    "total_agency_earnings": 2655,
    "total_agency_earnings_formatted": "26.55 €",
    "total_user_earnings": 78542586,
    "total_user_earnings_formatted": "785 425.86 €",
    "active_users": 953,
    "agency_avg_earnings": 0.0036999999999999997,
    "nr_of_posts": 3267
}
 

Request      

GET agency/dashboard/{clientId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   string   

Example: nam

Query Parameters

from   string  optional  

Date (Y-m-d). Must be a valid date. Example: 2019-01-01

to   string  optional  

Date (Y-m-d). Must be a valid date. Example: 2019-01-02

Agency login

Login as an agency

Return the current logged in user info or unauthorized error if the user login info is incorrect or if the user doesn't have permission

Example request:
curl --request POST \
    "https://api.metapic.com/agencies/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"email\": \"example@gmail.com\",
    \"password\": \"E&yV?H:0sdA+3\"
}"
const url = new URL(
    "https://api.metapic.com/agencies/login"
);

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

let body = {
    "email": "example@gmail.com",
    "password": "E&yV?H:0sdA+3"
};

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

Example response (200):


{
    "id": "{user_id}",
    "username": "",
    "email": "example@metapic.com",
    "phone": null,
    "created_at": "2022-08-02 15:23:53",
    "updated_at": "2022-08-15 13:17:56",
    "admin": 1,
    "last_active": "2022-08-15T11:17:56.359046Z",
    "first_name": "",
    "surname": "",
    "vat_no": null,
    "country": "",
    "city": "",
    "address": "",
    "postcode": "",
    "tier_pricing_type": "",
    "config": "",
    "sign_user_agreement": "2022-08-02 15:23:55",
    "revenue_tier_id": 107,
    "recruitment_utm": null,
    "access_token": "{ access_token }",
    "is_suspended": false,
    "is_verified": true,
    "revenue_tier": {
        "id": 107,
        "created_at": "2018-12-12 14:21:45",
        "updated_at": "2021-12-01 12:05:56",
        "client_id": 79,
        "revenue_share": "0.00",
        "instagram_revenue_share": "0.00",
        "name": "Not Approved"
    },
    "client": {
        "id": 79,
        "client_id": "949469247648506",
        "payment_organization_id": null,
        "name": "Metapic GB",
        "created_at": "2018-12-12 14:21:45",
        "updated_at": "2021-08-03 12:48:21",
        "own_paymentsystem": 0,
        "config": "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}",
        "user_mail_config": {
            "accepted": "uk-welcome-to-metapic",
            "registered": "we-ve-received-your-application"
        },
        "feed": "live_gb",
        "locale": "GB",
        "revenue_model": "blog_percentage",
        "revenue_share": "0.00",
        "store_group_id": 17,
        "default_revenue_tier": 107,
        "default_verified_users": 0,
        "storegroup": {
            "id": 17,
            "name": "Standard GB",
            "shopello": 0,
            "key": "gb",
            "locale": "GB",
            "lang": "en",
            "currency": "GBP",
            "es": 0,
            "payment_limit": 5000,
            "paid_to_account": "550-5185",
            "our_reference": "Tobias Sjödin",
            "currency_obj": {
                "code": "GBP",
                "name": "Pound sterling",
                "symbol": "£",
                "subunit": "p",
                "is_before": 1,
                "ratio_to_eur": 1.16
            }
        }
    }
}
 

Request      

POST agencies/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

email   string   

required. Example: example@gmail.com

password   string   

required. Example: E&yV?H:0sdA+3

Deep linking

requires authentication

Create deeplinks from an array of links

Example request:
curl --request POST \
    "https://api.metapic.com/agency/ut/users/1/create-link" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"links\": \"[\\\"https:\\/\\/ellos.com\\\"]\",
    \"dry\": 1
}"
const url = new URL(
    "https://api.metapic.com/agency/ut/users/1/create-link"
);

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

let body = {
    "links": "[\"https:\/\/ellos.com\"]",
    "dry": 1
};

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

Example response (200):


[
    {
        "before": "https://na-kd.com",
        "status": "success",
        "store": "NA-KD",
        "storeId": "{storeId}",
        "type": "tradedoubler_SE",
        "after": "https://c.mtpc.se/tags/link/2082974",
        "currency": "SEK",
        "tag_id": "{tagId}",
        "user_revenue_cpc": 250,
        "user_instagram_cpc": 100,
        "user_revenue_cpa": 0,
        "user_instagram_cpa": 0,
        "user_revenue_cpc_formated": "2.50 kr",
        "user_instagram_cpc_formated": "1.00 kr",
        "traffic_sources_costs": [
            {
                "id": 301,
                "store_id": "{storeId}",
                "source": 0,
                "cpc": 250,
                "invoice_cpc": 250,
                "cpa": 0,
                "invoice_cpa": null,
                "created_at": "2023-05-03 12:01:08",
                "updated_at": "2023-05-03 12:01:08",
                "user_revenue": 1,
                "client_revenue": null,
                "cpc_formatted": "2.50 kr",
                "title": "General"
            },
            {
                "id": 302,
                "store_id": "{storeId}",
                "source": 1,
                "cpc": 100,
                "invoice_cpc": 100,
                "cpa": null,
                "invoice_cpa": null,
                "created_at": "2023-05-03 12:01:09",
                "updated_at": "2023-05-03 12:01:09",
                "user_revenue": 1,
                "client_revenue": null,
                "cpc_formatted": "1.00 kr",
                "title": "Instagram"
            }
        ]
    },
    "..."
]
 

Endpoints

Get client user permission config the agency user.

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/user/permissions/sit" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/user/permissions/sit"
);

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

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

Request      

GET agency/user/permissions/{clientId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   string   

Example: sit

Get the invited user's email.

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/aut/users/1/stats/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/aut/users/1/stats/tags"
);

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

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

Request      

GET agency/{clientId}/users/{userId}/stats/tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   string   

Example: aut

userId   integer   

Example: 1

Statistic

Performance

requires authentication

Summarized Earnings, OneTimePayments and Clicks

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/tempora/users/1/performance?from=2019-01-01&to=2019-02-02" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/tempora/users/1/performance"
);

const params = {
    "from": "2019-01-01",
    "to": "2019-02-02",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "clicks": 6202,
    "earned": 570082,
    "one_time_payments": "170200",
    "pending": 0,
    "tags": 20,
    "images": 0
}
 

Request      

GET agency/{clientId}/users/{userId}/performance

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   string   

Example: tempora

userId   integer   

Example: 1

Query Parameters

from   string  optional  

date. Must be a valid date. Example: 2019-01-01

to   string  optional  

date. Must be a valid date. Example: 2019-02-02

User with insta stats.

requires authentication

Returns json response

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/1/users/11/instagram-stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/1/users/11/instagram-stats"
);

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

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

Example response (200):


{
    "id": "316306590",
    "username": "stonetag",
    "email": "AVSTÄNGDpetra_stentagg@hotmail.com",
    "phone": null,
    "created_at": "2014-06-11 18:12:51",
    "updated_at": "2022-05-26 12:32:45",
    "admin": 0,
    "last_active": "2022-05-26 08:20:02",
    "first_name": "petra",
    "surname": "stentagg",
    "vat_no": null,
    "country": "SE",
    "city": "karlshamn",
    "address": "hallonstigen 10",
    "postcode": "37440",
    "tier_pricing_type": "",
    "config": null,
    "sign_user_agreement": "2020-03-25 20:46:47",
    "revenue_tier_id": 4,
    "recruitment_utm": null,
    "auth0": null,
    "payment_blocked": 0,
    "is_suspended": true,
    "is_verified": false,
    "social_media": [
        {
            "id": 131,
            "user_id": 1270,
            "type": "instagram",
            "identifier": "stonetag",
            "is_valid": 1,
            "created_at": "2018-10-04 13:59:49",
            "updated_at": "2021-06-02 11:02:01",
            "followers": 1978,
            "remote_id": "316306590"
        },
        {
            "id": 223,
            "user_id": 1270,
            "type": "blog",
            "identifier": "https://nouw.com/stonetag",
            "is_valid": 1,
            "created_at": "2018-11-05 10:11:33",
            "updated_at": "2018-11-05 10:11:33",
            "followers": null,
            "remote_id": ""
        }
    ],
    "user_id": null,
    "full_name": "Petra Stentagg",
    "follower_count": 2581,
    "avg_like_count": 22.979166666666668,
    "avg_comment_count": 2.5,
    "avg_stories_per_day": "4.537",
    "profile_pic_s3_url": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/stonetag.jpg",
    "has_full_data": false,
    "performance_score": 0.36,
    "branding_score": 0.021,
    "work_status": 0,
    "engagement_rate": 0.9871819708123466
}
 

Request      

GET agency/{clientId}/users/{userId}/instagram-stats

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   integer  optional  

The client id required. Example: 1

userId   integer  optional  

The client id required. Example: 11

requires authentication

Returns json response

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/19/users/13/link-list?page=voluptates" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/19/users/13/link-list"
);

const params = {
    "page": "voluptates",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "current_page": 1,
    "data": {
        "2023-Aug": [
            {
                "link_date": "2023-08-09 21:33:11",
                "tag_id": 3541743,
                "id": 3541743,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fsmink%2Fansikte%2Fsolpuder%2Fhickap-the-wonder-stick-bronze---contour-golden-truffle-8g?",
                "original_url": "https://lyko.com/sv/smink/ansikte/solpuder/hickap-the-wonder-stick-bronze---contour-golden-truffle-8g",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3541743",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-08-09 21:33:07",
                "tag_id": 3541742,
                "id": 3541742,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fsmink%2Fansikte%2Fsolpuder%2Fhickap-the-wonder-stick-bronze---contour-golden-truffle-8g?",
                "original_url": "https://lyko.com/sv/smink/ansikte/solpuder/hickap-the-wonder-stick-bronze---contour-golden-truffle-8g",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3541742",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-08-08 10:31:42",
                "tag_id": 3541661,
                "id": 3541661,
                "link": "http://clk.tradedoubler.com/click?p(307214)a(3043613)url(https%3A%2F%2Fhickap.com%2Fproducts%2Fhickap-borstkollektion)",
                "original_url": "https://hickap.com/products/hickap-borstkollektion",
                "store_id": 4505,
                "mtpc_url": "https://c.mtpc.se/tags/link/3541661",
                "user": null,
                "tag_store": {
                    "id": 4505,
                    "feed_name": "Hickap",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/4505.png"
                },
                "clicks_and_earnings": null
            }
        ],
        "2023-Jul": [
            {
                "link_date": "2023-07-28 16:58:29",
                "tag_id": 3541312,
                "id": 3541312,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fparfym?",
                "original_url": "https://lyko.com/sv/parfym",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3541312",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-13 14:37:36",
                "tag_id": 3528214,
                "id": 3528214,
                "link": "https://www.awin1.com/cread.php?awinmid=8841&awinaffid=416307&p=https%3A%2F%2Fwww.jdsports.se%2F",
                "original_url": "https://www.jdsports.se/",
                "store_id": 25246,
                "mtpc_url": "https://c.mtpc.se/tags/link/3528214",
                "user": null,
                "tag_store": {
                    "id": 25246,
                    "feed_name": "JD Sports SE",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/25246.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-13 14:37:00",
                "tag_id": 3528210,
                "id": 3528210,
                "link": "https://www.awin1.com/cread.php?awinmid=8841&awinaffid=416307&p=https%3A%2F%2Fwww.jdsports.se%2F",
                "original_url": "https://www.jdsports.se/",
                "store_id": 25246,
                "mtpc_url": "https://c.mtpc.se/tags/link/3528210",
                "user": null,
                "tag_store": {
                    "id": 25246,
                    "feed_name": "JD Sports SE",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/25246.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-07 12:07:10",
                "tag_id": 3517208,
                "id": 3517208,
                "link": "https://ellosse.sjv.io/3P7Qjn?u=https%3A%2F%2Fwww.ellos.com%2F?utm_campaign=affiliates",
                "original_url": "https://www.ellos.com/",
                "store_id": 2,
                "mtpc_url": "https://c.mtpc.se/tags/link/3517208",
                "user": null,
                "tag_store": {
                    "id": 2,
                    "feed_name": "Ellos",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/2.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-04 15:57:38",
                "tag_id": 3511134,
                "id": 3511134,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fsmink%2Fansikte%2Fsolpuder%2Fhickap-the-wonder-stick-bronze---contour-golden-truffle-8g?",
                "original_url": "https://lyko.com/sv/smink/ansikte/solpuder/hickap-the-wonder-stick-bronze---contour-golden-truffle-8g",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3511134",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": {
                    "tag_id": 3511134,
                    "clicks": "265",
                    "instagram_clicks": "67",
                    "general_clicks": "198",
                    "earned": "13448",
                    "cpc_instagram_earned": "3350",
                    "cpc_general_earned": "10098",
                    "pending": "0",
                    "cpa_instagram_earned": "0",
                    "cpa_general_earned": "0"
                }
            },
            {
                "link_date": "2023-07-04 15:57:38",
                "tag_id": 3511133,
                "id": 3511133,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fsmink%2Fansikte%2Fsolpuder%2Fhickap-the-wonder-stick-bronze---contour-golden-truffle-8g?",
                "original_url": "https://lyko.com/sv/smink/ansikte/solpuder/hickap-the-wonder-stick-bronze---contour-golden-truffle-8g",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3511133",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-04 15:47:45",
                "tag_id": 3511093,
                "id": 3511093,
                "link": "http://clk.tradedoubler.com/click?p(293895)a(3043613)url(https%3A%2F%2Fwww.cocopanda.se%2Fproducts%2Foutlet)",
                "original_url": "https://www.cocopanda.se/products/outlet",
                "store_id": 5927,
                "mtpc_url": "https://c.mtpc.se/tags/link/3511093",
                "user": null,
                "tag_store": {
                    "id": 5927,
                    "feed_name": "Cocopanda",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/5927.png"
                },
                "clicks_and_earnings": {
                    "tag_id": 3511093,
                    "clicks": "213",
                    "instagram_clicks": "57",
                    "general_clicks": "156",
                    "earned": "13462",
                    "cpc_instagram_earned": "4525",
                    "cpc_general_earned": "8937",
                    "pending": "0",
                    "cpa_instagram_earned": "0",
                    "cpa_general_earned": "0"
                }
            },
            {
                "link_date": "2023-07-04 15:47:45",
                "tag_id": 3511092,
                "id": 3511092,
                "link": "http://clk.tradedoubler.com/click?p(293895)a(3043613)url(https%3A%2F%2Fwww.cocopanda.se%2Fproducts%2Foutlet)",
                "original_url": "https://www.cocopanda.se/products/outlet",
                "store_id": 5927,
                "mtpc_url": "https://c.mtpc.se/tags/link/3511092",
                "user": null,
                "tag_store": {
                    "id": 5927,
                    "feed_name": "Cocopanda",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/5927.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-04 14:05:46",
                "tag_id": 3510880,
                "id": 3510880,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fkerastase?",
                "original_url": "https://lyko.com/sv/kerastase",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3510880",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": {
                    "tag_id": 3510880,
                    "clicks": "250",
                    "instagram_clicks": "62",
                    "general_clicks": "188",
                    "earned": "12688",
                    "cpc_instagram_earned": "3100",
                    "cpc_general_earned": "9588",
                    "pending": "0",
                    "cpa_instagram_earned": "0",
                    "cpa_general_earned": "0"
                }
            },
            {
                "link_date": "2023-07-04 14:05:46",
                "tag_id": 3510879,
                "id": 3510879,
                "link": "https://ion.lyko.com/t/t?a=1117786221&as=1035641997&t=2&tk=1&url=https%3A%2F%2Flyko.com%2Fsv%2Fkerastase?",
                "original_url": "https://lyko.com/sv/kerastase",
                "store_id": 33,
                "mtpc_url": "https://c.mtpc.se/tags/link/3510879",
                "user": null,
                "tag_store": {
                    "id": 33,
                    "feed_name": "Lyko",
                    "logo_url": "https://metapic-cdn.s3-eu-west-1.amazonaws.com/toplists/stores/33.png"
                },
                "clicks_and_earnings": null
            },
            {
                "link_date": "2023-07-04 10:15:20",
                "tag_id": 3510439,
                "id": 3510439,
                "link": "https://www.awin1.com/cread.php?awinmid=33723&awinaffid=416307&p=https%3A%2F%2Fwww.babyshop.com%2Fus%2Fen%2Fa%2Fend-of-season-sale%2F",
                "original_url": "https://www.babyshop.com/us/en/a/end-of-season-sale/",
                "store_id": 25940,
                "mtpc_url": "https://c.mtpc.se/tags/link/3510439",
                "user": null,
                "tag_store": {
                    "id": 25940,
                    "feed_name": "Babyshop",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/25940.png"
                },
                "clicks_and_earnings": {
                    "tag_id": 3510439,
                    "clicks": "2",
                    "instagram_clicks": "1",
                    "general_clicks": "1",
                    "earned": "150",
                    "cpc_instagram_earned": "75",
                    "cpc_general_earned": "75",
                    "pending": "0",
                    "cpa_instagram_earned": "0",
                    "cpa_general_earned": "0"
                }
            },
            {
                "link_date": "2023-07-04 10:15:20",
                "tag_id": 3510438,
                "id": 3510438,
                "link": "https://www.awin1.com/cread.php?awinmid=33723&awinaffid=416307&p=https%3A%2F%2Fwww.babyshop.com%2Fus%2Fen%2Fa%2Fend-of-season-sale%2F",
                "original_url": "https://www.babyshop.com/us/en/a/end-of-season-sale/",
                "store_id": 25940,
                "mtpc_url": "https://c.mtpc.se/tags/link/3510438",
                "user": null,
                "tag_store": {
                    "id": 25940,
                    "feed_name": "Babyshop",
                    "logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/25940.png"
                },
                "clicks_and_earnings": null
            }
        ]
    },
    "first_page_url": "http://metapic-api.my/agency/2/users/2/link-list?page=1",
    "from": 1,
    "last_page": 101,
    "last_page_url": "http://metapic-api.my/agency/2/users/2/link-list?page=101",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=4",
            "label": "4",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=5",
            "label": "5",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=6",
            "label": "6",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=7",
            "label": "7",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=8",
            "label": "8",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=9",
            "label": "9",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=10",
            "label": "10",
            "active": false
        },
        {
            "url": null,
            "label": "...",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=100",
            "label": "100",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=101",
            "label": "101",
            "active": false
        },
        {
            "url": "http://metapic-api.my/agency/2/users/2/link-list?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "http://metapic-api.my/agency/2/users/2/link-list?page=2",
    "path": "http://metapic-api.my/agency/2/users/2/link-list",
    "per_page": 15,
    "prev_page_url": null,
    "to": 2,
    "total": 1514
}
 

Store Media

Get Store Media

requires authentication

Get Instagram stories and collages by store

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/dolores/users/1/media?type=ducimus&identifier=19&order_by=sed&offer_id=123" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/dolores/users/1/media"
);

const params = {
    "type": "ducimus",
    "identifier": "19",
    "order_by": "sed",
    "offer_id": "123",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "id": "{mediaId}",
            "username": "{username}",
            "url": "/instagramStorys/{username}/2245371215538904581_4704145696.mp4",
            "type": "instagram",
            "created_at": "2020-02-16 22:42:36",
            "clicks": "657",
            "nr_orders": 12,
            "order_value": 21345,
            "cost": 12312
        },
        {
            "...": "..."
        }
    ],
    "first_page_url": "http://local.api.metapic/stores/{id}/media?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "http://local.api.metapic/stores/{id}/media?page=3",
    "next_page_url": "http://local.api.metapic/stores/{id}/media?page=2",
    "path": "http://local.api.metapic/stores/{id}/media",
    "per_page": 8,
    "prev_page_url": null,
    "to": 8,
    "total": 21
}
 

Request      

GET agency/{clientId}/users/{userId}/media

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   string   

Example: dolores

userId   integer   

Example: 1

id   integer   

The ID of the store. Example: 1

Query Parameters

type   string  optional  

if you only what one type Must be one of all, youtube, tiktok, or instagram. Example: ducimus

identifier   string  optional  

for the socialmedia account you getting Example: 19

order_by   string  optional  

Sort by clicks or created_at Must be one of created_at or clicks. Example: sed

offer_id   integer  optional  

integer. The id of the Offer. Example: 123

User Earnings

Get agency's user earnings

requires authentication

Returns client earnings grouped by username. if from and to query parameters have been provided it will return the client earning during this period of time, you can also provide the username to search for a specific user.

Example request:
curl --request GET \
    --get "https://api.metapic.com/agency/influencers/sed?username=blanditiis&from=2019-01-01&to=2019-01-02&sort=similique&orderBy=modi&format=iusto&groupByDate=4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/influencers/sed"
);

const params = {
    "username": "blanditiis",
    "from": "2019-01-01",
    "to": "2019-01-02",
    "sort": "similique",
    "orderBy": "modi",
    "format": "iusto",
    "groupByDate": "4",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "date": "2019-03-02",
            "user_id": "{userId}",
            "username": "{userName}",
            "client_id": "{clientID}",
            "clicks": 15,
            "user_earnings": 1924,
            "agency_earnings": 0
        },
        {
            "date": "2020-04-14",
            "user_id": "{userId}",
            "username": "{userName}",
            "client_id": "{clientID}",
            "clicks": 376,
            "user_earnings": 8879,
            "agency_earnings": 0
        },
        {
            "date": "2019-07-12",
            "user_id": "{userId}",
            "username": "{userName}",
            "client_id": "{clientID}",
            "clicks": 0,
            "user_earnings": 200,
            "agency_earnings": 0
        }
    ],
    "first_page_url": "https://api.metapic.com/agency/influencers?page=1",
    "from": 1,
    "last_page": 58,
    "last_page_url": "https://api.metapic.com/agency/influencers?page=58",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=4",
            "label": "4",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=5",
            "label": "5",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=6",
            "label": "6",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=7",
            "label": "7",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=8",
            "label": "8",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=9",
            "label": "9",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=10",
            "label": "10",
            "active": false
        },
        {
            "url": null,
            "label": "...",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=57",
            "label": "57",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=58",
            "label": "58",
            "active": false
        },
        {
            "url": "https://api.metapic.com/agency/influencers?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https://api.metapic.com/agency/influencers?page=2",
    "path": "https://api.metapic.com/agency/influencers",
    "per_page": 15,
    "prev_page_url": null,
    "to": 15,
    "total": 862
}
 

Request      

GET agency/influencers/{clientId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

clientId   string   

Example: sed

Query Parameters

username   string  optional  

String search client influencers by username Example: blanditiis

from   string  optional  

Date (Y-m-d). Must be a valid date. Example: 2019-01-01

to   string  optional  

Date (Y-m-d). Must be a valid date. Example: 2019-01-02

sort   string  optional  

String sort in ascending or descending order. Must be one of asc or desc. Example: similique

orderBy   string  optional  

String order data by a specific column. Must be one of clicks, agency_earnings, user_earnings, or date. Example: modi

format   string  optional  

String export data in a specific format Must be one of csv, xlsx, or json. Example: iusto

groupByDate   integer  optional  

group data by date Must be between 0 and 1. Example: 4