Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Chats
Get Chats
requires authentication
Get list of user chats with Admin Support
Example request:
curl --request GET \
--get "https://api.metapic.com/support-admin-chat" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/support-admin-chat"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"user_id": "{userId}",
"active": 1,
"type": "support_admin",
"updated_at": "2022-01-24 16:42:46",
"created_at": "2022-01-24 16:42:46",
"id": "{chatId}",
"messages": []
}
]
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.
Create Chat
requires authentication
Create new chat with Admin Support
Example request:
curl --request POST \
"https://api.metapic.com/support-admin-chat" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/support-admin-chat"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"user_id": "{userId}",
"active": 1,
"type": "support_admin",
"updated_at": "2022-01-24 16:42:46",
"created_at": "2022-01-24 16:42:46",
"id": "{chatId}",
"messages": [
{
"id": 189,
"chat_id": 2,
"user_id": "{userId}",
"from": null,
"message": "test",
"created_at": "2022-01-24 11:40:10",
"updated_at": "2022-01-24 11:40:10",
"user": {
"id": "{userId}",
"username": "{username}",
"email": "{email}",
"is_suspended": false,
"is_verified": false
}
}
]
}
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 Chat
requires authentication
Get user chat with Admin Support
Example request:
curl --request GET \
--get "https://api.metapic.com/support-admin-chat/eveniet" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/support-admin-chat/eveniet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"user_id": "{userId}",
"active": 1,
"type": "support_admin",
"updated_at": "2022-01-24 16:42:46",
"created_at": "2022-01-24 16:42:46",
"id": "{chatId}",
"messages": [
{
"id": 189,
"chat_id": 2,
"user_id": "{userId}",
"from": null,
"message": "test",
"created_at": "2022-01-24 11:40:10",
"updated_at": "2022-01-24 11:40:10",
"user": {
"id": "{userId}",
"username": "{username}",
"email": "{email}",
"is_suspended": false,
"is_verified": false
}
}
]
}
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.
Create Message
requires authentication
Create message in Admin Support
Example request:
curl --request POST \
"https://api.metapic.com/support-admin-chat/1/messages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"message\": \"textMessage\"
}"
const url = new URL(
"https://api.metapic.com/support-admin-chat/1/messages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"message": "textMessage"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"chat_id": "2",
"user_id": "{userId}",
"message": "test message",
"updated_at": "2022-01-24 17:43:37",
"created_at": "2022-01-24 17:43:37",
"id": 222
}
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
Get Deep-link urls
requires authentication
Return list of deep-link urls for authorized user
Example request:
curl --request GET \
--get "https://api.metapic.com/users/1/deep-link-urls" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/1/deep-link-urls"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DeepLink BlogPost
requires authentication
Transform a html blocks links to metapic links. Will only transform links that you can earn money on
Example request:
curl --request POST \
"https://api.metapic.com/deepLinkBlogPost/et" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"blogPost\": \"<div> <a href=\'https:\\/\\/na-kd.com\'> link<\\/a><\\/div>\",
\"dry\": 1
}"
const url = new URL(
"https://api.metapic.com/deepLinkBlogPost/et"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"blogPost": "<div> <a href='https:\/\/na-kd.com'> link<\/a><\/div>",
"dry": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"newHtml": "<div> <a href=\"https://c.mtpc.se/tags/link/2082970\"> link</a></div>",
"linkTranslation": [
{
"before": "https://na-kd.com",
"status": "success",
"store": "NA-KD",
"storeId": "{storeId}",
"type": "tradedoubler_SE",
"after": "https://c.mtpc.se/tags/link/2082970",
"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"
}
]
}
],
"isUpdated": true
}
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.
Create Deep Links
requires authentication
Create deeplinks from an array of links
Example request:
curl --request POST \
"https://api.metapic.com/deep-links" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"links\": \"[\\\"https:\\/\\/ellos.com\\\"]\",
\"userId\": 1,
\"dry\": 1
}"
const url = new URL(
"https://api.metapic.com/deep-links"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"links": "[\"https:\/\/ellos.com\"]",
"userId": 1,
"dry": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"before": "https://na-kd.com",
"status": "success",
"store": "NA-KD",
"storeId": "{storeId}",
"type": "tradedoubler_SE",
"after": "https://c.mtpc.se/tags/link/2082974",
"currency": "SEK",
"tag_id": "{tagId}",
"user_revenue_cpc": 250,
"user_instagram_cpc": 100,
"user_revenue_cpa": 0,
"user_instagram_cpa": 0,
"user_revenue_cpc_formated": "2.50 kr",
"user_instagram_cpc_formated": "1.00 kr",
"traffic_sources_costs": [
{
"id": 301,
"store_id": "{storeId}",
"source": 0,
"cpc": 250,
"invoice_cpc": 250,
"cpa": 0,
"invoice_cpa": null,
"created_at": "2023-05-03 12:01:08",
"updated_at": "2023-05-03 12:01:08",
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "2.50 kr",
"title": "General"
},
{
"id": 302,
"store_id": "{storeId}",
"source": 1,
"cpc": 100,
"invoice_cpc": 100,
"cpa": null,
"invoice_cpa": null,
"created_at": "2023-05-03 12:01:09",
"updated_at": "2023-05-03 12:01:09",
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "1.00 kr",
"title": "Instagram"
}
]
},
"..."
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
Delete One Time Earning
Example request:
curl --request DELETE \
"https://api.metapic.com/admin/one-time-earnings/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/admin/one-time-earnings/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get User Tags Stats Get Tags with TagClickView(clicks and earnings) statistic
GET users/{id}/stores/stats
Example request:
curl --request GET \
--get "https://api.metapic.com/users/1/stores/stats" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/1/stores/stats"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST shopelloDeepLinking/{locale}
Example request:
curl --request POST \
"https://api.metapic.com/shopelloDeepLinking/ln_CG" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/shopelloDeepLinking/ln_CG"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET getInformation
Example request:
curl --request GET \
--get "https://api.metapic.com/getInformation" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/getInformation"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST getEarningBetween
Example request:
curl --request POST \
"https://api.metapic.com/getEarningBetween" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/getEarningBetween"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST sendFeedback
Example request:
curl --request POST \
"https://api.metapic.com/sendFeedback" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/sendFeedback"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST setUserConfig
Example request:
curl --request POST \
"https://api.metapic.com/setUserConfig" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/setUserConfig"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get User Info Used to get personal user info by authorized user
Example request:
curl --request GET \
--get "https://api.metapic.com/extraUserInfo" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/extraUserInfo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Payments for a user.
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/getPaymentsForUser" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/getPaymentsForUser"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the pdf for a payment
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/users/1/payments/19/pdf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/1/payments/19/pdf"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Link List
Get Link List
requires authentication
Get link list for user with all links and design
Example request:
curl --request GET \
--get "https://api.metapic.com/users/1/link-list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/1/link-list"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "username",
"user_id": 1,
"view_type": 1,
"color": 1,
"created_at": "2022-03-30T09:33:44.000000Z",
"updated_at": "2022-03-30T09:33:44.000000Z",
"links": [
{
"id": 3,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 1,
"created_at": "2022-03-30T09:33:44.000000Z",
"updated_at": "2022-03-30T09:33:44.000000Z"
},
{
"id": 4,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 2,
"created_at": "2022-03-30T09:37:50.000000Z",
"updated_at": "2022-03-30T09:37:50.000000Z"
}
]
}
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 Link list view type and color
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/users/1/link-list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"view_type\": 1,
\"color\": 1,
\"avatar\": \"url | imageData\"
}"
const url = new URL(
"https://api.metapic.com/users/1/link-list"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"view_type": 1,
"color": 1,
"avatar": "url | imageData"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "username",
"user_id": 1,
"view_type": 1,
"color": 1,
"created_at": "2022-03-30T09:33:44.000000Z",
"updated_at": "2022-03-30T09:33:44.000000Z",
"links": [
{
"id": 3,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 1,
"created_at": "2022-03-30T09:33:44.000000Z",
"updated_at": "2022-03-30T09:33:44.000000Z"
},
{
"id": 4,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 2,
"created_at": "2022-03-30T09:37:50.000000Z",
"updated_at": "2022-03-30T09:37:50.000000Z"
}
]
}
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.
Create Link in link list
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/users/1/link" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"title\": \"\\\"Link Title\\\"\",
\"tag_id\": \"et\",
\"image\": \"\\\"href or image data\\\"\"
}"
const url = new URL(
"https://api.metapic.com/users/1/link"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"title": "\"Link Title\"",
"tag_id": "et",
"image": "\"href or image data\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 2,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": 1,
"position": 1,
"created_at": "2022-03-30T09:32:22.000000Z",
"updated_at": "2022-03-30T09:32:22.000000Z",
"link_list": {
"id": 1,
"name": "username",
"user_id": 1,
"view_type": 1,
"color": 1,
"created_at": "2022-03-30T09:32:22.000000Z",
"updated_at": "2022-03-30T09:32:22.000000Z"
}
}
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 Link in user link list
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/users/1/link/sequi" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"title\": \"\\\"Link Title\\\"\",
\"tag_id\": 1,
\"image\": \"\\\"href or image data\\\"\"
}"
const url = new URL(
"https://api.metapic.com/users/1/link/sequi"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"title": "\"Link Title\"",
"tag_id": 1,
"image": "\"href or image data\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 2,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": 1,
"position": 1,
"created_at": "2022-03-30T09:32:22.000000Z",
"updated_at": "2022-03-30T09:32:22.000000Z",
"link_list": {
"id": 1,
"name": "username",
"user_id": 1,
"view_type": 1,
"color": 1,
"created_at": "2022-03-30T09:32:22.000000Z",
"updated_at": "2022-03-30T09:32:22.000000Z"
}
}
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 Link from user link list
requires authentication
Example request:
curl --request DELETE \
"https://api.metapic.com/users/1/link/vel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/1/link/vel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 2,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": 1,
"position": 1,
"created_at": "2022-03-30T09:32:22.000000Z",
"updated_at": "2022-03-30T09:32:22.000000Z",
"link_list": {
"id": 1,
"name": "username",
"user_id": 1,
"view_type": 1,
"color": 1,
"created_at": "2022-03-30T09:32:22.000000Z",
"updated_at": "2022-03-30T09:32:22.000000Z"
}
}
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.
Change Links positions in link list
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/users/1/change-links-positions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"links\": [
\"id\"
]
}"
const url = new URL(
"https://api.metapic.com/users/1/change-links-positions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"links": [
"id"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"id": 3,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 1,
"created_at": "2022-03-30T09:33:44.000000Z",
"updated_at": "2022-03-30T09:33:44.000000Z"
},
{
"id": 4,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 2,
"created_at": "2022-03-30T09:37:50.000000Z",
"updated_at": "2022-03-30T09:37:50.000000Z"
},
{
"id": 5,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 4,
"created_at": "2022-03-30T09:38:10.000000Z",
"updated_at": "2022-03-30T09:38:10.000000Z"
},
{
"id": 6,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 3,
"created_at": "2022-03-30T09:39:25.000000Z",
"updated_at": "2022-03-30T09:39:25.000000Z"
},
{
"id": 7,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": 1,
"position": 6,
"created_at": "2022-03-30T09:40:39.000000Z",
"updated_at": "2022-03-30T09:40:53.000000Z"
},
{
"id": 8,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 5,
"created_at": "2022-03-30T09:50:12.000000Z",
"updated_at": "2022-03-30T09:50:12.000000Z"
},
{
"id": 9,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 7,
"created_at": "2022-03-30T09:51:13.000000Z",
"updated_at": "2022-03-30T09:51:13.000000Z"
},
{
"id": 10,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": null,
"position": 8,
"created_at": "2022-03-30T09:52:42.000000Z",
"updated_at": "2022-03-30T09:52:42.000000Z"
},
{
"id": 11,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": 2,
"position": 9,
"created_at": "2022-03-30T09:55:14.000000Z",
"updated_at": "2022-03-30T09:55:16.000000Z"
},
{
"id": 12,
"title": "",
"tag_id": 123,
"link_list_id": 1,
"link_list_image_id": 3,
"position": 10,
"created_at": "2022-03-30T10:05:32.000000Z",
"updated_at": "2022-03-30T10:05:33.000000Z"
}
]
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 Deeplink data
requires authentication
Get deeplink info with og image
Example request:
curl --request POST \
"https://api.metapic.com/users/1/link-list-deep-link" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"url\": \"https:\\/\\/www.aimn.com\\/products\\/argyle-knit-sweater\"
}"
const url = new URL(
"https://api.metapic.com/users/1/link-list-deep-link"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"url": "https:\/\/www.aimn.com\/products\/argyle-knit-sweater"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 2332673,
"x": null,
"y": null,
"width": 0.1,
"height": 0.1,
"link": "https://clk.tradedoubler.com/click?p(297880)a(2978484)url(https%3A%2F%2Fwww.aimn.com%2Fproducts%2Fargyle-knit-sweater)",
"image_id": null,
"text": "Aimn",
"type": "tradedoubler_SE",
"meta_info": "{\"original_url\":\"https:\\/\\/www.aimn.com\\/products\\/argyle-knit-sweater\"}",
"user_id": 60011,
"created_at": "2022-04-27 00:23:34",
"updated_at": "2022-04-27 00:23:34",
"product_id": null,
"out_of_stock": 0,
"deleted_at": null,
"ip": "127.0.0.1",
"tier_pricing_id": null,
"created_as": "autoTagging",
"affiliate_link": "https://clk.tradedoubler.com/click?p(297880)a(2978484)url(https%3A%2F%2Fwww.aimn.com%2Fproducts%2Fargyle-knit-sweater)",
"original_url": "https://www.aimn.com/products/argyle-knit-sweater",
"store_id": 5319,
"store": "Aimn",
"image_url": "http://cdn.shopify.com/s/files/1/0090/5222/5616/products/63dab4030ecb1215e534f4c6891e5f8417783f0f4d4321d5d9105327022f2885.jpg?v=1649594101",
"mtpc_url": "https://c.mtpc.se/tags/link/2332673"
}
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 Offers
requires authentication
Get Influencer Offers List
Example request:
curl --request GET \
--get "https://api.metapic.com/users/123/offers?status=open&name=testOffer" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/offers"
);
const params = {
"status": "open",
"name": "testOffer",
};
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": "{offerId}",
"store_id": "{storeId}",
"name": "{offerName}",
"from": null,
"to": null,
"cpc": null,
"instagram_cpc": 715,
"invoice_cpc": null,
"invoice_instagram_cpc": null,
"invoice_instagram_cpa": null,
"invoice_cpa": null,
"cpa": null,
"instagram_cpa": null,
"offer_campaign_text": null,
"offer_campaign_title": null,
"status": "accepted",
"feed_name": "{storeName}",
"logo_url": "{storeLogoUrl}",
"offer_influencer_text": null,
"todo": [
{
"key": "First task",
"Value": false
},
{
"key": "Second task",
"Value": false
}
],
"traffic_sources_costs": [
{
"id": 9333,
"offer_id": "{offerId}",
"source": 0,
"cpc": null,
"invoice_cpc": null,
"cpa": 0,
"invoice_cpa": null,
"user_revenue": null,
"client_revenue": null,
"created_at": "2023-07-19 13:13:03",
"updated_at": "2023-07-19 13:13:03"
},
{
"id": 9334,
"offer_id": "{offerId}",
"source": 1,
"cpc": 715,
"invoice_cpc": null,
"cpa": 0,
"invoice_cpa": null,
"user_revenue": null,
"client_revenue": null,
"created_at": "2023-07-19 13:13:04",
"updated_at": "2023-07-19 13:13:04"
}
]
}
],
"first_page_url": "http://metapic-api.loc/users/{userId}/offers?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://metapic-api.loc/users/{userId}/offers?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://metapic-api.loc/users/{userId}/offers?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://metapic-api.loc/users/{userId}/offers",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
}
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.
Apply Offer
requires authentication
Apply offer by Influencer
Example request:
curl --request PATCH \
"https://api.metapic.com/users/123/offers/123/apply" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/apply"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "{id}",
"offer_id": "{offerId}",
"user_id": "{userId}",
"clicks": 0,
"status": "accepted",
"created_at": "2021-05-25 13:02:06",
"updated_at": "2021-05-27 11:21:23"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deny Offer
requires authentication
Deny offer by Influencer
Example request:
curl --request PATCH \
"https://api.metapic.com/users/123/offers/123/deny" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/deny"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "{id}",
"offer_id": "{offerId}",
"user_id": "{userId}",
"clicks": 0,
"status": "accepted",
"created_at": "2021-05-25 13:02:06",
"updated_at": "2021-05-27 11:21:23"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revert Offer
requires authentication
Revert Offer to open state by influencer
Example request:
curl --request PATCH \
"https://api.metapic.com/users/123/offers/123/revert" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/revert"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "{id}",
"offer_id": "{offerId}",
"user_id": "{userId}",
"clicks": 0,
"status": "accepted",
"created_at": "2021-05-25 13:02:06",
"updated_at": "2021-05-27 11:21:23"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Offer "todo"
requires authentication
Update offer "todo" by Influencer
Example request:
curl --request PATCH \
"https://api.metapic.com/users/123/offers/123/todo" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"todo\": [
\"nam\"
]
}"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/todo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"todo": [
"nam"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "{id}",
"offer_id": "{offerId}",
"user_id": "{userId}",
"clicks": 0,
"status": "accepted",
"created_at": "2021-05-25 13:02:06",
"updated_at": "2021-05-27 11:21:23"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
OneTimeEarnings
Create One Time Earning
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/admin/one-time-earnings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"user_id\": \"magni\",
\"store_id\": 1,
\"user_earnings\": 1000,
\"invoice_amount\": 1000,
\"payment_date\": \"2022-01-01\",
\"comment\": \"\\\"Your one time payment\\\"\"
}"
const url = new URL(
"https://api.metapic.com/admin/one-time-earnings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"user_id": "magni",
"store_id": 1,
"user_earnings": 1000,
"invoice_amount": 1000,
"payment_date": "2022-01-01",
"comment": "\"Your one time payment\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"user_id": "{userId}",
"user_earnings": 1000,
"payment_date": "2022-01-01",
"comment": "your earnings",
"updated_at": "2022-01-26 06:49:51",
"created_at": "2022-01-26 06:49:51",
"id": 150
}
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.
Orders
Get Pending Orders
requires authentication
Get Pending Orders by influencer
Example request:
curl --request GET \
--get "https://api.metapic.com/users/123/pending-orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/pending-orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"2020": {
"8": [
{
"year": 2020,
"month": 10,
"store_id": "{storeId}",
"feed_name": "CENEO",
"user_revenue": "2.8800"
}
],
"9": [
{
"year": 2020,
"month": 9,
"store_id": "{storeId}",
"feed_name": "CENEO",
"user_revenue": "55.2"
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Carousel
List Product Carousels
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/users/123/product-carousels" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/product-carousels"
);
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": [
{
"name": "Product Carousel",
"products": [
{
"name": "product 1",
"price": 100,
"link": "http://test-link.com",
"id": 123,
"tag_id": 1234,
"store_name": "Store"
}
],
"user_id": "{userId}",
"updated_at": "2021-02-12 08:56:52",
"created_at": "2021-02-12 08:56:52",
"id": "{productCarouselId}"
}
],
"first_page_url": "http://api.metapic.com/users/{userId}/product-carousels?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://api.metapic.com/users/{userId}/product-carousels?page=3",
"next_page_url": null,
"path": "http://api.metapic.com/users/{userId}/product-carousels?page=1",
"per_page": 15,
"prev_page_url": null,
"to": 3,
"total": 3
}
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.
Create Product Carousel
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/users/123/product-carousels" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"name\": \"[email protected]\",
\"products\": [
\"sint\"
]
}"
const url = new URL(
"https://api.metapic.com/users/123/product-carousels"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"name": "[email protected]",
"products": [
"sint"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"name": "Product Carousel",
"products": [
{
"name": "product 1",
"price": 100,
"link": "http://test-link.com",
"id": 123,
"tag_id": 1234,
"store_name": "Store"
}
],
"user_id": "{userId}",
"updated_at": "2021-02-12 08:56:52",
"created_at": "2021-02-12 08:56:52",
"id": "{productCarouselId}"
}
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 Product Carousel
requires authentication
Example request:
curl --request PUT \
"https://api.metapic.com/users/123/product-carousels/et" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"name\": \"tes[email protected]\",
\"products\": [
\"corporis\"
]
}"
const url = new URL(
"https://api.metapic.com/users/123/product-carousels/et"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"name": "[email protected]",
"products": [
"corporis"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"name": "Product Carousel",
"products": [
{
"name": "product 1",
"price": 100,
"link": "http://test-link.com",
"id": 123,
"tag_id": 1234,
"store_name": "Store"
}
],
"user_id": "{userId}",
"updated_at": "2021-02-12 08:56:52",
"created_at": "2021-02-12 08:56:52",
"id": "{productCarouselId}"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Product Carousel
requires authentication
Example request:
curl --request DELETE \
"https://api.metapic.com/users/123/product-carousels/aliquid" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/product-carousels/aliquid"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Product Carousel",
"products": [
{
"name": "product 1",
"price": 100,
"link": "http://test-link.com",
"id": 123,
"tag_id": 1234,
"store_name": "Store"
}
],
"user_id": "{userId}",
"updated_at": "2021-02-12 08:56:52",
"created_at": "2021-02-12 08:56:52",
"id": "{productCarouselId}"
}
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.
Products
Get Products
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/product" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/product"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Product
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/product/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/product/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sms Verification
Create User Sms Verification
requires authentication
Uses to create verification and send verification code to user
Example request:
curl --request POST \
"https://api.metapic.com/users/verifications/sms" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"phone\": \"+380xxxxxxx\"
}"
const url = new URL(
"https://api.metapic.com/users/verifications/sms"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"phone": "+380xxxxxxx"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"phone": "(523) 662-9728 x423",
"expires_at": "2020-11-04T23:23:41.777994Z",
"updated_at": "2020-11-04 23:13:41",
"created_at": "2020-11-04 23:13:41",
"id": 53,
"type": "sms"
}
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
User Earnings and Clicks Grouped by Date
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/stats/earnings?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/stats/earnings"
);
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):
{
"dates": [
{
"date": "2020-01-01",
"clicks": 0,
"earned": 100,
"pending": 0
}
],
"earned": 22300,
"earned_formated": "223.00 kr",
"pending": 0,
"pending_formated": "0 öre"
}
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.
Performance
requires authentication
Summarized Earnings, OneTimePayments and Clicks
Example request:
curl --request GET \
--get "https://api.metapic.com/stats/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/stats/performance"
);
const params = {
"from": "2019-01-01",
"to": "2019-02-02",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"clicks": 6202,
"earned": 570082,
"one_time_payments": "170200",
"pending": 0,
"tags": 20,
"images": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Payment Date And Amount
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/stats/getPaymentsDateAndAmount" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/stats/getPaymentsDateAndAmount"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"lastPaymentdate": "2020-08-25",
"paymentLimit": 15000,
"paymentLimit_formated": "150 zł",
"payments": [
{
"user_earnings": 0,
"payment_date": {
"date": "2020-08-25 00:00:00.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"payment_for_month": "August",
"user_earnings_formated": "0 gr",
"payment_error_id": 1,
"earnings_left_to_payment": 15000,
"earnings_left_to_payment_formated": "150.00 zł"
}
]
}
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 User One Time Payments
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/stats/one-time-earnings?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/stats/one-time-earnings"
);
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):
{
"current_page": 1,
"data": [
{
"id": 38,
"user_id": 43944,
"store_id": null,
"user_earnings": "1 502.00 zł",
"payment_date": "2019-11-25",
"created_at": "2019-11-29 14:08:22",
"updated_at": "2019-12-30 11:22:37",
"comment": "Wyrównanie kampania Media Markt",
"store": null
}
],
"first_page_url": "/stats/one-time-earnings?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "/stats/one-time-earnings?page=1",
"next_page_url": null,
"path": "/stats/one-time-earnings",
"per_page": 15,
"prev_page_url": null,
"to": 2,
"total": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all click statistic split on stores
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/stats/stores?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/stats/stores"
);
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());
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 Tag Stats
requires authentication
Returns stats for last 30 days or for selected period (from date, to date)
Example request:
curl --request GET \
--get "https://api.metapic.com/users/1/get-tag-stats-by-date?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/users/1/get-tag-stats-by-date"
);
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):
[
{
"tag_id": "{tagId}",
"date": "2022-10-26",
"clicks": 643,
"earned": 64302,
"order_value": 0,
"nr_orders": 0,
"pending_cpa": 0,
"cpc_earned": 64302,
"cpa_earned": 0
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store Categories
Get User Store Categories
requires authentication
Example request:
curl --request GET \
--get "https://api.metapic.com/users/123/store-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/users/123/store-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"interested": [
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
}
],
"very_interested": [],
"not_interested": []
}
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.
Save User Store Categories
requires authentication
Example request:
curl --request POST \
"https://api.metapic.com/users/123/store-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"store_categories\": {
\"interested\": [
1
],
\"very_interested\": [
1
],
\"not_interested\": [
1
]
}
}"
const url = new URL(
"https://api.metapic.com/users/123/store-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"store_categories": {
"interested": [
1
],
"very_interested": [
1
],
"not_interested": [
1
]
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"interested": [
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
}
],
"very_interested": [],
"not_interested": []
}
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 Store Categories List
requires authentication
Return all store categories
Example request:
curl --request GET \
--get "https://api.metapic.com/store-categories-list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/store-categories-list"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
},
{
"id": 3,
"name": "Beauty & Health"
},
{
"id": 4,
"name": "Electronics & Computers"
},
{
"id": 5,
"name": "Children & Baby"
},
{
"id": 6,
"name": "Sports & Outdoors"
},
{
"id": 7,
"name": "Books & Games"
},
{
"id": 8,
"name": "Food & Beverage"
},
{
"id": 9,
"name": "Other"
}
]
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.
Stores
Get Stores
requires authentication
List of Stores ordered by cpc/cpa
Example request:
curl --request GET \
--get "https://api.metapic.com/stores" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/stores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": "{storeId}",
"name": "Hickap",
"key": "Hickap",
"currency": "SEK",
"revenue_text": "",
"deeplinkable": 0,
"product_feed": 0,
"cpc": 250,
"instagram_cpc": 100,
"logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/4505.png",
"traffic_sources_costs": [
{
"id": 301,
"store_id": "{storeId}",
"source": 0,
"cpc": 250,
"cpa": 0,
"invoice_cpc": null,
"invoice_cpa": null,
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "2.50 kr"
},
{
"id": 302,
"store_id": "{storeId}",
"source": 1,
"cpc": 100,
"cpa": null,
"invoice_cpc": null,
"invoice_cpa": null,
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "1.00 kr"
}
],
"offer": {
"ids": [
3502
]
},
"categories": [
{
"id": 3,
"name": "Beauty"
},
{
"id": 1,
"name": "Fashion"
}
],
"url": "http://hickap.com",
"cpc_formated": "2.50 kr",
"instagram_cpc_formated": "1.00 kr",
"store_categories": [
{
"id": 3,
"name": "Beauty"
},
{
"id": 1,
"name": "Fashion"
}
],
"main_url": {
"id": 18635,
"store_id": 4505,
"end_host": "hickap.com",
"start_url": null,
"created_at": "2023-06-09 12:56:11",
"updated_at": "2023-06-09 12:56:11"
}
}
]
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 store by ID
requires authentication
Returns store information by its ID based on user data.
Example request:
curl --request GET \
--get "https://api.metapic.com/user/stores/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/user/stores/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Stores by category interests
requires authentication
List of Stores ordered by category interests and price
Example request:
curl --request GET \
--get "https://api.metapic.com/stores-by-interests" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/stores-by-interests"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Fashion",
"stores": [
{
"id": "{storeId}",
"name": "Hickap",
"key": "Hickap",
"currency": "SEK",
"revenue_text": "",
"deeplinkable": 0,
"product_feed": 0,
"cpc": 250,
"instagram_cpc": 100,
"logo_url": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/4505.png",
"traffic_sources_costs": [
{
"id": 301,
"store_id": "{storeId}",
"source": 0,
"cpc": 250,
"cpa": 0,
"invoice_cpc": null,
"invoice_cpa": null,
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "2.50 kr"
},
{
"id": 302,
"store_id": "{storeId}",
"source": 1,
"cpc": 100,
"cpa": null,
"invoice_cpc": null,
"invoice_cpa": null,
"user_revenue": 1,
"client_revenue": null,
"cpc_formatted": "1.00 kr"
}
],
"offer": {
"ids": [
3502
]
},
"categories": [
{
"id": 3,
"name": "Beauty"
},
{
"id": 1,
"name": "Fashion"
}
],
"url": "http://hickap.com",
"cpc_formated": "2.50 kr",
"instagram_cpc_formated": "1.00 kr",
"store_categories": [
{
"id": 3,
"name": "Beauty"
},
{
"id": 1,
"name": "Fashion"
}
],
"main_url": {
"id": 18635,
"store_id": 4505,
"end_host": "hickap.com",
"start_url": null,
"created_at": "2023-06-09 12:56:11",
"updated_at": "2023-06-09 12:56:11"
}
}
]
}
]
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 User toplist
requires authentication
List of Stores ordered by cpc/cpa
Example request:
curl --request GET \
--get "https://api.metapic.com/topList/dv_MV" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/topList/dv_MV"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"retailers": [
{
"key": "Hickap",
"store_id": "{storeId}",
"store_url": "http://hickap.com",
"logo": "https://metapic-cdn.s3.eu-west-1.amazonaws.com/toplists/stores/4505.png",
"cpc": 250,
"revenue_text": "",
"instagram_cpc": 100,
"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"
},
{
"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"
}
],
"offer": {
"ids": [
3502
]
},
"currency": "SEK",
"cpc_formated": "2.50 kr",
"instagram_cpc_formated": "1.00 kr",
"offer_title": "",
"offer_text": ""
}
]
}
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.
Subscriptions
Unsubscribe
Unsubscribe from newsletter or campaign mails
Example request:
curl --request POST \
"https://api.metapic.com/unsubscribe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"email\": \"[email protected]\",
\"type\": \"campaign\",
\"token\": \"$2y$10$Hvf6Y9lVjrY\\/Qzg8eiynsu8vgq53cw3uDV3J9hAs\\/ScpSyt32Sl6S\"
}"
const url = new URL(
"https://api.metapic.com/unsubscribe"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"email": "[email protected]",
"type": "campaign",
"token": "$2y$10$Hvf6Y9lVjrY\/Qzg8eiynsu8vgq53cw3uDV3J9hAs\/ScpSyt32Sl6S"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"email": "[email protected]",
"type": "campaign",
"updated_at": "2022-10-11T04:36:46.000000Z",
"created_at": "2022-10-11T04:36:46.000000Z",
"id": 1
}
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.
Tags
Get Tags
requires authentication
Returns all tags connected to your client account, sorted on created date in descending order. If an image_id is provided it will return all tags related to that image. If a user_id is provided it will return all tags related to that user.
Create Tag
requires authentication
Create a new Metapic tag. A tag can be either an image tag or a text link tag
Get Tag
requires authentication
Get Tag by ID
Update Tag
Updates a Metapic Tag
Delete Tag
Delete by ID
Get Product from tag
requires authentication
Get the product from a tag if the tag do not have a product throws error.
User
User Info
requires authentication
Get the same info as postLogin but with access token.
Example request:
curl --request GET \
--get "https://api.metapic.com/user/info" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/user/info"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "{userId}",
"username": "{username}",
"email": "{email}",
"created_at": "2019-06-17 11:53:17",
"updated_at": "2019-08-20 07:07:50",
"admin": 1,
"last_active": "0000-00-00 00:00:00",
"first_name": "{userName}",
"surname": "{userSurname}",
"country": "{country}",
"city": "{city}",
"address": "{address}",
"postcode": "{postcode}",
"tier_pricing_type": "",
"config": "{\"showedPopups\":[\"firstCollageItem\"]}",
"sign_user_agreement": "2019-08-14 08:34:12",
"revenue_tier_id": 105,
"access_token": {
"id": "{tokenId}",
"user_id": "{userId}",
"access_token": "{token}",
"created_at": "2019-06-17 11:53:17",
"updated_at": "2019-06-17 11:53:17"
},
"currencyObj": {
"code": "SEK",
"name": "Swedish krona",
"symbol": "kr",
"subunit": "öre",
"is_before": 0,
"ratio_to_eur": 0.09
},
"roles": [],
"own_paymentsystem": 0,
"revenue_tier": {
"id": 105,
"created_at": "2018-12-12 14:21:45",
"updated_at": "2018-12-12 14:21:45",
"client_id": 79,
"revenue_share": "0.70",
"instagram_revenue_share": "0.70",
"name": "Diamond"
}
}
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 Information
Update User Information
requires authentication
Update user data, company, phone, email and vat_no information etc.
Example request:
curl --request PUT \
"https://api.metapic.com/extraUserInfo" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}" \
--data "{
\"extraInfo\": \"veniam\",
\"code\": \"et\"
}"
const url = new URL(
"https://api.metapic.com/extraUserInfo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "{token}",
};
let body = {
"extraInfo": "veniam",
"code": "et"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "{userId}",
"username": "{username}",
"email": "{email}",
"phone": null,
"created_at": "2020-12-09 14:51:45",
"updated_at": "2020-12-09 14:51:45",
"admin": 0,
"first_name": "{userName}",
"surname": "{userSurname}",
"country": "{country}",
"city": "{city}",
"address": "{address}",
"postcode": "{postcode}",
"tier_pricing_type": "",
"config": "{}",
"sign_user_agreement": "2019-08-14 08:34:12",
"revenue_tier_id": 105,
"recruitment_utm": null,
"bank_info": null,
"social_media": [],
"own_paymentsystem": 0,
"businessType": "INDIVIDUAL",
"SSNum": "",
"bankType": "CLEARING",
"is_suspended": false,
"is_verified": true,
"client": {
"id": "{id}",
"client_id": "{clientId}",
"name": "Metapic SE",
"created_at": "2014-04-24 16:12:29",
"updated_at": "2020-04-28 06:58:23",
"own_paymentsystem": 0,
"config": "{}",
"user_mail_config": null,
"feed": "live_se",
"locale": "SE",
"revenue_model": "blog_percentage",
"revenue_share": "0.00",
"store_group_id": 1,
"default_revenue_tier": 76,
"default_verified_users": 0
},
"company": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Validate IBAN
requires authentication
Check IBAN and get additional bank info
Example request:
curl --request GET \
--get "https://api.metapic.com/validate-iban?iban=SEXXXXXXXXXXX" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: {token}"
const url = new URL(
"https://api.metapic.com/validate-iban"
);
const params = {
"iban": "SEXXXXXXXXXXX",
};
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):
{
"bank_data": {
"bic": "{bic}",
"branch": null,
"bank": "{bank}",
"address": "{address}",
"city": "Bratislava",
"state": null,
"zip": "811 01",
"phone": null,
"fax": null,
"www": null,
"email": null,
"country": "Slovakia",
"country_iso": "SK",
"account": "{account}",
"bank_code": "{bank_code}",
"branch_code": "000000"
},
"sepa_data": {
"SCT": "YES",
"SDD": "YES",
"COR1": "YES",
"B2B": "NO",
"SCC": "NO"
},
"validations": {
"chars": {
"code": "006",
"message": "IBAN does not contain illegal characters"
},
"account": {
"code": "002",
"message": "Account Number check digit is correct"
},
"iban": {
"code": "001",
"message": "IBAN Check digit is correct"
},
"structure": {
"code": "005",
"message": "IBAN structure is correct"
},
"length": {
"code": "003",
"message": "IBAN Length is correct"
},
"country_support": {
"code": "007",
"message": "Country supports IBAN standard"
}
},
"errors": [],
"is_valid": true
}
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.