Info
Welcome to the API reference for User Get Postman Collection
Chats
Get Chats
Get list of user chats with Admin Support
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/support-admin-chat"
const url = new URL(
"https://api.metapic.com/support-admin-chat"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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": []
}
]
HTTP Request
GET support-admin-chat
Create Chat
Create new chat with Admin Support
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/support-admin-chat"
const url = new URL(
"https://api.metapic.com/support-admin-chat"
);
fetch(url, {
method: "POST",
})
.then(response => response.json())
.then(json => console.log(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
}
}
]
}
HTTP Request
POST support-admin-chat
Get Chat
Get user chat with Admin Support
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/support-admin-chat/1"
const url = new URL(
"https://api.metapic.com/support-admin-chat/1"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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
}
}
]
}
HTTP Request
GET support-admin-chat/{support_admin_chat}
URL Parameters
Parameter | Status | Description |
---|---|---|
chat |
required | The ID of the chat. |
Create Message
Create message in Admin Support
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/support-admin-chat/1/messages" \
-H "Content-Type: application/json" \
-d '{"message":"textMessage"}'
const url = new URL(
"https://api.metapic.com/support-admin-chat/1/messages"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": "textMessage"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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
}
HTTP Request
POST support-admin-chat/{chatId}/messages
URL Parameters
Parameter | Status | Description |
---|---|---|
chatId |
required | The ID of the chat. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
message |
string | required | max:1024. Chat message. |
Deep linking
Get Deep-link urls
Return list of deep-link urls for authorized user
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/1/deep-link-urls"
const url = new URL(
"https://api.metapic.com/users/1/deep-link-urls"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
GET users/{userId}/deep-link-urls
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The ID of the user. |
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 -X POST \
"https://api.metapic.com/deepLinkBlogPost/1" \
-H "Content-Type: application/json" \
-d '{"blogPost":"<div> <a href=\"https:\/\/na-kd.com\"> link<\/a><\/div>"}'
const url = new URL(
"https://api.metapic.com/deepLinkBlogPost/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"blogPost": "<div> <a href=\"https:\/\/na-kd.com\"> link<\/a><\/div>"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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": 12,
"type": "tradedoubler_SE",
"after": "https:\/\/c.mtpc.se\/tags\/link\/2082970",
"currency": "SEK",
"tag_id": 2082970,
"user_revenue_cpc": 0,
"user_instagram_cpc": 0,
"user_revenue_cpa": 0,
"user_instagram_cpa": 0,
"user_revenue_cpc_formated": "0 öre",
"user_instagram_cpc_formated": "0 öre"
}
],
"isUpdated": true
}
HTTP Request
POST deepLinkBlogPost/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
user_id |
optional | The id of the user. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
blogPost |
string | required | Link". |
Create Deep Links
Requires authentication
Create deeplinks from a array of links
Example request:
curl -X POST \
"https://api.metapic.com/deep-links" \
-H "Content-Type: application/json" \
-d '{"links":"[\\\"https:\/\/na-kd.com\\\"]","userId":1}'
const url = new URL(
"https://api.metapic.com/deep-links"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"links": "[\\\"https:\/\/na-kd.com\\\"]",
"userId": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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": 0,
"user_instagram_cpc": 0,
"user_revenue_cpa": 0,
"user_instagram_cpa": 0,
"user_revenue_cpc_formated": "0 öre",
"user_instagram_cpc_formated": "0 öre"
},
"..."
]
HTTP Request
POST deep-links
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
links |
string | required | Json array of links. |
userId |
integer | required | The user ID. |
Favorite Products
Get Favorite Products
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/favorite"
const url = new URL(
"https://api.metapic.com/favorite"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[
{
"id": 10,
"user_id": "{userId}",
"product_id": "{productId}",
"product_information": "{\"product-id\":350358313,\"name\":\"Nike - Air Max 90 OG\",\"description\":\"\",\"category\":\"Skor\",\"category-id\":225,\"manufacturer\":\"Nike\",\"lowest-price\":1399,\"reduction_percent\":0,\"image-url\":\"http:\/\/cdn.203.se\/i?u=group1\/M00\/D5\/32\/CgAIClVdXVOAD_c3AAB5GUZKGlw911.jpg&w=440&h=440&t=1000\",\"link\":\"https:\/\/se.shopelloapi.com\/v3\/click\/?clickdata=cc476996b6e0.WyI2MyIsMzUwMzU4MzEzXQ\",\"original_url\":\"http:\/\/caliroots.se\/nike-air-max-90-og-725233-106\/p\/39977\",\"brand\":\"Nike\",\"retailer\":[{\"id\":1949,\"name\":\"Caliroots \",\"link\":\"https:\/\/se.shopelloapi.com\/v3\/click\/?clickdata=cc476996b6e0.WyI2MyIsMzUwMzU4MzEzXQ\",\"$$hashKey\":\"object:51\"}],\"feed\":\"shopello_SE\",\"$$hashKey\":\"object:37\"}",
"created_at": "2015-06-26 15:18:29",
"updated_at": "2015-06-26 15:18:29"
},
"..."
]
HTTP Request
GET favorite
Create Favorite Product
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/favorite"
const url = new URL(
"https://api.metapic.com/favorite"
);
fetch(url, {
method: "POST",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": 10,
"user_id": "{userId}",
"product_id": "{productId}",
"product_information": "{\"product-id\":350358313,\"name\":\"Nike - Air Max 90 OG\",\"description\":\"\",\"category\":\"Skor\",\"category-id\":225,\"manufacturer\":\"Nike\",\"lowest-price\":1399,\"reduction_percent\":0,\"image-url\":\"http:\/\/cdn.203.se\/i?u=group1\/M00\/D5\/32\/CgAIClVdXVOAD_c3AAB5GUZKGlw911.jpg&w=440&h=440&t=1000\",\"link\":\"https:\/\/se.shopelloapi.com\/v3\/click\/?clickdata=cc476996b6e0.WyI2MyIsMzUwMzU4MzEzXQ\",\"original_url\":\"http:\/\/caliroots.se\/nike-air-max-90-og-725233-106\/p\/39977\",\"brand\":\"Nike\",\"retailer\":[{\"id\":1949,\"name\":\"Caliroots \",\"link\":\"https:\/\/se.shopelloapi.com\/v3\/click\/?clickdata=cc476996b6e0.WyI2MyIsMzUwMzU4MzEzXQ\",\"$$hashKey\":\"object:51\"}],\"feed\":\"shopello_SE\",\"$$hashKey\":\"object:37\"}",
"created_at": "2015-06-26 15:18:29",
"updated_at": "2015-06-26 15:18:29"
}
HTTP Request
POST favorite
Delete Favorite Product
Requires authentication
Example request:
curl -X DELETE \
"https://api.metapic.com/favorite/1"
const url = new URL(
"https://api.metapic.com/favorite/1"
);
fetch(url, {
method: "DELETE",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": 10,
"user_id": "{userId}",
"product_id": "{productId}",
"product_information": "{\"product-id\":350358313,\"name\":\"Nike - Air Max 90 OG\",\"description\":\"\",\"category\":\"Skor\",\"category-id\":225,\"manufacturer\":\"Nike\",\"lowest-price\":1399,\"reduction_percent\":0,\"image-url\":\"http:\/\/cdn.203.se\/i?u=group1\/M00\/D5\/32\/CgAIClVdXVOAD_c3AAB5GUZKGlw911.jpg&w=440&h=440&t=1000\",\"link\":\"https:\/\/se.shopelloapi.com\/v3\/click\/?clickdata=cc476996b6e0.WyI2MyIsMzUwMzU4MzEzXQ\",\"original_url\":\"http:\/\/caliroots.se\/nike-air-max-90-og-725233-106\/p\/39977\",\"brand\":\"Nike\",\"retailer\":[{\"id\":1949,\"name\":\"Caliroots \",\"link\":\"https:\/\/se.shopelloapi.com\/v3\/click\/?clickdata=cc476996b6e0.WyI2MyIsMzUwMzU4MzEzXQ\",\"$$hashKey\":\"object:51\"}],\"feed\":\"shopello_SE\",\"$$hashKey\":\"object:37\"}",
"created_at": "2015-06-26 15:18:29",
"updated_at": "2015-06-26 15:18:29"
}
HTTP Request
DELETE favorite/{favorite}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The ID of the favorite. |
Link List
Get Link List
Get link list for user with all links and design
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/1/link-list"
const url = new URL(
"https://api.metapic.com/users/1/link-list"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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"
}
]
}
HTTP Request
GET users/{userId}/link-list
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
Update Link list view type and color
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/1/link-list" \
-H "Content-Type: application/json" \
-d '{"view_type":1,"color":1,"avatar":"url | imageData"}'
const url = new URL(
"https://api.metapic.com/users/1/link-list"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"view_type": 1,
"color": 1,
"avatar": "url | imageData"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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"
}
]
}
HTTP Request
POST users/{userId}/link-list
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
view_type |
integer | required | required. |
color |
integer | required | required. |
avatar |
required. | optional |
Create Link in link list
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/1/link" \
-H "Content-Type: application/json" \
-d '{"title":"\"Link Title\"","url":"https:\/\/www.aimn.com\/products\/argyle-knit-sweater","image":"\"href or image data\""}'
const url = new URL(
"https://api.metapic.com/users/1/link"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "\"Link Title\"",
"url": "https:\/\/www.aimn.com\/products\/argyle-knit-sweater",
"image": "\"href or image data\""
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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"
}
}
HTTP Request
POST users/{userId}/link
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
title |
string | required | required. |
url |
required. | optional | |
image |
string | required | required. |
Update Link in user link list
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/1/link/1" \
-H "Content-Type: application/json" \
-d '{"title":"\"Link Title\"","tag_id":1,"image":"\"href or image data\""}'
const url = new URL(
"https://api.metapic.com/users/1/link/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "\"Link Title\"",
"tag_id": 1,
"image": "\"href or image data\""
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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"
}
}
HTTP Request
POST users/{userId}/link/{linkId}
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
link_id |
required | The LinkListRow id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
title |
string | required | required. |
tag_id |
integer | required | required. |
image |
string | required | required. |
Remove Link from user link list
Requires authentication
Example request:
curl -X DELETE \
"https://api.metapic.com/users/1/link/1"
const url = new URL(
"https://api.metapic.com/users/1/link/1"
);
fetch(url, {
method: "DELETE",
})
.then(response => response.json())
.then(json => console.log(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"
}
}
HTTP Request
DELETE users/{userId}/link/{linkId}
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
link_id |
required | The LinkListRow id. |
Change Links positions in link list
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/1/change-links-positions" \
-H "Content-Type: application/json" \
-d '{"links":[]}'
const url = new URL(
"https://api.metapic.com/users/1/change-links-positions"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"links": []
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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"
}
]
HTTP Request
POST users/{userId}/change-links-positions
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
links |
array | required | Array of all links in link list with their new positions. |
Get Deeplink data
Get deeplink info with og image
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/1/link-list-deep-link" \
-H "Content-Type: application/json" \
-d '{"url":"https:\/\/www.aimn.com\/products\/argyle-knit-sweater"}'
const url = new URL(
"https://api.metapic.com/users/1/link-list-deep-link"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "https:\/\/www.aimn.com\/products\/argyle-knit-sweater"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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"
}
HTTP Request
POST users/{userId}/link-list-deep-link
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
url |
required. | required |
Offers
Get Offers
Get Influencer Offers List
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/123/offers?status=open&name=testOffer"
const url = new URL(
"https://api.metapic.com/users/123/offers"
);
let params = {
"status": "open",
"name": "testOffer",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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
}
]
}
],
"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
}
HTTP Request
GET users/{userId}/offers
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
Query Parameters
Parameter | Status | Description |
---|---|---|
status |
optional | in:open,applied,denied,accepted,store_denied,done. Offer status. |
name |
optional | string, max:128. Offer name. |
Apply Offer
Apply offer by Influencer
Requires authentication
Example request:
curl -X PATCH \
"https://api.metapic.com/users/123/offers/123/apply"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/apply"
);
fetch(url, {
method: "PATCH",
})
.then(response => response.json())
.then(json => console.log(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"
}
HTTP Request
PATCH users/{userId}/offers/{offerId}/apply
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
offerId |
required | The Offer ID. |
Deny Offer
Deny offer by Influencer
Requires authentication
Example request:
curl -X PATCH \
"https://api.metapic.com/users/123/offers/123/deny"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/deny"
);
fetch(url, {
method: "PATCH",
})
.then(response => response.json())
.then(json => console.log(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"
}
HTTP Request
PATCH users/{userId}/offers/{offerId}/deny
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
offerId |
required | The Offer ID. |
Revert Offer
Revert Offer to open state by influencer
Requires authentication
Example request:
curl -X PATCH \
"https://api.metapic.com/users/123/offers/123/revert"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/revert"
);
fetch(url, {
method: "PATCH",
})
.then(response => response.json())
.then(json => console.log(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"
}
HTTP Request
PATCH users/{userId}/offers/{offerId}/revert
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
offerId |
required | The Offer ID. |
Update Offer "todo"
Update offer "todo" by Influencer
Requires authentication
Example request:
curl -X PATCH \
"https://api.metapic.com/users/123/offers/123/todo"
const url = new URL(
"https://api.metapic.com/users/123/offers/123/todo"
);
fetch(url, {
method: "PATCH",
})
.then(response => response.json())
.then(json => console.log(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"
}
HTTP Request
PATCH users/{userId}/offers/{offerId}/todo
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
offerId |
required | The Offer ID. |
Orders
Get Pending Orders
Get Pending Orders by influencer
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/123/pending-orders"
const url = new URL(
"https://api.metapic.com/users/123/pending-orders"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[
{
"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"
}
]
}
]
HTTP Request
GET users/{userId}/pending-orders
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
Product Carousel
List Product Carousels
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/123/product-carousels"
const url = new URL(
"https://api.metapic.com/users/123/product-carousels"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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
}
HTTP Request
GET users/{userId}/product-carousels
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The ID of the User. |
Create Product Carousel
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/123/product-carousels" \
-H "Content-Type: application/json" \
-d '{"name":"test@test.com","products":[{"name":"My Product","link":"http:\/\/product.com","price":"100 kr","id":"eveniet","tag_id":"dignissimos","store_name":"tempora","image_url":"et"}]}'
const url = new URL(
"https://api.metapic.com/users/123/product-carousels"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "test@test.com",
"products": [
{
"name": "My Product",
"link": "http:\/\/product.com",
"price": "100 kr",
"id": "eveniet",
"tag_id": "dignissimos",
"store_name": "tempora",
"image_url": "et"
}
]
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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}"
}
HTTP Request
POST users/{userId}/product-carousels
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The ID of the User. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | required | Product carousel name. |
products |
array | required | The Product Carousel products array |
products.*.name |
string | required | The name of product. |
products.*.link |
url | required | The product link. |
products.*.price |
numeric | required | Product price. |
products.*.id |
id | required | for the product. |
products.*.tag_id |
id | required | for the link. |
products.*.store_name |
the | required | max:255. name of the store. |
products.*.image_url |
the | required | url to the image. |
Update Product Carousel
Requires authentication
Example request:
curl -X PUT \
"https://api.metapic.com/users/123/product-carousels/123" \
-H "Content-Type: application/json" \
-d '{"name":"test@test.com","products":[{"name":"My Product","link":"http:\/\/product.com","price":"100 kr","id":"accusamus","tag_id":"sequi","store_name":"sint","image_url":"qui"}]}'
const url = new URL(
"https://api.metapic.com/users/123/product-carousels/123"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "test@test.com",
"products": [
{
"name": "My Product",
"link": "http:\/\/product.com",
"price": "100 kr",
"id": "accusamus",
"tag_id": "sequi",
"store_name": "sint",
"image_url": "qui"
}
]
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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}"
}
HTTP Request
PUT users/{userId}/product-carousels/{product_carousel}
PATCH users/{userId}/product-carousels/{product_carousel}
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The ID of the User. |
product_carousel |
required | The ID of the Product Carouse. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | required | Product carousel name. |
products |
array | required | The Product Carousel products array |
products.*.name |
string | required | The name of product. |
products.*.link |
url | required | The product link. |
products.*.price |
numeric | required | Product price. |
products.*.id |
id | required | for the product. |
products.*.tag_id |
id | required | for the link. |
products.*.store_name |
the | required | max:255. name of the store. |
products.*.image_url |
the | required | url to the image. |
Delete Product Carousel
Requires authentication
Example request:
curl -X DELETE \
"https://api.metapic.com/users/123/product-carousels/123" \
-H "Content-Type: application/json" \
-d '{"name":"test@test.com","products":[]}'
const url = new URL(
"https://api.metapic.com/users/123/product-carousels/123"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "test@test.com",
"products": []
}
fetch(url, {
method: "DELETE",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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}"
}
HTTP Request
DELETE users/{userId}/product-carousels/{product_carousel}
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The ID of the User. |
product_carousel |
required | The ID of the Product Carousel. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | required | User email. |
products |
array | optional | The Product Carousel products array |
Products
Get Products
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/product"
const url = new URL(
"https://api.metapic.com/product"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET product
Get Product
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/product/1"
const url = new URL(
"https://api.metapic.com/product/1"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
GET product/{product}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The ID of the favorite. |
Sms Verification
Create User Sms Verification
Uses to create verification and send verification code to user
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/verifications/sms" \
-H "Content-Type: application/json" \
-d '{"phone":"+380xxxxxxx"}'
const url = new URL(
"https://api.metapic.com/users/verifications/sms"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "+380xxxxxxx"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(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
}
HTTP Request
POST users/verifications/sms
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
phone |
string | required | User phone. |
Statistic
User Earnings and Clicks Grouped by Date
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/stats/earnings?from=2019-01-01&to=2019-02-02"
const url = new URL(
"https://api.metapic.com/stats/earnings"
);
let params = {
"from": "2019-01-01",
"to": "2019-02-02",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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"
}
HTTP Request
GET stats/earnings
Query Parameters
Parameter | Status | Description |
---|---|---|
from |
optional | Date (Y-m-d). date. |
to |
optional | Date (Y-m-d). date. |
Performance
Summarized Earnings, OneTimePayments and Clicks
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/stats/performance?from=2019-01-01&to=2019-02-02"
const url = new URL(
"https://api.metapic.com/stats/performance"
);
let params = {
"from": "2019-01-01",
"to": "2019-02-02",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"clicks": 6202,
"earned": 570082,
"one_time_payments": "170200",
"pending": 0,
"tags": 20,
"images": 0
}
HTTP Request
GET stats/performance
Query Parameters
Parameter | Status | Description |
---|---|---|
from |
optional | Date (Y-m-d). date. |
to |
optional | Date (Y-m-d). date. |
Get Payment Date And Amount
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/stats/getPaymentsDateAndAmount"
const url = new URL(
"https://api.metapic.com/stats/getPaymentsDateAndAmount"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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ł"
}
]
}
HTTP Request
GET stats/getPaymentsDateAndAmount
Get User One Time Payments
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/stats/one-time-earnings?from=2019-01-01&to=2019-02-02"
const url = new URL(
"https://api.metapic.com/stats/one-time-earnings"
);
let params = {
"from": "2019-01-01",
"to": "2019-02-02",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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
}
HTTP Request
GET stats/one-time-earnings
Query Parameters
Parameter | Status | Description |
---|---|---|
from |
optional | Date (Y-m-d). date. |
to |
optional | Date (Y-m-d). date. |
Get all click statistic split on stores
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/stats/stores?from=2019-01-01&to=2019-02-02"
const url = new URL(
"https://api.metapic.com/stats/stores"
);
let params = {
"from": "2019-01-01",
"to": "2019-02-02",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
GET stats/stores
Query Parameters
Parameter | Status | Description |
---|---|---|
from |
optional | Date (Y-m-d). date. |
to |
optional | Date (Y-m-d). date. |
Store Categories
Get User Store Categories
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/123/store-categories"
const url = new URL(
"https://api.metapic.com/users/123/store-categories"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"interested": [
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
}
],
"very_interested": [],
"not_interested": []
}
HTTP Request
GET users/{userId}/store-categories
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
Save User Store Categories
Requires authentication
Example request:
curl -X POST \
"https://api.metapic.com/users/123/store-categories" \
-H "Content-Type: application/json" \
-d '{"store_categories":{"interested":"[1]","very_interested":"[1]","not_interested":"[1]"}}'
const url = new URL(
"https://api.metapic.com/users/123/store-categories"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"store_categories": {
"interested": "[1]",
"very_interested": "[1]",
"not_interested": "[1]"
}
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"interested": [
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
}
],
"very_interested": [],
"not_interested": []
}
HTTP Request
POST users/{userId}/store-categories
URL Parameters
Parameter | Status | Description |
---|---|---|
userId |
required | The User ID. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
store_categories |
array | required | |
store_categories.interested |
array | optional | Store categories IDs. |
store_categories.very_interested |
array | optional | Store categories IDs. |
store_categories.not_interested |
array | optional | Store categories IDs. |
Get Store Categories List
Return all store categories
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/store-categories-list"
const url = new URL(
"https://api.metapic.com/store-categories-list"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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"
}
]
HTTP Request
GET store-categories-list
Stores
Get Stores
List of Stores ordered by category interests and price
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/stores-by-interests"
const url = new URL(
"https://api.metapic.com/stores-by-interests"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[
{
"id": "{storeId}",
"hidden": 0,
"name": "{feedName}",
"key": "{key}",
"currency": "SEK",
"revenue_text": null,
"deeplinkable": 0,
"product_feed": 1,
"cpc": 311111,
"instagram_cpc": 6222,
"cpa": 0.1,
"instagram_cpa": 0.1,
"logo_url": "{logoUrl}",
"store_category_id": 1,
"categories": [
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
}
],
"url": "{storeUrl}",
"cpc_formated": "3 111.11 kr",
"instagram_cpc_formated": "62.22 kr",
"cpa_formated": "10%",
"instagram_cpa_formated": "10%",
"store_categories": [
{
"id": 1,
"name": "Fashion"
},
{
"id": 2,
"name": "Home & Interior"
}
],
"main_url": {
"id": 6096,
"store_id": 29807,
"end_host": "{endHost}",
"start_url": null,
"created_at": "2021-09-06 14:05:53",
"updated_at": "2021-09-06 14:05:53"
}
}
]
HTTP Request
GET stores-by-interests
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.
Example request:
curl -X GET \
-G "https://api.metapic.com/tags?user_id=1&image_id=1"
const url = new URL(
"https://api.metapic.com/tags"
);
let params = {
"user_id": "1",
"image_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[
{
"id": 91,
"x": 0.59,
"y": 0.167395,
"width": 0.14,
"height": 0.21021,
"link": "http:\/\/example.com",
"image_id": 1,
"text": "Hampus Lück",
"type": "text",
"meta_info": null,
"user_id": "{userId}",
"created_at": "2012-11-05 09:25:45",
"updated_at": "2012-11-05 09:25:45",
"product_id": null,
"out_of_stock": 0,
"deleted_at": null,
"ip": "",
"tier_pricing_id": 1,
"created_as": "",
"affiliate_link": "http:\/\/example.com",
"original_url": null,
"store_id": null,
"store": null,
"mtpc_url": "http:\/\/example.com"
},
"..."
]
HTTP Request
GET tags
Query Parameters
Parameter | Status | Description |
---|---|---|
user_id |
optional | integer. The id of the user to fetch tags for. Unsigned integer. |
image_id |
optional | integer. The id of the image to fetch tags for. Unsigned integer. Unsigned integer. |
Create Tag
Requires authentication
Create a new Metapic tag. A tag can be either an image tag or a text link tag
Example request:
curl -X POST \
"https://api.metapic.com/tags"
const url = new URL(
"https://api.metapic.com/tags"
);
fetch(url, {
method: "POST",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": "{tagId}",
"x": 0.119048,
"y": 0.119048,
"width": 0.238095,
"height": 0.238095,
"link": "",
"image_id": 471315,
"text": "",
"type": "",
"meta_info": null,
"user_id": "{userid}",
"created_at": "2020-08-27 17:53:44",
"updated_at": "2020-08-27 17:53:44",
"product_id": null,
"out_of_stock": 0,
"deleted_at": null,
"ip": "127.0.0.1",
"tier_pricing_id": null,
"created_as": "",
"affiliate_link": "",
"original_url": null,
"store_id": null,
"store": null,
"mtpc_url": "https:\/\/c.mtpc.se\/tags\/link\/{tagId}"
}
HTTP Request
POST tags
Get Tag
Get Tag by ID
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/tags/1"
const url = new URL(
"https://api.metapic.com/tags/1"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": "{tagId}",
"x": 0.119048,
"y": 0.119048,
"width": 0.238095,
"height": 0.238095,
"link": "",
"image_id": 471315,
"text": "",
"type": "",
"meta_info": null,
"user_id": "{userid}",
"created_at": "2020-08-27 17:53:44",
"updated_at": "2020-08-27 17:53:44",
"product_id": null,
"out_of_stock": 0,
"deleted_at": null,
"ip": "127.0.0.1",
"tier_pricing_id": null,
"created_as": "",
"affiliate_link": "",
"original_url": null,
"store_id": null,
"store": null,
"mtpc_url": "https:\/\/c.mtpc.se\/tags\/link\/{tagId}"
}
HTTP Request
GET tags/{tag}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The ID of the Tag. |
Update Tag
Updates a Metapic Tag
Example request:
curl -X PUT \
"https://api.metapic.com/tags/1"
const url = new URL(
"https://api.metapic.com/tags/1"
);
fetch(url, {
method: "PUT",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": "{tagId}",
"x": 0.119048,
"y": 0.119048,
"width": 0.238095,
"height": 0.238095,
"link": "",
"image_id": 471315,
"text": "",
"type": "",
"meta_info": null,
"user_id": "{userid}",
"created_at": "2020-08-27 17:53:44",
"updated_at": "2020-08-27 17:53:44",
"product_id": null,
"out_of_stock": 0,
"deleted_at": null,
"ip": "127.0.0.1",
"tier_pricing_id": null,
"created_as": "",
"affiliate_link": "",
"original_url": null,
"store_id": null,
"store": null,
"mtpc_url": "https:\/\/c.mtpc.se\/tags\/link\/{tagId}"
}
HTTP Request
PUT tags/{tag}
PATCH tags/{tag}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The ID of the tag. |
Delete Tag
Delete by ID
Example request:
curl -X DELETE \
"https://api.metapic.com/tags/1"
const url = new URL(
"https://api.metapic.com/tags/1"
);
fetch(url, {
method: "DELETE",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"id": "{tagId}",
"x": 0.119048,
"y": 0.119048,
"width": 0.238095,
"height": 0.238095,
"link": "",
"image_id": 471315,
"text": "",
"type": "",
"meta_info": null,
"user_id": "{userid}",
"created_at": "2020-08-27 17:53:44",
"updated_at": "2020-08-27 17:53:44",
"product_id": null,
"out_of_stock": 0,
"deleted_at": null,
"ip": "127.0.0.1",
"tier_pricing_id": null,
"created_as": "",
"affiliate_link": "",
"original_url": null,
"store_id": null,
"store": null,
"mtpc_url": "https:\/\/c.mtpc.se\/tags\/link\/{tagId}"
}
HTTP Request
DELETE tags/{tag}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The ID of the tag. |
Get Product from tag
Requires authentication
Get the product from a tag if the tag do not have a product throws error.
Example request:
curl -X GET \
-G "https://api.metapic.com/tags/1/product?id=123"
const url = new URL(
"https://api.metapic.com/tags/1/product"
);
let params = {
"id": "123",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"name": "A name of a product",
"description": "A description that can be really long",
"original_categories": "What the store sett for category",
"feed_id": 3282,
"store_id": 5319,
"programName": "Store name",
"price": 35,
"lowest-price": 29,
"currency": "EUR",
"image-url": "urlToMainImage.jpg",
"images": [
"urlToMainImage",
"urlToImage2",
"urlToImage3"
],
"gender": "Man can be [Man|Woman|null]",
"colors": "Black,Green",
"cpc": "123 (this is in cents)",
"cpa": "0.12 is 12%",
"instagram_cpa": "0.12 is 12%",
"instagram_cpc": "123 (this is in cents)",
"manufacturer": "Who have created the product",
"retailer": "Who are selling the product",
"feed": "The feed name it is from",
"categories": "Metapic standardized category",
"updated_at": "2021-09-08 11:09:47",
"id": "uniqueId",
"partner_link": "Link that our partner use for tracking",
"orginal_url": "The direct url to the store"
}
HTTP Request
GET tags/{id}/product
Query Parameters
Parameter | Status | Description |
---|---|---|
id |
optional | integer. The id of the tag you want the product from. Unsigned integer. |
User
User Info
Requires authentication
Get the same info as postLogin but with access token.
Example request:
curl -X GET \
-G "https://api.metapic.com/user/info"
const url = new URL(
"https://api.metapic.com/user/info"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(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"
}
}
HTTP Request
GET user/info
User Information
Update User Information
Requires authentication
Update user data, company, payment information etc.
Example request:
curl -X PUT \
"https://api.metapic.com/extraUserInfo"
const url = new URL(
"https://api.metapic.com/extraUserInfo"
);
fetch(url, {
method: "PUT",
})
.then(response => response.json())
.then(json => console.log(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
}
HTTP Request
PUT extraUserInfo
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The ID of the tag. |
general
Get Payments for a user.
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/getPaymentsForUser"
const url = new URL(
"https://api.metapic.com/getPaymentsForUser"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
GET getPaymentsForUser
Get the pdf for a payment
Requires authentication
Example request:
curl -X GET \
-G "https://api.metapic.com/users/1/payments/dolorem/pdf"
const url = new URL(
"https://api.metapic.com/users/1/payments/dolorem/pdf"
);
fetch(url, {
method: "GET",
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
GET users/{userId}/payments/{id}/pdf
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | the invoice id you want the pdf for |