MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

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": []
    }
]
 

Request      

GET support-admin-chat

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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
            }
        }
    ]
}
 

Request      

POST support-admin-chat

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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
            }
        }
    ]
}
 

Request      

GET support-admin-chat/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   string   

The ID of the support admin chat. Example: eveniet

chat   integer   

The ID of the chat. Example: 1

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
}
 

Request      

POST support-admin-chat/{chatId}/messages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

chatId   integer   

The ID of the chat. Example: 1

Body Parameters

message   string   

Chat message. Must not be greater than 1024 characters. Example: textMessage

Deep linking

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());

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
}
 

Request      

POST deepLinkBlogPost/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   string   

The ID of the deepLinkBlogPost. Example: et

user_id   integer  optional  

The id of the user. Example: 1

Body Parameters

blogPost   string   

Link. Example: <div> <a href='https://na-kd.com'> link</a></div>

dry   boolean  optional  

When dry is set - link will not be created. Example: 1

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"
            }
        ]
    },
    "..."
]
 

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());

Request      

DELETE admin/one-time-earnings/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the one time earning. Example: 1

Get User Tags Stats Get Tags with TagClickView(clicks and earnings) statistic

Example request:
curl --request GET \
    --get "https://api.metapic.com/stats/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/stats/tags"
);

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

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

Request      

GET stats/tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

GET users/{id}/stores/stats

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the user. Example: 1

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());

Request      

POST shopelloDeepLinking/{locale}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

locale   string   

Example: ln_CG

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());

Request      

GET getInformation

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

POST getEarningBetween

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

POST sendFeedback

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

POST setUserConfig

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

GET extraUserInfo

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

GET getPaymentsForUser

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

GET users/{userId}/payments/{id}/pdf

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

Example: 1

id   integer   

the invoice id you want the pdf for Example: 19

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"
        }
    ]
}
 

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"
        }
    ]
}
 

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"
    }
}
 

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"
    }
}
 

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"
    }
}
 

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"
    }
]
 

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"
}
 

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": "&laquo; Previous",
            "active": false
        },
        {
            "url": "http://metapic-api.loc/users/{userId}/offers?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next &raquo;",
            "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
}
 

Request      

GET users/{userId}/offers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

Query Parameters

status   string  optional  

Offer status. Example: open

Must be one of:
  • suggestion
  • open
  • applied
  • denied
  • accepted
  • have_posted
  • have_received
  • store_denied
  • done
name   string  optional  

Offer name. Must not be greater than 128 characters. Example: testOffer

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"
}
 

Request      

PATCH users/{userId}/offers/{offerId}/apply

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

offerId   integer   

The Offer ID. Example: 123

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"
}
 

Request      

PATCH users/{userId}/offers/{offerId}/deny

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

offerId   integer   

The Offer ID. Example: 123

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"
}
 

Request      

PATCH users/{userId}/offers/{offerId}/revert

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

offerId   integer   

The Offer ID. Example: 123

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"
}
 

Request      

PATCH users/{userId}/offers/{offerId}/todo

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

offerId   integer   

The Offer ID. Example: 123

Body Parameters

todo   string[]   
key   string   

Example: reiciendis

value   boolean   

Example: false

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
}
 

Request      

POST admin/one-time-earnings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

user_id   string  optional  

The ID of the User This field is required when user_earnings is present. Example: magni

store_id   string  optional  

The ID of the Store. This field is required when invoice_amount is present. Example: 1

user_earnings   integer  optional  

User one-time earning cost. This field is required when invoice_amount is not present. Example: 1000

invoice_amount   integer  optional  

Invoice amount. This field is required when user_earnings is not present. Example: 1000

payment_date   string   

Date of one-time payment. Must be a valid date. Example: 2022-01-01

comment   string  optional  

Comment to one-time payment. Must not be greater than 255 characters. Example: "Your one time payment"

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"
            }
        ]
    }
}
 

Request      

GET users/{userId}/pending-orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

Product Carousel

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
}
 

Request      

GET users/{userId}/product-carousels

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The ID of the User. Example: 123

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}"
}
 

Request      

POST users/{userId}/product-carousels

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The ID of the User. Example: 123

Body Parameters

name   string   

Product carousel name. Example: [email protected]

products   string[]   

The Product Carousel products array

name   string   

Example: quae

link   string   

Must be a valid URL. Example: http://daniel.com/id-tempore-aut-quis-reprehenderit-totam-beatae

price   string   

Example: adipisci

id   string   

Example: quas

tag_id   number   

Example: 536010702.83128

store_name   string   

Must not be greater than 255 characters. Example: spwlsdtazcy

image_url   string   

Must be a valid URL. Example: http://www.balistreri.com/porro-ut-et-maxime-explicabo-natus-veniam-et-aut

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}"
}
 

Request      

PUT users/{userId}/product-carousels/{id}

PATCH users/{userId}/product-carousels/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The ID of the User. Example: 123

id   string   

The ID of the product carousel. Example: et

product_carousel   integer   

The ID of the Product Carouse. Example: 123

Body Parameters

name   string   

Product carousel name. Example: [email protected]

products   string[]   

The Product Carousel products array

name   string   

Example: quae

link   string   

Must be a valid URL. Example: http://heathcote.net/necessitatibus-dignissimos-error-culpa-molestias-natus-excepturi

price   string   

Example: est

id   string   

Example: qui

tag_id   number   

Example: 890270.72

store_name   string   

Must not be greater than 255 characters. Example: cocmenz

image_url   string   

Must be a valid URL. Example: http://kautzer.com/odit-aliquid-exercitationem-ipsum-exercitationem-rerum

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}"
}
 

Request      

DELETE users/{userId}/product-carousels/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The ID of the User. Example: 123

id   string   

The ID of the product carousel. Example: aliquid

product_carousel   integer   

The ID of the Product Carousel. Example: 123

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):


[]

 

Request      

GET product

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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):


[]

 

Request      

GET product/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the favorite. Example: 1

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"
}
 

Request      

POST users/verifications/sms

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

phone   string   

User phone. Example: +380xxxxxxx

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"
}
 

Request      

GET stats/earnings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

from   string  optional  

date. Must be a valid date. Example: 2019-01-01

to   string  optional  

date. Must be a valid date. Example: 2019-02-02

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
}
 

Request      

GET stats/performance

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

from   string  optional  

date. Must be a valid date. Example: 2019-01-01

to   string  optional  

date. Must be a valid date. Example: 2019-02-02

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ł"
        }
    ]
}
 

Request      

GET stats/getPaymentsDateAndAmount

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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
}
 

Request      

GET stats/one-time-earnings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

from   string  optional  

date. Must be a valid date. Example: 2019-01-01

to   string  optional  

date. Must be a valid date. Example: 2019-02-02

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());

Request      

GET stats/stores

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

from   string  optional  

date. Must be a valid date. Example: 2019-01-01

to   string  optional  

date. Must be a valid date. Example: 2019-02-02

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
    }
]
 

Request      

GET users/{userId}/get-tag-stats-by-date

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

Example: 1

Query Parameters

from   string  optional  

date. Must be a valid date. Example: 2019-01-01

to   string  optional  

date. Must be a valid date. Example: 2019-02-02

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": []
}
 

Request      

GET users/{userId}/store-categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

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": []
}
 

Request      

POST users/{userId}/store-categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

userId   integer   

The User ID. Example: 123

Body Parameters

store_categories   object   
interested   string[]  optional  

Store categories IDs.

very_interested   string[]  optional  

Store categories IDs.

not_interested   string[]  optional  

Store categories IDs.

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"
    }
]
 

Request      

GET store-categories-list

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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"
        }
    }
]
 

Request      

GET stores

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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());

Request      

GET user/stores/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the store. Example: 2

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"
                }
            }
        ]
    }
]
 

Request      

GET stores-by-interests

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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": ""
        }
    ]
}
 

Request      

GET topList/{locale}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

locale   string   

Example: dv_MV

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
}
 

Request      

POST unsubscribe

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

email   string   

The email to unsubscribe. The value format is invalid. Example: [email protected]

type   string   

The subscription type. Example: campaign

Must be one of:
  • campaign
  • newsletter
token   string   

Hashed string. Example: $2y$10$Hvf6Y9lVjrY/Qzg8eiynsu8vgq53cw3uDV3J9hAs/ScpSyt32Sl6S

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 --request GET \
    --get "https://api.metapic.com/tags?user_id=1&image_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/tags"
);

const params = {
    "user_id": "1",
    "image_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


[
    {
        "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"
    },
    "..."
]
 

Request      

GET tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

user_id   integer  optional  

The id of the user to fetch tags for. Unsigned integer. Example: 1

image_id   integer  optional  

The id of the image to fetch tags for. Unsigned integer. Unsigned integer. Example: 1

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 --request POST \
    "https://api.metapic.com/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/tags"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.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}"
}
 

Request      

POST tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get Tag

requires authentication

Get Tag by ID

Example request:
curl --request GET \
    --get "https://api.metapic.com/tags/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/tags/1"
);

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.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}"
}
 

Request      

GET tags/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the Tag. Example: 1

Update Tag

Updates a Metapic Tag

Example request:
curl --request PUT \
    "https://api.metapic.com/tags/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/tags/1"
);

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

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.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}"
}
 

Request      

PUT tags/{id}

PATCH tags/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the tag. Example: 1

Delete Tag

Delete by ID

Example request:
curl --request DELETE \
    "https://api.metapic.com/tags/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/tags/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.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}"
}
 

Request      

DELETE tags/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the tag. Example: 1

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 --request GET \
    --get "https://api.metapic.com/tags/tempore/product?id=123" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/tags/tempore/product"
);

const params = {
    "id": "123",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "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"
}
 

Request      

GET tags/{id}/product

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   string   

The ID of the tag. Example: tempore

Query Parameters

id   integer  optional  

The id of the tag you want the product from. Unsigned integer. Example: 123

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"
    }
}
 

Request      

GET user/info

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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
}
 

Request      

PUT extraUserInfo

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

id   integer   

The ID of the tag. Example: 1

Body Parameters

extraInfo   string   

Example: veniam

phone   string   

Example: reiciendis

email   string  optional  
vat_no   string  optional  
code   string   

Example: et

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
}
 

Request      

GET validate-iban

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

iban   string   

User IBAN. Example: SEXXXXXXXXXXX