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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'example@gmail.com',
'password' => '129^{^',
],
]
);
$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\": \"example@gmail.com\",
\"password\": \"129^{^\"
}"
const url = new URL(
"https://api.metapic.com/agencies/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"email": "example@gmail.com",
"password": "129^{^"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "{user_id}",
"username": "",
"email": "example@metapic.com",
"phone": null,
"created_at": "2022-08-02 15:23:53",
"updated_at": "2022-08-15 13:17:56",
"admin": 1,
"last_active": "2022-08-15T11:17:56.359046Z",
"first_name": "",
"surname": "",
"vat_no": null,
"country": "",
"city": "",
"address": "",
"postcode": "",
"tier_pricing_type": "",
"config": "",
"sign_user_agreement": "2022-08-02 15:23:55",
"revenue_tier_id": 107,
"recruitment_utm": null,
"access_token": "{ access_token }",
"is_suspended": false,
"is_verified": true,
"revenue_tier": {
"id": 107,
"created_at": "2018-12-12 14:21:45",
"updated_at": "2021-12-01 12:05:56",
"client_id": 79,
"revenue_share": "0.00",
"instagram_revenue_share": "0.00",
"name": "Not Approved"
},
"client": {
"id": 79,
"client_id": "949469247648506",
"payment_organization_id": null,
"name": "Metapic GB",
"created_at": "2018-12-12 14:21:45",
"updated_at": "2021-08-03 12:48:21",
"own_paymentsystem": 0,
"config": "{ \"tabs\": { \"home\":{\"showMenu\":true}, \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true}, \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true} }, \"canLogin\": true}",
"user_mail_config": {
"accepted": "uk-welcome-to-metapic",
"registered": "we-ve-received-your-application"
},
"feed": "live_gb",
"locale": "GB",
"revenue_model": "blog_percentage",
"revenue_share": "0.00",
"store_group_id": 17,
"default_revenue_tier": 107,
"default_verified_users": 0,
"storegroup": {
"id": 17,
"name": "Standard GB",
"shopello": 0,
"key": "gb",
"locale": "GB",
"lang": "en",
"currency": "GBP",
"es": 0,
"payment_limit": 5000,
"paid_to_account": "550-5185",
"our_reference": "Tobias Sjödin",
"currency_obj": {
"code": "GBP",
"name": "Pound sterling",
"symbol": "£",
"subunit": "p",
"is_before": 1,
"ratio_to_eur": 1.16
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deep linking
Create Deep Links
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"
}
]
},
"..."
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'ypzotykbeugvs',
'campaign_text' => 'lbtxgiov',
'has_product_seeding' => true,
'todo' => [
'suscipit',
],
'has_onetime_payment' => true,
'one_time_payment' => 19,
'valid_from' => '2024-07-02T10:18:48',
'valid_until' => '2063-06-25',
'max_clicks' => 19,
'per_user_limit' => false,
'max_money' => 12,
'type' => 'suggestion',
'traffic_sources_costs' => [
[
'source' => 3,
'cpc' => 19,
'cpa' => 0,
],
],
'targets' => [
'user_ids' => [
16,
],
'user_tag_ids' => [
17,
],
'store_group_ids' => [
5,
],
'emails' => [
'demetris.altenwerth@example.net',
],
'social_media_identifiers' => [
'ctirrtvuavo',
],
],
],
]
);
$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\": \"ypzotykbeugvs\",
\"campaign_text\": \"lbtxgiov\",
\"has_product_seeding\": true,
\"todo\": [
\"suscipit\"
],
\"has_onetime_payment\": true,
\"one_time_payment\": 19,
\"valid_from\": \"2024-07-02T10:18:48\",
\"valid_until\": \"2063-06-25\",
\"max_clicks\": 19,
\"per_user_limit\": false,
\"max_money\": 12,
\"type\": \"suggestion\",
\"traffic_sources_costs\": [
{
\"source\": 3,
\"cpc\": 19,
\"cpa\": 0
}
],
\"targets\": {
\"user_ids\": [
16
],
\"user_tag_ids\": [
17
],
\"store_group_ids\": [
5
],
\"emails\": [
\"demetris.altenwerth@example.net\"
],
\"social_media_identifiers\": [
\"ctirrtvuavo\"
]
}
}"
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": "ypzotykbeugvs",
"campaign_text": "lbtxgiov",
"has_product_seeding": true,
"todo": [
"suscipit"
],
"has_onetime_payment": true,
"one_time_payment": 19,
"valid_from": "2024-07-02T10:18:48",
"valid_until": "2063-06-25",
"max_clicks": 19,
"per_user_limit": false,
"max_money": 12,
"type": "suggestion",
"traffic_sources_costs": [
{
"source": 3,
"cpc": 19,
"cpa": 0
}
],
"targets": {
"user_ids": [
16
],
"user_tag_ids": [
17
],
"store_group_ids": [
5
],
"emails": [
"demetris.altenwerth@example.net"
],
"social_media_identifiers": [
"ctirrtvuavo"
]
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => true,
'campaign_title' => 'joebkpixskdchjpvvntvvh',
'campaign_text' => 'yg',
'has_product_seeding' => false,
'todo' => [
'esse',
],
'has_onetime_payment' => false,
'one_time_payment' => 25,
'valid_from' => '2024-07-02T10:18:48',
'valid_until' => '2036-03-24',
'max_clicks' => 2,
'per_user_limit' => false,
'max_money' => 1,
'type' => 'suggestion',
'traffic_sources_costs' => [
[
'source' => 20,
'cpc' => 9,
'cpa' => 1,
],
],
'targets' => [
'user_ids' => [
13,
],
'user_tag_ids' => [
12,
],
'store_group_ids' => [
11,
],
'emails' => [
'zieme.narciso@example.com',
],
'social_media_identifiers' => [
'nnv',
],
],
],
]
);
$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\": true,
\"campaign_title\": \"joebkpixskdchjpvvntvvh\",
\"campaign_text\": \"yg\",
\"has_product_seeding\": false,
\"todo\": [
\"esse\"
],
\"has_onetime_payment\": false,
\"one_time_payment\": 25,
\"valid_from\": \"2024-07-02T10:18:48\",
\"valid_until\": \"2036-03-24\",
\"max_clicks\": 2,
\"per_user_limit\": false,
\"max_money\": 1,
\"type\": \"suggestion\",
\"traffic_sources_costs\": [
{
\"source\": 20,
\"cpc\": 9,
\"cpa\": 1
}
],
\"targets\": {
\"user_ids\": [
13
],
\"user_tag_ids\": [
12
],
\"store_group_ids\": [
11
],
\"emails\": [
\"zieme.narciso@example.com\"
],
\"social_media_identifiers\": [
\"nnv\"
]
}
}"
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": true,
"campaign_title": "joebkpixskdchjpvvntvvh",
"campaign_text": "yg",
"has_product_seeding": false,
"todo": [
"esse"
],
"has_onetime_payment": false,
"one_time_payment": 25,
"valid_from": "2024-07-02T10:18:48",
"valid_until": "2036-03-24",
"max_clicks": 2,
"per_user_limit": false,
"max_money": 1,
"type": "suggestion",
"traffic_sources_costs": [
{
"source": 20,
"cpc": 9,
"cpa": 1
}
],
"targets": {
"user_ids": [
13
],
"user_tag_ids": [
12
],
"store_group_ids": [
11
],
"emails": [
"zieme.narciso@example.com"
],
"social_media_identifiers": [
"nnv"
]
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => [
13,
],
'user_tag_ids' => [
6,
],
'store_group_ids' => [
5,
],
'emails' => [
'carol53@example.net',
],
'social_media_identifiers' => [
'a',
],
],
]
);
$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\": [
13
],
\"user_tag_ids\": [
6
],
\"store_group_ids\": [
5
],
\"emails\": [
\"carol53@example.net\"
],
\"social_media_identifiers\": [
\"a\"
]
}"
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": [
13
],
"user_tag_ids": [
6
],
"store_group_ids": [
5
],
"emails": [
"carol53@example.net"
],
"social_media_identifiers": [
"a"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the validation rules that apply to the request.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/clients';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'name' => 'tufqaniujwqkpfa',
'store_group_id' => '2',
'size' => '3',
'sort_by' => 'at',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/v2/clients?name=tufqaniujwqkpfa&store_group_id=2&size=3&sort_by=at" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/clients"
);
const params = {
"name": "tufqaniujwqkpfa",
"store_group_id": "2",
"size": "3",
"sort_by": "at",
};
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/clients';
$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/clients" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/clients"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/clients/{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/clients/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/clients/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/clients/{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/clients/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/clients/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/clients/{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/clients/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/clients/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the validation rules that apply to the request.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/users';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'query' => 'g',
'client_id' => '13',
'store_group_id' => '16',
'size' => '18',
'sort_by' => 'velit',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/v2/users?query=g&client_id=13&store_group_id=16&size=18&sort_by=velit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/users"
);
const params = {
"query": "g",
"client_id": "13",
"store_group_id": "16",
"size": "18",
"sort_by": "velit",
};
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/users';
$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/users" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/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/users/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/users/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/users/{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/users/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/users/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/users/{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/users/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/users/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the validation rules that apply to the request.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'query' => 'racdnhizf',
'store_group_id' => '16',
'size' => '16',
'sort_by' => 'voluptas',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/v2/stores?query=racdnhizf&store_group_id=16&size=16&sort_by=voluptas" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/stores"
);
const params = {
"query": "racdnhizf",
"store_group_id": "16",
"size": "16",
"sort_by": "voluptas",
};
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{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/stores/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/stores/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{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/stores/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/stores/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{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/stores/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/stores/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the validation rules that apply to the request.
Store a newly created resource in storage.
Display the specified resource.
Update the specified resource in storage.
Remove the specified resource from storage.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the invited user's email.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'agency',
'store_id' => '5',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/v2/entrypoint?app=agency&store_id=5" \
--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": "agency",
"store_id": "5",
};
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'tiroy',
],
]
);
$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\": \"tiroy\"
}"
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": "tiroy"
};
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'ojyuftlwpyiypmqvre',
],
]
);
$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\": \"ojyuftlwpyiypmqvre\"
}"
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": "ojyuftlwpyiypmqvre"
};
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'vero',
'status' => 'store_denied',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/v2/offers/{offer_id}/participants?query=vero&status=store_denied" \
--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": "vero",
"status": "store_denied",
};
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": null,
"user_id": null,
"display_name": null,
"clicks": null,
"status": null,
"todo": null,
"payment_amount": null
},
{
"id": null,
"offer_id": null,
"user_id": null,
"display_name": null,
"clicks": null,
"status": null,
"todo": null,
"payment_amount": null
}
],
"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
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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": null,
"offer_id": null,
"user_id": null,
"display_name": null,
"clicks": null,
"status": null,
"todo": null,
"payment_amount": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'second_prio',
],
]
);
$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\": \"second_prio\"
}"
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": "second_prio"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": null,
"offer_id": null,
"user_id": null,
"display_name": null,
"clicks": null,
"status": null,
"todo": null,
"payment_amount": null
}
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User with insta stats.
requires authentication
Returns json response
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/1/users/17/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/1/users/17/instagram-stats" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/1/users/17/instagram-stats"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "316306590",
"username": "stonetag",
"email": "AVSTÄNGDpetra_stentagg@hotmail.com",
"phone": null,
"created_at": "2014-06-11 18:12:51",
"updated_at": "2022-05-26 12:32:45",
"admin": 0,
"last_active": "2022-05-26 08:20:02",
"first_name": "petra",
"surname": "stentagg",
"vat_no": null,
"country": "SE",
"city": "karlshamn",
"address": "hallonstigen 10",
"postcode": "37440",
"tier_pricing_type": "",
"config": null,
"sign_user_agreement": "2020-03-25 20:46:47",
"revenue_tier_id": 4,
"recruitment_utm": null,
"auth0": null,
"payment_blocked": 0,
"is_suspended": true,
"is_verified": false,
"social_media": [
{
"id": 131,
"user_id": 1270,
"type": "instagram",
"identifier": "stonetag",
"is_valid": 1,
"created_at": "2018-10-04 13:59:49",
"updated_at": "2021-06-02 11:02:01",
"followers": 1978,
"remote_id": "316306590"
},
{
"id": 223,
"user_id": 1270,
"type": "blog",
"identifier": "https://nouw.com/stonetag",
"is_valid": 1,
"created_at": "2018-11-05 10:11:33",
"updated_at": "2018-11-05 10:11:33",
"followers": null,
"remote_id": ""
}
],
"user_id": null,
"full_name": "Petra Stentagg",
"follower_count": 2581,
"avg_like_count": 22.979166666666668,
"avg_comment_count": 2.5,
"avg_stories_per_day": "4.537",
"profile_pic_s3_url": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/stonetag.jpg",
"has_full_data": false,
"performance_score": 0.36,
"branding_score": 0.021,
"work_status": 0,
"engagement_rate": 0.9871819708123466
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User link list.
requires authentication
Returns json response
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/14/users/8/link-list';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'page' => 'nostrum',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/agency/14/users/8/link-list?page=nostrum" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/14/users/8/link-list"
);
const params = {
"page": "nostrum",
};
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'assumenda',
'domains' => [
'https://qZn.aa/',
],
'categories' => [
1,
],
'logo_url' => 'https://www.fadel.biz/quisquam-qui-omnis-porro-hic-in-accusantium-labore-enim',
'country' => 'SE',
'currency' => 'EUR',
'language' => 'veritatis',
'billing' => [
'company_name' => 'esse',
'street' => 'ut',
'postal_code' => 'velit',
'city' => 'est',
'vat_number' => 'asperiores',
],
],
]
);
$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\": \"assumenda\",
\"domains\": [
\"https:\\/\\/qZn.aa\\/\"
],
\"categories\": [
1
],
\"logo_url\": \"https:\\/\\/www.fadel.biz\\/quisquam-qui-omnis-porro-hic-in-accusantium-labore-enim\",
\"country\": \"SE\",
\"currency\": \"EUR\",
\"language\": \"veritatis\",
\"billing\": {
\"company_name\": \"esse\",
\"street\": \"ut\",
\"postal_code\": \"velit\",
\"city\": \"est\",
\"vat_number\": \"asperiores\"
}
}"
const url = new URL(
"https://api.metapic.com/v2/stores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"name": "assumenda",
"domains": [
"https:\/\/qZn.aa\/"
],
"categories": [
1
],
"logo_url": "https:\/\/www.fadel.biz\/quisquam-qui-omnis-porro-hic-in-accusantium-labore-enim",
"country": "SE",
"currency": "EUR",
"language": "veritatis",
"billing": {
"company_name": "esse",
"street": "ut",
"postal_code": "velit",
"city": "est",
"vat_number": "asperiores"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'voluptas',
'identifier' => '11',
'order_by' => 'consequatur',
'offer_id' => '123',
'date_from' => 'odit',
'date_to' => 'sunt',
'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=voluptas&identifier=11&order_by=consequatur&offer_id=123&date_from=odit&date_to=sunt&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": "voluptas",
"identifier": "11",
"order_by": "consequatur",
"offer_id": "123",
"date_from": "odit",
"date_to": "sunt",
"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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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' => 'quis',
'from' => '2019-01-01',
'to' => '2019-01-02',
'sort' => 'repudiandae',
'orderBy' => 'repellendus',
'format' => 'quia',
'groupByDate' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/agency/influencers/{clientId}?username=quis&from=2019-01-01&to=2019-01-02&sort=repudiandae&orderBy=repellendus&format=quia&groupByDate=1" \
--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": "quis",
"from": "2019-01-01",
"to": "2019-01-02",
"sort": "repudiandae",
"orderBy": "repellendus",
"format": "quia",
"groupByDate": "1",
};
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.