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/aliquam';
$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/aliquam?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/aliquam"
);
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
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 269
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6Im1NUVdzK09Qb0oxVVYwYi9jeTdRM1E9PSIsInZhbHVlIjoia2NaWXR3WExVa2FSdFpkWTRHT2hzckxYaUxodmwyK2Z2QStPQjgrRit0VDRaL1Z3Tm9GUGl4M0xHUDVWaDlkWjI5RnBkR1pCOWdLdjRTY3FBc3krUk1NektBMTYxUkNPR0NXSURDN09UNHlLRFN4RDlkN1ZvcDk0dGF0U1BLMXIiLCJtYWMiOiJlMzc2OTA2YjI3NDNkOGFjYzFhYTJhNjFmZWE3YmUxNjgyOWVlZDZkOGIxOTg5NmVhMDY1NjI2OTc3M2I3ZTVlIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:00 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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' => '[email protected]',
'password' => 'A7Zue&)H$Z=?ZW9O?|',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api.metapic.com/agencies/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"email\": \"[email protected]\",
\"password\": \"A7Zue&)H$Z=?ZW9O?|\"
}"
const url = new URL(
"https://api.metapic.com/agencies/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"email": "[email protected]",
"password": "A7Zue&)H$Z=?ZW9O?|"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "{user_id}",
"username": "",
"email": "[email protected]",
"phone": null,
"created_at": "2022-08-02 15:23:53",
"updated_at": "2022-08-15 13:17:56",
"admin": 1,
"last_active": "2022-08-15T11:17:56.359046Z",
"first_name": "",
"surname": "",
"vat_no": null,
"country": "",
"city": "",
"address": "",
"postcode": "",
"tier_pricing_type": "",
"config": "",
"sign_user_agreement": "2022-08-02 15:23:55",
"revenue_tier_id": 107,
"recruitment_utm": null,
"access_token": "{ access_token }",
"is_suspended": false,
"is_verified": true,
"revenue_tier": {
"id": 107,
"created_at": "2018-12-12 14:21:45",
"updated_at": "2021-12-01 12:05:56",
"client_id": 79,
"revenue_share": "0.00",
"instagram_revenue_share": "0.00",
"name": "Not Approved"
},
"client": {
"id": 79,
"client_id": "949469247648506",
"payment_organization_id": null,
"name": "Metapic GB",
"created_at": "2018-12-12 14:21:45",
"updated_at": "2021-08-03 12:48:21",
"own_paymentsystem": 0,
"config": "{ \"tabs\": { \"home\":{\"showMenu\":true}, \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true}, \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true} }, \"canLogin\": true}",
"user_mail_config": {
"accepted": "uk-welcome-to-metapic",
"registered": "we-ve-received-your-application"
},
"feed": "live_gb",
"locale": "GB",
"revenue_model": "blog_percentage",
"revenue_share": "0.00",
"store_group_id": 17,
"default_revenue_tier": 107,
"default_verified_users": 0,
"storegroup": {
"id": 17,
"name": "Standard GB",
"shopello": 0,
"key": "gb",
"locale": "GB",
"lang": "en",
"currency": "GBP",
"es": 0,
"payment_limit": 5000,
"paid_to_account": "550-5185",
"our_reference": "Tobias Sjödin",
"currency_obj": {
"code": "GBP",
"name": "Pound sterling",
"symbol": "£",
"subunit": "p",
"is_before": 1,
"ratio_to_eur": 1.16
}
}
}
}
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 400
x-ratelimit-remaining: 371
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6InptSkVaRXdKN1d5b09uVHJZZ01FWUE9PSIsInZhbHVlIjoiMXVpMzBEQ05qdEZVUE1IRnkzMHdzbkdVT0xNU3Rpd1BKeDcwL3YxS1l5SXpmY25EU1l5QXVUOGdTUUZObVcyYU9vTVBmQU5KSkVTRHFBaWRESjBpN0N6eWYxaXZHSTRzSGo5T1pxa21FdFBPYTJzaC9BMlV3VHJwbjF5eVVOL0ciLCJtYWMiOiIwNmE2MDMzOWZjOWJlZjYyNmNiZjdmYWFkN2VlZDdjZDA2MTBjYjQ1ZWE4OGVjMzJmZWVhMTU0MWViYjM0MzI4IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:17:58 GMT; Max-Age=7200; path=/; httponly
{
"error": "Wrong login data",
"message": "User not found"
}
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/quia/users/1/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/quia/users/1/create-link" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"links\": \"[\\\"https:\\/\\/ellos.com\\\"]\",
\"dry\": 1
}"
const url = new URL(
"https://api.metapic.com/agency/quia/users/1/create-link"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"links": "[\"https:\/\/ellos.com\"]",
"dry": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"before": "https://na-kd.com",
"status": "success",
"store": "NA-KD",
"storeId": "{storeId}",
"type": "tradedoubler_SE",
"after": "https://c.mtpc.se/tags/link/2082974",
"currency": "SEK",
"tag_id": "{tagId}",
"user_revenue_cpc": 250,
"user_instagram_cpc": 100,
"user_revenue_cpa": 0,
"user_instagram_cpa": 0,
"user_revenue_cpc_formated": "2.50 kr",
"user_instagram_cpc_formated": "1.00 kr",
"traffic_sources_costs": [
{
"id": 301,
"store_id": "{storeId}",
"source": 0,
"cpc": 250,
"invoice_cpc": 250,
"cpa": 0,
"invoice_cpa": null,
"created_at": "2023-05-03 12:01:08",
"updated_at": "2023-05-03 12:01:08",
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "2.50 kr",
"title": "General"
},
{
"id": 302,
"store_id": "{storeId}",
"source": 1,
"cpc": 100,
"invoice_cpc": 100,
"cpa": null,
"invoice_cpa": null,
"created_at": "2023-05-03 12:01:09",
"updated_at": "2023-05-03 12:01:09",
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "1.00 kr",
"title": "Instagram"
}
]
},
"..."
]
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 264
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6ImJTY0dGMXBPQXA0Y2I3TGlod0RYSnc9PSIsInZhbHVlIjoiWU1wTjBWMGVkREV6aXpiVDU4b3I1REl5SjZqN2wyeGp3YkpYUHcxUzNiNHNQM1Q5TkdmWWk1cm1FbWtPZlhmRFVVYjUrd01rWjVGQlFkL0tZQkpNUkx0WVJyK040RGpkVWlZVHYzS2tRUzFmWVZ5VVRlRGF2OU5SdmdtQTlxb2siLCJtYWMiOiIwOTUyMTg3YWMyMTYxNmFlYjM1MzA0NGI2NjlkYWYxNjI1YjE1OGZiZTkzOTYzMWE3OWZlZTdjNDk0MDNhY2M5IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:05 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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/2/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/2/offers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/stores/2/offers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 51
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/2/offers';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'json' => [
'active' => true,
'campaign_title' => 'xdsqelrmrvnnzrafkjyjqyhc',
'campaign_text' => 'fhvtohdyqpiuixxfpbplywh',
'has_product_seeding' => false,
'todo' => [
'et',
],
'has_onetime_payment' => false,
'one_time_payment' => 5,
'valid_from' => '2024-03-28T13:17:40',
'valid_until' => '2097-10-27',
'max_clicks' => 19,
'per_user_limit' => false,
'max_money' => 6,
'type' => 'suggestion',
'traffic_sources_costs' => [
'debitis',
],
'targets' => [
'user_ids' => [
7,
],
'user_tag_ids' => [
5,
],
'store_group_ids' => [
15,
],
'emails' => [
'[email protected]',
],
'social_media_identifiers' => [
'gwchqzpcwhsyribksrhtc',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api.metapic.com/v2/stores/2/offers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"active\": true,
\"campaign_title\": \"xdsqelrmrvnnzrafkjyjqyhc\",
\"campaign_text\": \"fhvtohdyqpiuixxfpbplywh\",
\"has_product_seeding\": false,
\"todo\": [
\"et\"
],
\"has_onetime_payment\": false,
\"one_time_payment\": 5,
\"valid_from\": \"2024-03-28T13:17:40\",
\"valid_until\": \"2097-10-27\",
\"max_clicks\": 19,
\"per_user_limit\": false,
\"max_money\": 6,
\"type\": \"suggestion\",
\"traffic_sources_costs\": [
\"debitis\"
],
\"targets\": {
\"user_ids\": [
7
],
\"user_tag_ids\": [
5
],
\"store_group_ids\": [
15
],
\"emails\": [
\"[email protected]\"
],
\"social_media_identifiers\": [
\"gwchqzpcwhsyribksrhtc\"
]
}
}"
const url = new URL(
"https://api.metapic.com/v2/stores/2/offers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"active": true,
"campaign_title": "xdsqelrmrvnnzrafkjyjqyhc",
"campaign_text": "fhvtohdyqpiuixxfpbplywh",
"has_product_seeding": false,
"todo": [
"et"
],
"has_onetime_payment": false,
"one_time_payment": 5,
"valid_from": "2024-03-28T13:17:40",
"valid_until": "2097-10-27",
"max_clicks": 19,
"per_user_limit": false,
"max_money": 6,
"type": "suggestion",
"traffic_sources_costs": [
"debitis"
],
"targets": {
"user_ids": [
7
],
"user_tag_ids": [
5
],
"store_group_ids": [
15
],
"emails": [
"[email protected]"
],
"social_media_identifiers": [
"gwchqzpcwhsyribksrhtc"
]
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 49
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'json' => [
'active' => true,
'campaign_title' => 'cdzuveicmeskzyecwlbtj',
'campaign_text' => 'ppuznp',
'has_product_seeding' => false,
'todo' => [
'accusantium',
],
'has_onetime_payment' => false,
'one_time_payment' => 12,
'valid_from' => '2024-03-28T13:17:43',
'valid_until' => '2074-05-08',
'max_clicks' => 17,
'per_user_limit' => true,
'max_money' => 21,
'type' => 'standard',
'traffic_sources_costs' => [
'porro',
],
'targets' => [
'user_ids' => [
8,
],
'user_tag_ids' => [
16,
],
'store_group_ids' => [
1,
],
'emails' => [
'[email protected]',
],
'social_media_identifiers' => [
'jvorksilsqfsbibx',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
"https://api.metapic.com/v2/offers/23" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"active\": true,
\"campaign_title\": \"cdzuveicmeskzyecwlbtj\",
\"campaign_text\": \"ppuznp\",
\"has_product_seeding\": false,
\"todo\": [
\"accusantium\"
],
\"has_onetime_payment\": false,
\"one_time_payment\": 12,
\"valid_from\": \"2024-03-28T13:17:43\",
\"valid_until\": \"2074-05-08\",
\"max_clicks\": 17,
\"per_user_limit\": true,
\"max_money\": 21,
\"type\": \"standard\",
\"traffic_sources_costs\": [
\"porro\"
],
\"targets\": {
\"user_ids\": [
8
],
\"user_tag_ids\": [
16
],
\"store_group_ids\": [
1
],
\"emails\": [
\"[email protected]\"
],
\"social_media_identifiers\": [
\"jvorksilsqfsbibx\"
]
}
}"
const url = new URL(
"https://api.metapic.com/v2/offers/23"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"active": true,
"campaign_title": "cdzuveicmeskzyecwlbtj",
"campaign_text": "ppuznp",
"has_product_seeding": false,
"todo": [
"accusantium"
],
"has_onetime_payment": false,
"one_time_payment": 12,
"valid_from": "2024-03-28T13:17:43",
"valid_until": "2074-05-08",
"max_clicks": 17,
"per_user_limit": true,
"max_money": 21,
"type": "standard",
"traffic_sources_costs": [
"porro"
],
"targets": {
"user_ids": [
8
],
"user_tag_ids": [
16
],
"store_group_ids": [
1
],
"emails": [
"[email protected]"
],
"social_media_identifiers": [
"jvorksilsqfsbibx"
]
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 46
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23';
$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/23" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offers/23"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 44
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23/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/23/targets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offers/23/targets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 42
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23/targets';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'json' => [
'user_ids' => [
14,
],
'user_tag_ids' => [
15,
],
'store_group_ids' => [
7,
],
'emails' => [
'[email protected]',
],
'social_media_identifiers' => [
'vuwtikeeedcwwiokixca',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api.metapic.com/v2/offers/23/targets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"user_ids\": [
14
],
\"user_tag_ids\": [
15
],
\"store_group_ids\": [
7
],
\"emails\": [
\"[email protected]\"
],
\"social_media_identifiers\": [
\"vuwtikeeedcwwiokixca\"
]
}"
const url = new URL(
"https://api.metapic.com/v2/offers/23/targets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"user_ids": [
14
],
"user_tag_ids": [
15
],
"store_group_ids": [
7
],
"emails": [
"[email protected]"
],
"social_media_identifiers": [
"vuwtikeeedcwwiokixca"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 40
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23/targets/fuga';
$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/23/targets/fuga" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offers/23/targets/fuga"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 38
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23/targets/placeat';
$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/23/targets/placeat" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offers/23/targets/placeat"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 36
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23/targets/maiores';
$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/23/targets/maiores" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offers/23/targets/maiores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 34
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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 client user permission config the agency user.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/agency/user/permissions/sed';
$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/sed" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/user/permissions/sed"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 270
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IjQ0THNILzVJVGc0VWIxbkVlN3h4UGc9PSIsInZhbHVlIjoiQ0MxUUxJVk0yRjBldU1naUhBK1JRZG5yQUFKelhzT3VzKzgzbVB6QmgrRmtuNHZnODRRN3VGSWdTVWZ1N1hSbDZlUWdHRkc5ek16OUx0Z2FpcFh5SnIrd1prc0FucGR0YjVMWC9FZGpXUElONDYvSnBOeXlvaWRXRk9PeXZIYkYiLCJtYWMiOiI4MWFkOGYxYWFmZjk5NjE2MmUwMTIxMjkwNDU3MjkyNjEzZDhlODJlOTZmYzdjYjZkMzAzZThhODZlOWFkMDA4IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:17:59 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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/2/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/2/payment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/stores/2/payment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 160
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6ImZqbThCcVZyTVBCaEtVSVkvUVNmQ2c9PSIsInZhbHVlIjoiaU01UmlDcUVNczRpTWtoemZ5UkJ3OTAxbHhlU3drV0ZhNERIOGdERmpDL0JST1dtbzRrMTJrdE5nSFJSdHkyVHA2R1BqcHVEb2tiSXpieERFaXJHMmVwWDRPVWd4bVArWWhmeFQrMEYwYmI0MHRWU05hcGVPb1o3TWllckdHaC8iLCJtYWMiOiJiZmE4YmMyNTljNzEwNzgzNThhMGVlYzE2NGViYzE4MjQ3YjY0ODkwYjUyNmY0ZmZkMDg1YWYwY2ZjNTFjYzU3IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:09 GMT; Max-Age=7200; path=/; httponly
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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.
Checks if user has been added to the offer.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/odit/users/1';
$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/odit/users/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offer-by-token/odit/users/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6Imo1U05OTWpRSWRsM0o5UXNzalZ0NXc9PSIsInZhbHVlIjoiVk8zRHAzQmNzR2RGK0I5NFkvQ1ltT3RuZUhNTjd0TWdqbjAyc1RDS0RvQXR2OEUvTEgwMEcyd2pWUWxpUzRzcE1yU3IxKzNUam5DbStweGtjMW1NcmdnVmZwcm9sOVl0VDZRa1FCcVdHYjIwNkFGL25ZOTVCV20ycTdzUm5pYTYiLCJtYWMiOiIxNzdiNWZlMzE5OTE3NDFjZTM0OTAwYzA4ODM1MmUxYTg1Y2NmZTk5MGZjMTI2OWQ4ZWI4OGM1MGVmNWFjZTljIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:09 GMT; Max-Age=7200; path=/; httponly
{
"message": "No query results for model [App\\Models\\Offer] odit",
"exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException",
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
"line": 487,
"trace": [
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
"line": 463,
"function": "prepareException",
"class": "Illuminate\\Foundation\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Exceptions/Handler.php",
"line": 56,
"function": "render",
"class": "Illuminate\\Foundation\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php",
"line": 54,
"function": "render",
"class": "App\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 51,
"function": "render",
"class": "NunoMaduro\\Collision\\Adapters\\Laravel\\ExceptionHandler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 188,
"function": "handleException",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Http/Middleware/VerifyCsrfToken.php",
"line": 29,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "App\\Http\\Middleware\\VerifyCsrfToken",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php",
"line": 49,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\View\\Middleware\\ShareErrorsFromSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 121,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 64,
"function": "handleStatefulRequest",
"class": "Illuminate\\Session\\Middleware\\StartSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Session\\Middleware\\StartSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php",
"line": 37,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php",
"line": 67,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Cookie\\Middleware\\EncryptCookies",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 805,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 784,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 748,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 737,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 200,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 144,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 62,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\HandleCors",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 40,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 99,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 39,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\TrustProxies",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 175,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 144,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 300,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 288,
"function": "callLaravelOrLumenRoute",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 91,
"function": "makeApiCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 44,
"function": "makeResponseCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 35,
"function": "makeResponseCallIfConditionsPass",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 236,
"function": "__invoke",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 163,
"function": "iterateThroughStrategies",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 95,
"function": "fetchResponses",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 125,
"function": "processRoute",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 72,
"function": "extractEndpointsInfoFromLaravelApp",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 50,
"function": "extractEndpointsInfoAndWriteToDisk",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Console/Commands/Documentation/GenerateDocumentation.php",
"line": 66,
"function": "get",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Console/Commands/Documentation/GenerateDocumentation.php",
"line": 50,
"function": "init",
"class": "App\\Console\\Commands\\Documentation\\GenerateDocumentation",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 36,
"function": "handle",
"class": "App\\Console\\Commands\\Documentation\\GenerateDocumentation",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/Util.php",
"line": 41,
"function": "Illuminate\\Container\\{closure}",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 93,
"function": "unwrapIfClosure",
"class": "Illuminate\\Container\\Util",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 35,
"function": "callBoundMethod",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 662,
"function": "call",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 211,
"function": "call",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Command/Command.php",
"line": 326,
"function": "execute",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 180,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 1096,
"function": "run",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 324,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 175,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
"line": 201,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/artisan",
"line": 35,
"function": "handle",
"class": "Illuminate\\Foundation\\Console\\Kernel",
"type": "->"
}
]
}
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.
Offers
Get offer
requires authentication
Return offer details.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/23';
$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/23" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offers/23"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 188
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IkhtZ2FLS3UrWFdCWURxOFEzaHlqUFE9PSIsInZhbHVlIjoiZEUzMnlpa203MkJpOUhqd2hLdUtJUTI0QXZhNmI1bFRCY05aTjUzUmxTc0llV3JyS1VpajEyaXZVQmR5dzVPMkJCc3lvdmJKaktDWlI4Q1BTUTMyWTB0aUs0YWFkUGJKY2Q4MmlSWi9HTjAwbCttTGVmWWlkWlJPbjc0eDhiZ3kiLCJtYWMiOiJiOGQ5YmM2ZjE4YzkyMjk2YWQ2ZjgxOTFkNzU5M2QzNGRkMGZhM2U1YTQwODA4YmY0YjdkODk0ZmE2MmU2YjI2IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:17:43 GMT; Max-Age=7200; path=/; httponly
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/23/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/23/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/23/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());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 32
access-control-allow-origin: *
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/repudiandae';
$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/repudiandae" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/v2/offer-by-token/repudiandae"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IlQ1VGRKOE9Nc3o5Q1gyRWlubzNPSkE9PSIsInZhbHVlIjoiWWRkWUFvemtscFpCN3o4S3BNWElvVERTeXJDc0JiZk9WMXhVa3cyQ2NBWUZ2Vi94a3ZpWVlPbVhYOHlzTyt1U0g1V3ZFdWVQSnA4RzU4WWpvMUZNdUNXN1RDOS9nS2ord1dqT0I1OHMyYmxRNmRCQ0pHSkErc1ZvUmRSRlNKY2MiLCJtYWMiOiI4MzI2M2Q5NGMyODdiOTg2NDI4ZjVmNDFmMTM1NDBjMDhjMjBmYzA4YjM1YTdkOGE4MGU0YzUzNzA3MjZmZTZmIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:17:58 GMT; Max-Age=7200; path=/; httponly
{
"message": "No query results for model [App\\Models\\Offer] repudiandae",
"exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException",
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
"line": 487,
"trace": [
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
"line": 463,
"function": "prepareException",
"class": "Illuminate\\Foundation\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Exceptions/Handler.php",
"line": 56,
"function": "render",
"class": "Illuminate\\Foundation\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php",
"line": 54,
"function": "render",
"class": "App\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 51,
"function": "render",
"class": "NunoMaduro\\Collision\\Adapters\\Laravel\\ExceptionHandler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 188,
"function": "handleException",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Http/Middleware/VerifyCsrfToken.php",
"line": 29,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "App\\Http\\Middleware\\VerifyCsrfToken",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php",
"line": 49,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\View\\Middleware\\ShareErrorsFromSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 121,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 64,
"function": "handleStatefulRequest",
"class": "Illuminate\\Session\\Middleware\\StartSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Session\\Middleware\\StartSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php",
"line": 37,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php",
"line": 67,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Cookie\\Middleware\\EncryptCookies",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 805,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 784,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 748,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 737,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 200,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 144,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 62,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\HandleCors",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 40,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 99,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 39,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\TrustProxies",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 175,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 144,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 300,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 288,
"function": "callLaravelOrLumenRoute",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 91,
"function": "makeApiCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 44,
"function": "makeResponseCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 35,
"function": "makeResponseCallIfConditionsPass",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 236,
"function": "__invoke",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 163,
"function": "iterateThroughStrategies",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 95,
"function": "fetchResponses",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 125,
"function": "processRoute",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 72,
"function": "extractEndpointsInfoFromLaravelApp",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 50,
"function": "extractEndpointsInfoAndWriteToDisk",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Console/Commands/Documentation/GenerateDocumentation.php",
"line": 66,
"function": "get",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Console/Commands/Documentation/GenerateDocumentation.php",
"line": 50,
"function": "init",
"class": "App\\Console\\Commands\\Documentation\\GenerateDocumentation",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 36,
"function": "handle",
"class": "App\\Console\\Commands\\Documentation\\GenerateDocumentation",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/Util.php",
"line": 41,
"function": "Illuminate\\Container\\{closure}",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 93,
"function": "unwrapIfClosure",
"class": "Illuminate\\Container\\Util",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 35,
"function": "callBoundMethod",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 662,
"function": "call",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 211,
"function": "call",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Command/Command.php",
"line": 326,
"function": "execute",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 180,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 1096,
"function": "run",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 324,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 175,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
"line": 201,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/artisan",
"line": 35,
"function": "handle",
"class": "Illuminate\\Foundation\\Console\\Kernel",
"type": "->"
}
]
}
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/veniam/users/1/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/veniam/users/1/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/veniam/users/1/join"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IjdvSTB0ZnF6MVdxNGw1OXVkRXB6MHc9PSIsInZhbHVlIjoiVklYNGpEK1lhV2tKeFNSMElqUkVzaVY1clN4eTB2Snc0K3BUaHhHY2paLy8vMEJBamhCWE5UR3A0dEZtWGhMc2Q5UmF4ZllmNDBWcUhyNk1Uek1FQ0hTN250ZVRTeEVJL1pmUlYyMUpnNDRJYkh5a090UDU0V05wb2JlUWtRSHEiLCJtYWMiOiIxN2RiZDU3YjBiNTg3MGMwNmNkNGIzNDk5MjFmMjJiYWVkNzg2MzFhMTU5Y2U5MDQ3NjNiZWFlNTAyMGY1OWI3IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:10 GMT; Max-Age=7200; path=/; httponly
{
"message": "No query results for model [App\\Models\\Offer] veniam",
"exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException",
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
"line": 487,
"trace": [
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
"line": 463,
"function": "prepareException",
"class": "Illuminate\\Foundation\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Exceptions/Handler.php",
"line": 56,
"function": "render",
"class": "Illuminate\\Foundation\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php",
"line": 54,
"function": "render",
"class": "App\\Exceptions\\Handler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 51,
"function": "render",
"class": "NunoMaduro\\Collision\\Adapters\\Laravel\\ExceptionHandler",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 188,
"function": "handleException",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Http/Middleware/VerifyCsrfToken.php",
"line": 29,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "App\\Http\\Middleware\\VerifyCsrfToken",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php",
"line": 49,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\View\\Middleware\\ShareErrorsFromSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 121,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php",
"line": 64,
"function": "handleStatefulRequest",
"class": "Illuminate\\Session\\Middleware\\StartSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Session\\Middleware\\StartSession",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php",
"line": 37,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php",
"line": 67,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Cookie\\Middleware\\EncryptCookies",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 805,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 784,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 748,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 737,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 200,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 144,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 62,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\HandleCors",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 40,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 99,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 39,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 183,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\TrustProxies",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 119,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 175,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 144,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 300,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 288,
"function": "callLaravelOrLumenRoute",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 91,
"function": "makeApiCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 44,
"function": "makeResponseCall",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
"line": 35,
"function": "makeResponseCallIfConditionsPass",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 236,
"function": "__invoke",
"class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 163,
"function": "iterateThroughStrategies",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
"line": 95,
"function": "fetchResponses",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 125,
"function": "processRoute",
"class": "Knuckles\\Scribe\\Extracting\\Extractor",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 72,
"function": "extractEndpointsInfoFromLaravelApp",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
"line": 50,
"function": "extractEndpointsInfoAndWriteToDisk",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Console/Commands/Documentation/GenerateDocumentation.php",
"line": 66,
"function": "get",
"class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/app/Console/Commands/Documentation/GenerateDocumentation.php",
"line": 50,
"function": "init",
"class": "App\\Console\\Commands\\Documentation\\GenerateDocumentation",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 36,
"function": "handle",
"class": "App\\Console\\Commands\\Documentation\\GenerateDocumentation",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/Util.php",
"line": 41,
"function": "Illuminate\\Container\\{closure}",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 93,
"function": "unwrapIfClosure",
"class": "Illuminate\\Container\\Util",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
"line": 35,
"function": "callBoundMethod",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 662,
"function": "call",
"class": "Illuminate\\Container\\BoundMethod",
"type": "::"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 211,
"function": "call",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Command/Command.php",
"line": 326,
"function": "execute",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Console/Command.php",
"line": 180,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 1096,
"function": "run",
"class": "Illuminate\\Console\\Command",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 324,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/symfony/console/Application.php",
"line": 175,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
"line": 201,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/tmp/build_e579d9f4/artisan",
"line": 35,
"function": "handle",
"class": "Illuminate\\Foundation\\Console\\Kernel",
"type": "->"
}
]
}
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/non/users/1/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/non/users/1/performance?from=2019-01-01&to=2019-02-02" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/non/users/1/performance"
);
const params = {
"from": "2019-01-01",
"to": "2019-02-02",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"clicks": 6202,
"earned": 570082,
"one_time_payments": "170200",
"pending": 0,
"tags": 20,
"images": 0
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 266
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IkxMOVl2YUtoQldMMkhYdGU2N0k4NFE9PSIsInZhbHVlIjoiY3BQOWtKTkcwbjBnckRUbnRxZkRZYVU0SmxNWWxReDlROFRWRTNvRmN0RVE1RGlEZVZ5dEQ1alpmdUFTWU9wMGZJMytzTHNSRU1NZUFzT3p4TzRkOVhTakZuczR6TGtudWNRWi9lMXFEckdRcmhBMFhYQ01jYy9pSHhKU012SVoiLCJtYWMiOiJlYTBlZjlkODkxNGY2MjEwN2QzZDAxYzEwMTRjMjE5YzNlZjczYzRkZGRjYzdmZmViNGUwYWQ0MTlkN2I3NjFmIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:03 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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/9/users/4/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/9/users/4/instagram-stats" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/9/users/4/instagram-stats"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "316306590",
"username": "stonetag",
"email": "AVSTÄ[email protected]",
"phone": null,
"created_at": "2014-06-11 18:12:51",
"updated_at": "2022-05-26 12:32:45",
"admin": 0,
"last_active": "2022-05-26 08:20:02",
"first_name": "petra",
"surname": "stentagg",
"vat_no": null,
"country": "SE",
"city": "karlshamn",
"address": "hallonstigen 10",
"postcode": "37440",
"tier_pricing_type": "",
"config": null,
"sign_user_agreement": "2020-03-25 20:46:47",
"revenue_tier_id": 4,
"recruitment_utm": null,
"auth0": null,
"payment_blocked": 0,
"is_suspended": true,
"is_verified": false,
"social_media": [
{
"id": 131,
"user_id": 1270,
"type": "instagram",
"identifier": "stonetag",
"is_valid": 1,
"created_at": "2018-10-04 13:59:49",
"updated_at": "2021-06-02 11:02:01",
"followers": 1978,
"remote_id": "316306590"
},
{
"id": 223,
"user_id": 1270,
"type": "blog",
"identifier": "https://nouw.com/stonetag",
"is_valid": 1,
"created_at": "2018-11-05 10:11:33",
"updated_at": "2018-11-05 10:11:33",
"followers": null,
"remote_id": ""
}
],
"user_id": null,
"full_name": "Petra Stentagg",
"follower_count": 2581,
"avg_like_count": 22.979166666666668,
"avg_comment_count": 2.5,
"avg_stories_per_day": "4.537",
"profile_pic_s3_url": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/stonetag.jpg",
"has_full_data": false,
"performance_score": 0.36,
"branding_score": 0.021,
"work_status": 0,
"engagement_rate": 0.9871819708123466
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 263
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IjBRZWIvN1J5MDlzaEJ6R0tKTDR3dEE9PSIsInZhbHVlIjoieWRjMDF0OTB0cDZ1dlhtc283WVpOMDhrd0JuVzJSaktXMHJMNUVrZ0xOUXA4UUNEdzY5Nlk1dHRMU0EwNmtxVkJodVVXZ2pxeFdHYmhrS0NkajN4aE5IbHJFRTlkOS9WaHVIaXZwVThaWEhUbjBBUE1VZk1xZXpZODYydzA2Zk0iLCJtYWMiOiIxZTU4ZjQ1YTYzMTE3YTFhNzE3NGM1MTA5OTE5ZjBkODc0MTYyZWNiMzdmOWMwZTdlMjRjOGRjYjU5YjgyZTgyIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:06 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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/13/users/14/link-list';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'page' => 'est',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/agency/13/users/14/link-list?page=est" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/13/users/14/link-list"
);
const params = {
"page": "est",
};
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
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 262
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IkcwbTVTQjhscm5JUnpCOEdtNVpGVmc9PSIsInZhbHVlIjoiamRQeVJwczZVYWdsdDFiaXdMQVdwdkpzbTBtaUdBaDBjV0JhZEJEY01BUmx6SUpMVXNMV3pFWHU2MXBkckpuMnZKNnI4N21WMmdjQ09TbVYwNmkwU3lPT0h2ZEpBNEY3VmNFVm9XTnlEcHZobnBmTW52c1NCdWJvNUl4b0YySUQiLCJtYWMiOiI2ZDQxMTA5N2I1N2I3N2M4MjRlOTliMzg3YTA1ZmY3YmQ5ODcxMDJiZjE2M2ZiYzA0MzA3Y2ZiOGFkMDRjNjI0IiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:07 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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' => 'unde',
'domains' => [
'HI.nHN./',
],
'categories' => [
1,
],
'logo_url' => 'http://www.hilpert.com/omnis-qui-est-et-et-qui.html',
'country' => 'SE',
'currency' => 'EUR',
'language' => 'rem',
'billing' => [
'company_name' => 'nobis',
'street' => 'quasi',
'postal_code' => 'doloremque',
'city' => 'dolore',
'vat_number' => 'similique',
],
],
]
);
$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\": \"unde\",
\"domains\": [
\"HI.nHN.\\/\"
],
\"categories\": [
1
],
\"logo_url\": \"http:\\/\\/www.hilpert.com\\/omnis-qui-est-et-et-qui.html\",
\"country\": \"SE\",
\"currency\": \"EUR\",
\"language\": \"rem\",
\"billing\": {
\"company_name\": \"nobis\",
\"street\": \"quasi\",
\"postal_code\": \"doloremque\",
\"city\": \"dolore\",
\"vat_number\": \"similique\"
}
}"
const url = new URL(
"https://api.metapic.com/v2/stores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"name": "unde",
"domains": [
"HI.nHN.\/"
],
"categories": [
1
],
"logo_url": "http:\/\/www.hilpert.com\/omnis-qui-est-et-et-qui.html",
"country": "SE",
"currency": "EUR",
"language": "rem",
"billing": {
"company_name": "nobis",
"street": "quasi",
"postal_code": "doloremque",
"city": "dolore",
"vat_number": "similique"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 161
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6InhXQnhrZDRYWktrNmZFTTRNa1RSc3c9PSIsInZhbHVlIjoiT2VUcG1JcTEyVnFlVDdKaVdybFovcjV3M2ZkM2hjWVJ2V3VUS28zTDBuc3RZc2UrQm1EZEErWkRDdlBFV3JzendJN1NuUDloMFJhUGdEQ3NMUHJlTVU0a054YnUwY0l6RFFGMlRvWk16WUpoRENjc1BVN0U1MEF1VVFhcUptMEwiLCJtYWMiOiIyMmEyOGY5MGYyZDE0MGYwMjFjZWYxYzgwYmY4OWQ5OGM2Nzg3NzhhZDBkOWQxNzhhNGViYTQ1NzJhYzY0YzUzIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:08 GMT; Max-Age=7200; path=/; httponly
{
"status": 403,
"error": "forbidden",
"message": "Access Forbidden"
}
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/quae/users/1/media';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'type' => 'excepturi',
'identifier' => '2',
'order_by' => 'modi',
'offer_id' => '123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/agency/quae/users/1/media?type=excepturi&identifier=2&order_by=modi&offer_id=123" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/quae/users/1/media"
);
const params = {
"type": "excepturi",
"identifier": "2",
"order_by": "modi",
"offer_id": "123",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"current_page": 1,
"data": [
{
"id": "{mediaId}",
"username": "{username}",
"url": "/instagramStorys/{username}/2245371215538904581_4704145696.mp4",
"type": "instagram",
"created_at": "2020-02-16 22:42:36",
"clicks": "657",
"nr_orders": 12,
"order_value": 21345,
"cost": 12312
},
{
"...": "..."
}
],
"first_page_url": "http://local.api.metapic/stores/{id}/media?page=1",
"from": 1,
"last_page": 3,
"last_page_url": "http://local.api.metapic/stores/{id}/media?page=3",
"next_page_url": "http://local.api.metapic/stores/{id}/media?page=2",
"path": "http://local.api.metapic/stores/{id}/media",
"per_page": 8,
"prev_page_url": null,
"to": 8,
"total": 21
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 265
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6ImRyQ21DMm1DQ3RYZVhaRk5iNDRWUXc9PSIsInZhbHVlIjoiWC9pdlVNZlNJUFdXaEpqVDZvU0JJRkJ5NWtDMW1tNkdNaEJUZEorWEM0MG9MUklZbmNrWElvWjF4WmxKRlo1TGFreUJxY1BMYlNCcUpzOFIreHFGYXJmQlk5KzJ5d2dTb2xRRWJCc0IxRzAveTJmcVRpaU4xZHVBOXpLUTBQU0IiLCJtYWMiOiJhNzgxYmFjM2RjMWNkYmM4Yjc1ZTIwOWZjNTU4YzNmMzUwOGZiZTI0NWMyOGI5ZWRjODE4ZDdiNTYzZDRjMjMxIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:04 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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/iste';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => '{token}',
],
'query' => [
'username' => 'eos',
'from' => '2019-01-01',
'to' => '2019-01-02',
'sort' => 'consequuntur',
'orderBy' => 'modi',
'format' => 'molestiae',
'groupByDate' => '19',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api.metapic.com/agency/influencers/iste?username=eos&from=2019-01-01&to=2019-01-02&sort=consequuntur&orderBy=modi&format=molestiae&groupByDate=19" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/agency/influencers/iste"
);
const params = {
"username": "eos",
"from": "2019-01-01",
"to": "2019-01-02",
"sort": "consequuntur",
"orderBy": "modi",
"format": "molestiae",
"groupByDate": "19",
};
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
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 268
access-control-allow-origin: *
set-cookie: laravel_session=eyJpdiI6IkxJK1Y3emgrdWpFMTlwaWZ2VXZ0MFE9PSIsInZhbHVlIjoiQ3I2SUpYalN1NlZUaWlzbVA3R3h1MmNkU1hjaUF2MFJsMGVXZU5TdzV4eVZWZHhWTlJjY25hdVFUb2E1N3BDM2VDYmRnZjNwVVIrSjdEV2ZhU1lsZDJjcmx4VUVsWHc1VEVQaGx5eEQ0ZVg2aGZLRndVYWpUTHBCYnZ4all0V24iLCJtYWMiOiIzM2VlMzM4MjA4MTE1NWI1OGQ2ZDg5MmI1ZjQ1ZTFhZmViMmU2NmRlMTY0ZDU3NjlmMzA0YTJmZjMwYjU5N2MyIiwidGFnIjoiIn0%3D; expires=Thu, 28 Mar 2024 14:18:01 GMT; Max-Age=7200; path=/; httponly
{
"status": 401,
"error": "Unauthorized",
"message": "User not found"
}
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.