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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/dashboard/{clientId}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-01-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/dashboard/{clientId}?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/{clientId}"
);

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}

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agencies/login';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'email' => '[email protected]',
            'password' => '.#,^(t?:2mI14[XOl@x',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/agencies/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \".#,^(t?:2mI14[XOl@x\"
}"
const url = new URL(
    "https://api.metapic.com/agencies/login"
);

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

let body = {
    "email": "[email protected]",
    "password": ".#,^(t?:2mI14[XOl@x"
};

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

Example response (200):


{
    "id": "{user_id}",
    "username": "",
    "email": "[email protected]",
    "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: [email protected]

password   string   

required. Example: .#,^(t?:2mI14[XOl@x

Deep linking

requires authentication

Create deeplinks from an array of links

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/{clientId}/users/{userId}/create-link';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'links' => '["https://ellos.com"]',
            'dry' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/agency/{clientId}/users/{userId}/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/{clientId}/users/{userId}/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

Display a listing of the resource.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{store_id}/offers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/stores/{store_id}/offers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/stores/{store_id}/offers"
);

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

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

Request      

GET v2/stores/{store_id}/offers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get the validation rules that apply to the request.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{store_id}/offers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'active' => false,
            'campaign_title' => 'vkvengjhabuavrngoeacg',
            'campaign_text' => 'lpckqshsmmtgmi',
            'has_product_seeding' => true,
            'todo' => [
                'error',
            ],
            'has_onetime_payment' => false,
            'one_time_payment' => 15,
            'valid_from' => '2024-06-19T15:34:26',
            'valid_until' => '2069-05-01',
            'max_clicks' => 15,
            'per_user_limit' => true,
            'max_money' => 5,
            'type' => 'standard',
            'traffic_sources_costs' => [
                [
                    'source' => 17,
                    'cpc' => 25,
                    'cpa' => 0,
                ],
            ],
            'targets' => [
                'user_ids' => [
                    19,
                ],
                'user_tag_ids' => [
                    17,
                ],
                'store_group_ids' => [
                    12,
                ],
                'emails' => [
                    '[email protected]',
                ],
                'social_media_identifiers' => [
                    'fzot',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/stores/{store_id}/offers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"active\": false,
    \"campaign_title\": \"vkvengjhabuavrngoeacg\",
    \"campaign_text\": \"lpckqshsmmtgmi\",
    \"has_product_seeding\": true,
    \"todo\": [
        \"error\"
    ],
    \"has_onetime_payment\": false,
    \"one_time_payment\": 15,
    \"valid_from\": \"2024-06-19T15:34:26\",
    \"valid_until\": \"2069-05-01\",
    \"max_clicks\": 15,
    \"per_user_limit\": true,
    \"max_money\": 5,
    \"type\": \"standard\",
    \"traffic_sources_costs\": [
        {
            \"source\": 17,
            \"cpc\": 25,
            \"cpa\": 0
        }
    ],
    \"targets\": {
        \"user_ids\": [
            19
        ],
        \"user_tag_ids\": [
            17
        ],
        \"store_group_ids\": [
            12
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"fzot\"
        ]
    }
}"
const url = new URL(
    "https://api.metapic.com/v2/stores/{store_id}/offers"
);

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

let body = {
    "active": false,
    "campaign_title": "vkvengjhabuavrngoeacg",
    "campaign_text": "lpckqshsmmtgmi",
    "has_product_seeding": true,
    "todo": [
        "error"
    ],
    "has_onetime_payment": false,
    "one_time_payment": 15,
    "valid_from": "2024-06-19T15:34:26",
    "valid_until": "2069-05-01",
    "max_clicks": 15,
    "per_user_limit": true,
    "max_money": 5,
    "type": "standard",
    "traffic_sources_costs": [
        {
            "source": 17,
            "cpc": 25,
            "cpa": 0
        }
    ],
    "targets": {
        "user_ids": [
            19
        ],
        "user_tag_ids": [
            17
        ],
        "store_group_ids": [
            12
        ],
        "emails": [
            "[email protected]"
        ],
        "social_media_identifiers": [
            "fzot"
        ]
    }
};

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

Request      

POST v2/stores/{store_id}/offers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

active   boolean   

Example: false

campaign_title   string   

Must not be greater than 64 characters. Example: vkvengjhabuavrngoeacg

campaign_text   string  optional  

Must not be greater than 1056 characters. Example: lpckqshsmmtgmi

has_product_seeding   boolean  optional  

Example: true

todo   string[]  optional  
has_onetime_payment   boolean  optional  

Example: false

one_time_payment   integer  optional  

This field is required when has_onetime_payment is true. Must not be greater than 1000000. Example: 15

valid_from   string  optional  

Must be a valid date. Example: 2024-06-19T15:34:26

valid_until   string  optional  

Must be a valid date. Must be a date after from. Example: 2069-05-01

max_clicks   integer  optional  

Must not be greater than 1000000. Example: 15

per_user_limit   boolean  optional  

Example: true

max_money   integer  optional  

Must not be greater than 1000000. Example: 5

type   string   

Example: standard

Must be one of:
  • standard
  • user_accept
  • store_accept
  • suggestion
traffic_sources_costs   object[]   
source   integer   

Example: 17

cpc   integer   

Must not be greater than 1000. Example: 25

cpa   number   

Must be between 0 and 1. Example: 0

targets   object   
user_ids   integer[]  optional  
user_tag_ids   integer[]  optional  
store_group_ids   integer[]  optional  
emails   string[]  optional  

The value format is invalid.

social_media_identifiers   string[]  optional  

Must not be greater than 30 characters.

Get the validation rules that apply to the request.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{id}';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'active' => false,
            'campaign_title' => 'wgabus',
            'campaign_text' => 'bsjbdfxczzkwygg',
            'has_product_seeding' => true,
            'todo' => [
                'velit',
            ],
            'has_onetime_payment' => false,
            'one_time_payment' => 2,
            'valid_from' => '2024-06-19T15:34:26',
            'valid_until' => '2040-08-23',
            'max_clicks' => 17,
            'per_user_limit' => true,
            'max_money' => 4,
            'type' => 'suggestion',
            'traffic_sources_costs' => [
                [
                    'source' => 14,
                    'cpc' => 9,
                    'cpa' => 0,
                ],
            ],
            'targets' => [
                'user_ids' => [
                    13,
                ],
                'user_tag_ids' => [
                    14,
                ],
                'store_group_ids' => [
                    6,
                ],
                'emails' => [
                    '[email protected]',
                ],
                'social_media_identifiers' => [
                    'sexuqlrergxtiax',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offers/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"active\": false,
    \"campaign_title\": \"wgabus\",
    \"campaign_text\": \"bsjbdfxczzkwygg\",
    \"has_product_seeding\": true,
    \"todo\": [
        \"velit\"
    ],
    \"has_onetime_payment\": false,
    \"one_time_payment\": 2,
    \"valid_from\": \"2024-06-19T15:34:26\",
    \"valid_until\": \"2040-08-23\",
    \"max_clicks\": 17,
    \"per_user_limit\": true,
    \"max_money\": 4,
    \"type\": \"suggestion\",
    \"traffic_sources_costs\": [
        {
            \"source\": 14,
            \"cpc\": 9,
            \"cpa\": 0
        }
    ],
    \"targets\": {
        \"user_ids\": [
            13
        ],
        \"user_tag_ids\": [
            14
        ],
        \"store_group_ids\": [
            6
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"sexuqlrergxtiax\"
        ]
    }
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{id}"
);

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

let body = {
    "active": false,
    "campaign_title": "wgabus",
    "campaign_text": "bsjbdfxczzkwygg",
    "has_product_seeding": true,
    "todo": [
        "velit"
    ],
    "has_onetime_payment": false,
    "one_time_payment": 2,
    "valid_from": "2024-06-19T15:34:26",
    "valid_until": "2040-08-23",
    "max_clicks": 17,
    "per_user_limit": true,
    "max_money": 4,
    "type": "suggestion",
    "traffic_sources_costs": [
        {
            "source": 14,
            "cpc": 9,
            "cpa": 0
        }
    ],
    "targets": {
        "user_ids": [
            13
        ],
        "user_tag_ids": [
            14
        ],
        "store_group_ids": [
            6
        ],
        "emails": [
            "[email protected]"
        ],
        "social_media_identifiers": [
            "sexuqlrergxtiax"
        ]
    }
};

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

Request      

PUT v2/offers/{id}

PATCH v2/offers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

active   boolean   

Example: false

campaign_title   string   

Must not be greater than 64 characters. Example: wgabus

campaign_text   string  optional  

Must not be greater than 1056 characters. Example: bsjbdfxczzkwygg

has_product_seeding   boolean  optional  

Example: true

todo   string[]  optional  
has_onetime_payment   boolean  optional  

Example: false

one_time_payment   integer  optional  

This field is required when has_onetime_payment is true. Must not be greater than 1000000. Example: 2

valid_from   string  optional  

Must be a valid date. Example: 2024-06-19T15:34:26

valid_until   string  optional  

Must be a valid date. Must be a date after from. Example: 2040-08-23

max_clicks   integer  optional  

Must not be greater than 1000000. Example: 17

per_user_limit   boolean  optional  

Example: true

max_money   integer  optional  

Must not be greater than 1000000. Example: 4

type   string   

Example: suggestion

Must be one of:
  • standard
  • user_accept
  • store_accept
  • suggestion
traffic_sources_costs   object[]   
source   integer   

Example: 14

cpc   integer   

Must not be greater than 1000. Example: 9

cpa   number   

Must be between 0 and 1. Example: 0

targets   object   
user_ids   integer[]  optional  
user_tag_ids   integer[]  optional  
store_group_ids   integer[]  optional  
emails   string[]  optional  

The value format is invalid.

social_media_identifiers   string[]  optional  

Must not be greater than 30 characters.

Remove the specified resource from storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offers/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{id}"
);

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

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

Request      

DELETE v2/offers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Display a listing of the resource.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/targets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets"
);

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

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

Request      

GET v2/offers/{offer_id}/targets

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get the validation rules that apply to the request.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'user_ids' => [
                1,
            ],
            'user_tag_ids' => [
                15,
            ],
            'store_group_ids' => [
                17,
            ],
            'emails' => [
                '[email protected]',
            ],
            'social_media_identifiers' => [
                'z',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offers/{offer_id}/targets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"user_ids\": [
        1
    ],
    \"user_tag_ids\": [
        15
    ],
    \"store_group_ids\": [
        17
    ],
    \"emails\": [
        \"[email protected]\"
    ],
    \"social_media_identifiers\": [
        \"z\"
    ]
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets"
);

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

let body = {
    "user_ids": [
        1
    ],
    "user_tag_ids": [
        15
    ],
    "store_group_ids": [
        17
    ],
    "emails": [
        "[email protected]"
    ],
    "social_media_identifiers": [
        "z"
    ]
};

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

Request      

POST v2/offers/{offer_id}/targets

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

user_ids   integer[]  optional  
user_tag_ids   integer[]  optional  
store_group_ids   integer[]  optional  
emails   string[]  optional  

The value format is invalid.

social_media_identifiers   string[]  optional  

Must not be greater than 30 characters.

Display the specified resource.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}"
);

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

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

Request      

GET v2/offers/{offer_id}/targets/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Update the specified resource in storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets/{id}';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}"
);

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

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

Request      

PUT v2/offers/{offer_id}/targets/{id}

PATCH v2/offers/{offer_id}/targets/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Remove the specified resource from storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}"
);

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

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

Request      

DELETE v2/offers/{offer_id}/targets/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get client user permission config the agency user.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/user/permissions/{clientId}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/user/permissions/{clientId}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/user/permissions/{clientId}"
);

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}

Get the invited user's email.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/{clientId}/users/{userId}/stats/tags';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/{clientId}/users/{userId}/stats/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/{clientId}/users/{userId}/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}

PUT v2/stores/{store_id}/payment

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{store_id}/payment';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/stores/{store_id}/payment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/stores/{store_id}/payment"
);

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

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

Request      

PUT v2/stores/{store_id}/payment

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Entrypoint

App's entrypoint

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/entrypoint';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'app' => 'admin',
            'store_id' => '17',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/entrypoint?app=admin&store_id=17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/entrypoint"
);

const params = {
    "app": "admin",
    "store_id": "17",
};
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());

Request      

GET v2/entrypoint

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

app   string   

Example: admin

Must be one of:
  • advertiser
  • admin
  • agency
  • creator
store_id   integer  optional  

This field is required when app is advertiser. Example: 17

Response

Response Fields

indicators   object   
HAS_CAMPAIGNS   Indicates if the advertiser has campaigns.   

Offer Comments V2

Add OfferUser comment

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/1/comments';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'comment' => 'domtzeqbkr',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offer-users/1/comments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"comment\": \"domtzeqbkr\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/1/comments"
);

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

let body = {
    "comment": "domtzeqbkr"
};

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

Example response (200):


{
    "id": 12,
    "user_id": 40185,
    "user_full_name": "Mark mark",
    "comment_text": "Test new 234",
    "created_at": "2024-04-24T13:03:41",
    "updated_at": "2024-04-24T13:03:41"
}
 

Request      

POST v2/offer-users/{offer_user_id}/comments

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

offer_user_id   string   

The ID of the offerUser. Example: 1

Body Parameters

comment   string   

Must not be greater than 15000 characters. Example: domtzeqbkr

Update OfferUser comment

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/1/comments/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'comment' => 'pdljlzjouvpaattezrykf',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offer-users/1/comments/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"comment\": \"pdljlzjouvpaattezrykf\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/1/comments/1"
);

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

let body = {
    "comment": "pdljlzjouvpaattezrykf"
};

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

Example response (200):


{
    "id": 12,
    "user_id": 40185,
    "user_full_name": "Mark mark",
    "comment_text": "Test new 234",
    "created_at": "2024-04-24T13:03:41",
    "updated_at": "2024-04-24T13:03:41"
}
 

Request      

PUT v2/offer-users/{offer_user_id}/comments/{id}

PATCH v2/offer-users/{offer_user_id}/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

offer_user_id   string   

The ID of the offerUser. Example: 1

offer_comment_id   string   

The ID of the comment. Example: 1

Body Parameters

comment   string   

Must not be greater than 15000 characters. Example: pdljlzjouvpaattezrykf

Delete OfferUser comment

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/1/comments/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offer-users/1/comments/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/1/comments/1"
);

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

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

Request      

DELETE v2/offer-users/{offer_user_id}/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

offer_user_id   string   

The ID of the offerUser. Example: 1

offerCommentId   string   

The ID of the comment. Example: 1

Offer User Activity

Get the list of activities on OfferUser card

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/{offerUser_id}/activities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offer-users/{offerUser_id}/activities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/{offerUser_id}/activities"
);

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

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

Example response (200):


{
    "data": [
        {
            "type": "COMMENT",
            "actor_id": 34985,
            "actor_display_name": "@username",
            "comment_id": 1,
            "comment_text": "Qui delectus provident labore iusto aut ad aperiam. Vitae recusandae quis laborum culpa placeat animi quibusdam. Cum omnis quas velit rerum blanditiis voluptas modi provident.",
            "created_at": "2024-04-16T22:39:26"
        },
        {
            "type": "COMMENT",
            "actor_id": 40185,
            "actor_display_name": "Mark",
            "comment_id": 1,
            "comment_text": "Cum a maxime sit rem tenetur. Ad in quibusdam suscipit est eos aut. Ex eligendi necessitatibus tempora distinctio.",
            "created_at": "2024-04-16T22:39:26",
            "updated_at": "2024-04-16T22:39:26"
        },
        {
            "type": "DELETED_COMMENT",
            "created_at": "2024-04-16CEST22:15:41"
        },
        {
            "type": "STATUS_CHANGE",
            "actor_id": 40185,
            "actor_display_name": "Admin",
            "old_status": "suggestion",
            "new_status": "denied",
            "created_at": "2024-04-16T22:39:26"
        },
        {
            "type": "STATUS_CHANGE",
            "old_status": "applied",
            "new_status": "have_posted",
            "created_at": "2024-04-16T22:42:35"
        },
        {
            "type": "STATUS_CHANGE",
            "actor_id": 34985,
            "actor_display_name": "@username",
            "old_status": "applied",
            "new_status": "accepted",
            "created_at": "2024-04-16T22:44:59"
        }
    ],
    "links": {
        "first": "/v2/offer-users/48798908/activities?page=1",
        "last": "/v2/offer-users/48798908/activities?page=10",
        "prev": null,
        "next": "/v2/offer-users/48798908/activities?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 10,
        "links": [],
        "path": "/v2/offer-users/48798908/activities",
        "per_page": 20,
        "to": 20,
        "total": 200
    }
}
 

Request      

GET v2/offer-users/{offerUser_id}/activities

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Response

Response Fields

type   string   

The type of the activity. Can be one of the following values:
- COMMENT
- DELETED_COMMENT
- STATUS_CHANGE

actor_id   integer   

Unique identifier of the user who initiated the activity.
Absent when the activity was caused by the system.

actor_display_name   string   

The name of the actor who initiated the activity.
In case of Creator contains username
In case of Admin or Advertiser contains the full name
Absent when the activity was caused by the system.

comment_id   integer   

Unique identifier of the comment.
Present when type is COMMENT

comment_text   string   

Contains the comment text.
Present when type is COMMENT

new_status   string   

New offerUser status
Present when type is STATUS_CHANGE

old_status   string   

Old offerUser status
Present when type is STATUS_CHANGE

created_at   string   

Indicates time at which the activity happened.

updated_at   string   

Time of last editing.
Present if comment was edited

Offers

Get offer

requires authentication

Return offer details.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}"
);

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

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

Request      

GET v2/offers/{offer_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Upload Offer Image (v2)

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/uploads';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'default' => 'image.png',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offers/{offer_id}/uploads" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"default\": \"image.png\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/uploads"
);

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

let body = {
    "default": "image.png"
};

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

Request      

POST v2/offers/{offer_id}/uploads

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

default   string   

Offer image.

Must not be greater than 10240 characters. Example: image.png

Get offer

requires authentication

Return offer details.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/{offer_token}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offer-by-token/{offer_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-by-token/{offer_token}"
);

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

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

Request      

GET v2/offer-by-token/{offer_token}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Offer Participants

Checks if user has been added to the offer.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/users/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/users/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/users/{id}"
);

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

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

Request      

GET v2/offers/{offer_id}/users/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

List participants in a campaign

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'query' => 'voluptas',
            'status' => 'open',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/participants?query=voluptas&status=open" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants"
);

const params = {
    "query": "voluptas",
    "status": "open",
};
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):


{
    "data": [
        {
            "id": null,
            "offer_id": 26,
            "user_id": null,
            "display_name": "dicki.mozelle",
            "clicks": 217259,
            "status": "second_prio",
            "pre_registered_identifier": "dicki.mozelle",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 74,
            "avatar": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/dicki.mozelle.jpg"
        },
        {
            "id": null,
            "offer_id": 28,
            "user_id": 10,
            "display_name": "freilly",
            "clicks": 98918,
            "status": "applied",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 0
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET v2/offers/{offer_id}/participants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

query   string  optional  

Filters the results that contain a text match for this term. A match may happen on either:

  • social media identifier
  • email
  • user id
  • user's username
  • user tag

Partial matches are supported. For example, 'el' will match 'hello'.

Must not be greater than 128 characters. Example: voluptas

status   string  optional  

Example: open

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent

Response

Response Fields

offer_comments_count   The number of comments on this participation.   
id   integer   

The unique id of this participant

offer_id   integer   

The id of the offer for this participant

display_name   string   

The name of the participant

clicks   integer   

The number of clicks left for this participant

status   string   

The status of this campaign participant

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
pre_registered_email   string|null   

The email by which/if the participant was added to the campaign

pre_registered_identifier   string|null   

The social media identifier by which/if the participant was added to the campaign

todo   array|null   

List of todo items

user_id   int|null   

The id of the user, if Metapic user is linked to the participant

username   string|null   

The username of the user, if Metapic user is linked to the participant

avatar   string|null   

The image associated with the user through social media identifier

social_media   array|null   

List of user's social media, if available

tags   array|null   

List of user tags, if available

Store a newly created resource in storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offers/{offer_id}/participants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants"
);

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

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

Request      

POST v2/offers/{offer_id}/participants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get participant details

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}"
);

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

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

Example response (200):


{
    "id": 9,
    "offer_id": 29,
    "user_id": 11,
    "display_name": "barney06",
    "clicks": 6,
    "status": "accepted",
    "todo": null,
    "payment_amount": null
}
 

Request      

GET v2/offers/{offer_id}/participants/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Response

Response Fields

id   integer   

The unique id of this participant

offer_id   integer   

The id of the offer for this participant

display_name   string   

The name of the participant

clicks   integer   

The number of clicks left for this participant

status   string   

The status of this campaign participant

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
pre_registered_email   string|null   

The email by which/if the participant was added to the campaign

pre_registered_identifier   string|null   

The social media identifier by which/if the participant was added to the campaign

todo   array|null   

List of todo items

user_id   int|null   

The id of the user, if Metapic user is linked to the participant

username   string|null   

The username of the user, if Metapic user is linked to the participant

avatar   string|null   

The image associated with the user through social media identifier

social_media   array|null   

List of user's social media, if available

tags   array|null   

List of user tags, if available

Update the specified resource in storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{id}';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}"
);

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

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

Request      

PUT v2/offers/{offer_id}/participants/{id}

PATCH v2/offers/{offer_id}/participants/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Remove the specified resource from storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}"
);

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

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

Request      

DELETE v2/offers/{offer_id}/participants/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Update participant status

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{participant_id}/update-status';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'status' => 'store_denied',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{participant_id}/update-status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"status\": \"store_denied\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{participant_id}/update-status"
);

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

let body = {
    "status": "store_denied"
};

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

Example response (200):


{
    "id": 10,
    "offer_id": 30,
    "user_id": null,
    "display_name": "kutch.lenny",
    "clicks": 1382259,
    "status": "open",
    "pre_registered_identifier": "kutch.lenny",
    "todo": null,
    "payment_amount": null,
    "avatar": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/kutch.lenny.jpg"
}
 

Example response (200):


{
    "id": "{id}",
    "offer_id": "{offerId}",
    "user_id": "{userId}",
    "clicks": 0,
    "status": "accepted",
    "created_at": "2021-05-25 13:02:06",
    "updated_at": "2021-05-27 11:21:23"
}
 

Request      

PATCH v2/offers/{offer_id}/participants/{participant_id}/update-status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

status   string   

Example: store_denied

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent

Response

Response Fields

id   integer   

The unique id of this participant

offer_id   integer   

The id of the offer for this participant

display_name   string   

The name of the participant

clicks   integer   

The number of clicks left for this participant

status   string   

The status of this campaign participant

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
pre_registered_email   string|null   

The email by which/if the participant was added to the campaign

pre_registered_identifier   string|null   

The social media identifier by which/if the participant was added to the campaign

todo   array|null   

List of todo items

user_id   int|null   

The id of the user, if Metapic user is linked to the participant

username   string|null   

The username of the user, if Metapic user is linked to the participant

avatar   string|null   

The image associated with the user through social media identifier

social_media   array|null   

List of user's social media, if available

tags   array|null   

List of user tags, if available

Checks if user has been added to the offer.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{userId}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{userId}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{userId}"
);

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

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

Request      

GET v2/offer-by-token/{offer_token}/users/{userId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Mark user as having joined the campaign

requires authentication

This can only be performed by the user themselves.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{user_id}/join';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{user_id}/join" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{user_id}/join"
);

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

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

Request      

POST v2/offer-by-token/{offer_token}/users/{user_id}/join

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Statistic

Performance

requires authentication

Summarized Earnings, OneTimePayments and Clicks

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/{clientId}/users/{userId}/performance';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-02-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/{clientId}/users/{userId}/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/{clientId}/users/{userId}/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}

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/2/users/14/instagram-stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/2/users/14/instagram-stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/2/users/14/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Ä[email protected]",
    "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: 2

userId   integer  optional  

The client id required. Example: 14

requires authentication

Returns json response

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/16/users/7/link-list';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'page' => 'enim',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/16/users/7/link-list?page=enim" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/16/users/7/link-list"
);

const params = {
    "page": "enim",
};
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

Create Store

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'name' => 'repellendus',
            'domains' => [
                'Zbth.L.ShFJ/ -.ww w. w/- /w-- /.w -/',
            ],
            'categories' => [
                1,
            ],
            'logo_url' => 'https://www.towne.info/qui-architecto-qui-et',
            'country' => 'SE',
            'currency' => 'EUR',
            'language' => 'rerum',
            'billing' => [
                'company_name' => 'aut',
                'street' => 'eos',
                'postal_code' => 'ducimus',
                'city' => 'ut',
                'vat_number' => 'necessitatibus',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/stores" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"name\": \"repellendus\",
    \"domains\": [
        \"Zbth.L.ShFJ\\/ -.ww w. w\\/- \\/w-- \\/.w -\\/\"
    ],
    \"categories\": [
        1
    ],
    \"logo_url\": \"https:\\/\\/www.towne.info\\/qui-architecto-qui-et\",
    \"country\": \"SE\",
    \"currency\": \"EUR\",
    \"language\": \"rerum\",
    \"billing\": {
        \"company_name\": \"aut\",
        \"street\": \"eos\",
        \"postal_code\": \"ducimus\",
        \"city\": \"ut\",
        \"vat_number\": \"necessitatibus\"
    }
}"
const url = new URL(
    "https://api.metapic.com/v2/stores"
);

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

let body = {
    "name": "repellendus",
    "domains": [
        "Zbth.L.ShFJ\/ -.ww w. w\/- \/w-- \/.w -\/"
    ],
    "categories": [
        1
    ],
    "logo_url": "https:\/\/www.towne.info\/qui-architecto-qui-et",
    "country": "SE",
    "currency": "EUR",
    "language": "rerum",
    "billing": {
        "company_name": "aut",
        "street": "eos",
        "postal_code": "ducimus",
        "city": "ut",
        "vat_number": "necessitatibus"
    }
};

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

Request      

POST v2/stores

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

name   string   

Example: repellendus

domains   string[]  optional  

Store domains.

Must match the regex /^(https?:\/\/)?([\dA-Za-z.-]+).([A-Za-z.]{2,6})([\/\w .-])\/?$/.

categories   string[]  optional  

Store categories IDs.

logo_url   string   

the logo url Example: https://www.towne.info/qui-architecto-qui-et

country   string   

Store locale. Example: SE

currency   string   

Store ISO currency code. Example: EUR

language   string  optional  

Example: rerum

billing   object  optional  
company_name   string   

Example: aut

street   string   

Example: eos

postal_code   string   

Example: ducimus

city   string   

Example: ut

vat_number   string  optional  

Example: necessitatibus

Store Media

Get Store Media

requires authentication

Get Instagram stories and collages by store

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/1/users/1/media';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'type' => 'doloribus',
            'identifier' => '13',
            'order_by' => 'expedita',
            'offer_id' => '123',
            'date_from' => 'eum',
            'date_to' => 'saepe',
            'per_page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/1/users/1/media?type=doloribus&identifier=13&order_by=expedita&offer_id=123&date_from=eum&date_to=saepe&per_page=10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/1/users/1/media"
);

const params = {
    "type": "doloribus",
    "identifier": "13",
    "order_by": "expedita",
    "offer_id": "123",
    "date_from": "eum",
    "date_to": "saepe",
    "per_page": "10",
};
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

id   integer   

The ID of the store. Example: 1

Query Parameters

type   string  optional  

if you only what one type Example: doloribus

Must be one of:
  • all
  • youtube
  • tiktok
  • instagram
identifier   string  optional  

for the social media account you getting Example: 13

order_by   string  optional  

Sort by clicks or created_at Example: expedita

Must be one of:
  • created_at
  • clicks
offer_id   integer  optional  

integer. The id of the Offer. Example: 123

date_from   string  optional  

date get media published after given date (incl)

Must be a valid date. Example: eum

date_to   string  optional  

date get media published until given date (incl)

Must be a valid date. Example: saepe

per_page   integer  optional  

Items per page. Example: 10

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/influencers/{clientId}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'username' => 'omnis',
            'from' => '2019-01-01',
            'to' => '2019-01-02',
            'sort' => 'quia',
            'orderBy' => 'qui',
            'format' => 'ea',
            'groupByDate' => '18',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/agency/influencers/{clientId}?username=omnis&from=2019-01-01&to=2019-01-02&sort=quia&orderBy=qui&format=ea&groupByDate=18" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/agency/influencers/{clientId}"
);

const params = {
    "username": "omnis",
    "from": "2019-01-01",
    "to": "2019-01-02",
    "sort": "quia",
    "orderBy": "qui",
    "format": "ea",
    "groupByDate": "18",
};
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}

Query Parameters

username   string  optional  

String search client influencers by username Example: omnis

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. Example: quia

Must be one of:
  • asc
  • desc
orderBy   string  optional  

String order data by a specific column. Example: qui

Must be one of:
  • clicks
  • agency_earnings
  • user_earnings
  • date
format   string  optional  

String export data in a specific format Example: ea

Must be one of:
  • csv
  • xlsx
  • json
groupByDate   integer  optional  

group data by date

Must be between 0 and 1. Example: 18