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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/support-admin-chat';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/support-admin-chat';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/support-admin-chat/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/support-admin-chat/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/support-admin-chat/1"
);

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

chat   integer   

The ID of the chat. Example: 1

Create Message

requires authentication

Create message in Admin Support

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/support-admin-chat/1/messages';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'message' => 'textMessage',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/deep-link-urls';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/deepLinkBlogPost/1';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'blogPost' => '<div> <a href=\'https://na-kd.com\'> link</a></div>',
            'dry' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/deepLinkBlogPost/1" \
    --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/1"
);

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

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/deep-links';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'links' => '["https://ellos.com"]',
            'userId' => 1,
            'dry' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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

Display a listing of the resource.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{store_id}/offers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/stores/{store_id}/offers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/stores/{store_id}/offers"
);

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

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

Request      

GET v2/stores/{store_id}/offers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get the validation rules that apply to the request.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{store_id}/offers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'active' => false,
            'campaign_title' => 'dye',
            'campaign_text' => 'xkoksikemfttxtpwoygql',
            'has_product_seeding' => false,
            'todo' => [
                'culpa',
            ],
            'has_onetime_payment' => false,
            'one_time_payment' => 4,
            'valid_from' => '2024-06-19T15:34:25',
            'valid_until' => '2006-09-03',
            'max_clicks' => 21,
            'per_user_limit' => false,
            'max_money' => 11,
            'type' => 'store_accept',
            'traffic_sources_costs' => [
                [
                    'source' => 2,
                    'cpc' => 15,
                    'cpa' => 0,
                ],
            ],
            'targets' => [
                'user_ids' => [
                    11,
                ],
                'user_tag_ids' => [
                    16,
                ],
                'store_group_ids' => [
                    11,
                ],
                'emails' => [
                    '[email protected]',
                ],
                'social_media_identifiers' => [
                    'opikhu',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/stores/{store_id}/offers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"active\": false,
    \"campaign_title\": \"dye\",
    \"campaign_text\": \"xkoksikemfttxtpwoygql\",
    \"has_product_seeding\": false,
    \"todo\": [
        \"culpa\"
    ],
    \"has_onetime_payment\": false,
    \"one_time_payment\": 4,
    \"valid_from\": \"2024-06-19T15:34:25\",
    \"valid_until\": \"2006-09-03\",
    \"max_clicks\": 21,
    \"per_user_limit\": false,
    \"max_money\": 11,
    \"type\": \"store_accept\",
    \"traffic_sources_costs\": [
        {
            \"source\": 2,
            \"cpc\": 15,
            \"cpa\": 0
        }
    ],
    \"targets\": {
        \"user_ids\": [
            11
        ],
        \"user_tag_ids\": [
            16
        ],
        \"store_group_ids\": [
            11
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"opikhu\"
        ]
    }
}"
const url = new URL(
    "https://api.metapic.com/v2/stores/{store_id}/offers"
);

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

let body = {
    "active": false,
    "campaign_title": "dye",
    "campaign_text": "xkoksikemfttxtpwoygql",
    "has_product_seeding": false,
    "todo": [
        "culpa"
    ],
    "has_onetime_payment": false,
    "one_time_payment": 4,
    "valid_from": "2024-06-19T15:34:25",
    "valid_until": "2006-09-03",
    "max_clicks": 21,
    "per_user_limit": false,
    "max_money": 11,
    "type": "store_accept",
    "traffic_sources_costs": [
        {
            "source": 2,
            "cpc": 15,
            "cpa": 0
        }
    ],
    "targets": {
        "user_ids": [
            11
        ],
        "user_tag_ids": [
            16
        ],
        "store_group_ids": [
            11
        ],
        "emails": [
            "[email protected]"
        ],
        "social_media_identifiers": [
            "opikhu"
        ]
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST v2/stores/{store_id}/offers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

active   boolean   

Example: false

campaign_title   string   

Must not be greater than 64 characters. Example: dye

campaign_text   string  optional  

Must not be greater than 1056 characters. Example: xkoksikemfttxtpwoygql

has_product_seeding   boolean  optional  

Example: false

todo   string[]  optional  
has_onetime_payment   boolean  optional  

Example: false

one_time_payment   integer  optional  

This field is required when has_onetime_payment is true. Must not be greater than 1000000. Example: 4

valid_from   string  optional  

Must be a valid date. Example: 2024-06-19T15:34:25

valid_until   string  optional  

Must be a valid date. Must be a date after from. Example: 2006-09-03

max_clicks   integer  optional  

Must not be greater than 1000000. Example: 21

per_user_limit   boolean  optional  

Example: false

max_money   integer  optional  

Must not be greater than 1000000. Example: 11

type   string   

Example: store_accept

Must be one of:
  • standard
  • user_accept
  • store_accept
  • suggestion
traffic_sources_costs   object[]   
source   integer   

Example: 2

cpc   integer   

Must not be greater than 1000. Example: 15

cpa   number   

Must be between 0 and 1. Example: 0

targets   object   
user_ids   integer[]  optional  
user_tag_ids   integer[]  optional  
store_group_ids   integer[]  optional  
emails   string[]  optional  

The value format is invalid.

social_media_identifiers   string[]  optional  

Must not be greater than 30 characters.

Get the validation rules that apply to the request.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{id}';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'active' => false,
            'campaign_title' => 'eocssznvuethlmslswbpniwp',
            'campaign_text' => 'durppwaubwzwnhcymmminyq',
            'has_product_seeding' => true,
            'todo' => [
                'commodi',
            ],
            'has_onetime_payment' => false,
            'one_time_payment' => 5,
            'valid_from' => '2024-06-19T15:34:25',
            'valid_until' => '2056-01-08',
            'max_clicks' => 5,
            'per_user_limit' => true,
            'max_money' => 20,
            'type' => 'user_accept',
            'traffic_sources_costs' => [
                [
                    'source' => 19,
                    'cpc' => 12,
                    'cpa' => 0,
                ],
            ],
            'targets' => [
                'user_ids' => [
                    15,
                ],
                'user_tag_ids' => [
                    4,
                ],
                'store_group_ids' => [
                    5,
                ],
                'emails' => [
                    '[email protected]',
                ],
                'social_media_identifiers' => [
                    'ifqfwsrefpszpagxotqpmcd',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offers/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"active\": false,
    \"campaign_title\": \"eocssznvuethlmslswbpniwp\",
    \"campaign_text\": \"durppwaubwzwnhcymmminyq\",
    \"has_product_seeding\": true,
    \"todo\": [
        \"commodi\"
    ],
    \"has_onetime_payment\": false,
    \"one_time_payment\": 5,
    \"valid_from\": \"2024-06-19T15:34:25\",
    \"valid_until\": \"2056-01-08\",
    \"max_clicks\": 5,
    \"per_user_limit\": true,
    \"max_money\": 20,
    \"type\": \"user_accept\",
    \"traffic_sources_costs\": [
        {
            \"source\": 19,
            \"cpc\": 12,
            \"cpa\": 0
        }
    ],
    \"targets\": {
        \"user_ids\": [
            15
        ],
        \"user_tag_ids\": [
            4
        ],
        \"store_group_ids\": [
            5
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"ifqfwsrefpszpagxotqpmcd\"
        ]
    }
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{id}"
);

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

let body = {
    "active": false,
    "campaign_title": "eocssznvuethlmslswbpniwp",
    "campaign_text": "durppwaubwzwnhcymmminyq",
    "has_product_seeding": true,
    "todo": [
        "commodi"
    ],
    "has_onetime_payment": false,
    "one_time_payment": 5,
    "valid_from": "2024-06-19T15:34:25",
    "valid_until": "2056-01-08",
    "max_clicks": 5,
    "per_user_limit": true,
    "max_money": 20,
    "type": "user_accept",
    "traffic_sources_costs": [
        {
            "source": 19,
            "cpc": 12,
            "cpa": 0
        }
    ],
    "targets": {
        "user_ids": [
            15
        ],
        "user_tag_ids": [
            4
        ],
        "store_group_ids": [
            5
        ],
        "emails": [
            "[email protected]"
        ],
        "social_media_identifiers": [
            "ifqfwsrefpszpagxotqpmcd"
        ]
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT v2/offers/{id}

PATCH v2/offers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

active   boolean   

Example: false

campaign_title   string   

Must not be greater than 64 characters. Example: eocssznvuethlmslswbpniwp

campaign_text   string  optional  

Must not be greater than 1056 characters. Example: durppwaubwzwnhcymmminyq

has_product_seeding   boolean  optional  

Example: true

todo   string[]  optional  
has_onetime_payment   boolean  optional  

Example: false

one_time_payment   integer  optional  

This field is required when has_onetime_payment is true. Must not be greater than 1000000. Example: 5

valid_from   string  optional  

Must be a valid date. Example: 2024-06-19T15:34:25

valid_until   string  optional  

Must be a valid date. Must be a date after from. Example: 2056-01-08

max_clicks   integer  optional  

Must not be greater than 1000000. Example: 5

per_user_limit   boolean  optional  

Example: true

max_money   integer  optional  

Must not be greater than 1000000. Example: 20

type   string   

Example: user_accept

Must be one of:
  • standard
  • user_accept
  • store_accept
  • suggestion
traffic_sources_costs   object[]   
source   integer   

Example: 19

cpc   integer   

Must not be greater than 1000. Example: 12

cpa   number   

Must be between 0 and 1. Example: 0

targets   object   
user_ids   integer[]  optional  
user_tag_ids   integer[]  optional  
store_group_ids   integer[]  optional  
emails   string[]  optional  

The value format is invalid.

social_media_identifiers   string[]  optional  

Must not be greater than 30 characters.

Remove the specified resource from storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offers/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{id}"
);

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

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

Request      

DELETE v2/offers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Display a listing of the resource.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/targets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets"
);

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

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

Request      

GET v2/offers/{offer_id}/targets

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get the validation rules that apply to the request.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'user_ids' => [
                3,
            ],
            'user_tag_ids' => [
                19,
            ],
            'store_group_ids' => [
                13,
            ],
            'emails' => [
                '[email protected]',
            ],
            'social_media_identifiers' => [
                'pykvzhevilpk',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offers/{offer_id}/targets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"user_ids\": [
        3
    ],
    \"user_tag_ids\": [
        19
    ],
    \"store_group_ids\": [
        13
    ],
    \"emails\": [
        \"[email protected]\"
    ],
    \"social_media_identifiers\": [
        \"pykvzhevilpk\"
    ]
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets"
);

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

let body = {
    "user_ids": [
        3
    ],
    "user_tag_ids": [
        19
    ],
    "store_group_ids": [
        13
    ],
    "emails": [
        "[email protected]"
    ],
    "social_media_identifiers": [
        "pykvzhevilpk"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST v2/offers/{offer_id}/targets

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

user_ids   integer[]  optional  
user_tag_ids   integer[]  optional  
store_group_ids   integer[]  optional  
emails   string[]  optional  

The value format is invalid.

social_media_identifiers   string[]  optional  

Must not be greater than 30 characters.

Display the specified resource.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}"
);

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

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

Request      

GET v2/offers/{offer_id}/targets/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Update the specified resource in storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets/{id}';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}"
);

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

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

Request      

PUT v2/offers/{offer_id}/targets/{id}

PATCH v2/offers/{offer_id}/targets/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Remove the specified resource from storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/targets/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/targets/{id}"
);

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

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

Request      

DELETE v2/offers/{offer_id}/targets/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Delete One Time Earning

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/admin/one-time-earnings/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/admin/one-time-earnings/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/admin/one-time-earnings/{id}"
);

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}

PUT v2/stores/{store_id}/payment

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores/{store_id}/payment';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/stores/{store_id}/payment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/stores/{store_id}/payment"
);

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

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

Request      

PUT v2/stores/{store_id}/payment

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

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

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stats/tags';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/{id}/stores/stats';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/users/{id}/stores/stats" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/users/{id}/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}

GET getInformation

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/getInformation';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/getEarningBetween';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/sendFeedback';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/setUserConfig';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/extraUserInfo';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/getPaymentsForUser';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/payments/2/pdf';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/users/1/payments/2/pdf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/users/1/payments/2/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

id   integer   

the invoice id you want the pdf for Example: 2

Entrypoint

App's entrypoint

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/entrypoint';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'app' => 'agency',
            'store_id' => '19',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/entrypoint?app=agency&store_id=19" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/entrypoint"
);

const params = {
    "app": "agency",
    "store_id": "19",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Request      

GET v2/entrypoint

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

app   string   

Example: agency

Must be one of:
  • advertiser
  • admin
  • agency
  • creator
store_id   integer  optional  

This field is required when app is advertiser. Example: 19

Response

Response Fields

indicators   object   
HAS_CAMPAIGNS   Indicates if the advertiser has campaigns.   

Link List

requires authentication

Get link list for user with all links and design

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/link-list';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/link-list';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'view_type' => 1,
            'color' => 1,
            'avatar' => 'url | imageData',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/link';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'title' => '"Link Title"',
            'tag_id' => 'quos',
            'image' => '"href or image data"',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": \"quos\",
    \"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": "quos",
    "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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/link/1';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'title' => '"Link Title"',
            'tag_id' => 1,
            'image' => '"href or image data"',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/users/1/link/1" \
    --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/1"
);

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/link/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/users/1/link/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/users/1/link/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": 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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/change-links-positions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'links' => [
                'itaque',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": [
        \"itaque\"
    ]
}"
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": [
        "itaque"
    ]
};

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/1/link-list-deep-link';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'url' => 'https://www.aimn.com/products/argyle-knit-sweater',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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"
}
 

Offer Comments V2

Add OfferUser comment

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/1/comments';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'comment' => 'rtghtooy',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offer-users/1/comments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"comment\": \"rtghtooy\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/1/comments"
);

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

let body = {
    "comment": "rtghtooy"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "id": 12,
    "user_id": 40185,
    "user_full_name": "Mark mark",
    "comment_text": "Test new 234",
    "created_at": "2024-04-24T13:03:41",
    "updated_at": "2024-04-24T13:03:41"
}
 

Request      

POST v2/offer-users/{offer_user_id}/comments

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

offer_user_id   string   

The ID of the offerUser. Example: 1

Body Parameters

comment   string   

Must not be greater than 15000 characters. Example: rtghtooy

Update OfferUser comment

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/1/comments/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'comment' => 'tdncctpxkohimjxpkjjkj',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offer-users/1/comments/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"comment\": \"tdncctpxkohimjxpkjjkj\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/1/comments/1"
);

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

let body = {
    "comment": "tdncctpxkohimjxpkjjkj"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "id": 12,
    "user_id": 40185,
    "user_full_name": "Mark mark",
    "comment_text": "Test new 234",
    "created_at": "2024-04-24T13:03:41",
    "updated_at": "2024-04-24T13:03:41"
}
 

Request      

PUT v2/offer-users/{offer_user_id}/comments/{id}

PATCH v2/offer-users/{offer_user_id}/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

offer_user_id   string   

The ID of the offerUser. Example: 1

offer_comment_id   string   

The ID of the comment. Example: 1

Body Parameters

comment   string   

Must not be greater than 15000 characters. Example: tdncctpxkohimjxpkjjkj

Delete OfferUser comment

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/1/comments/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offer-users/1/comments/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/1/comments/1"
);

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

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

Request      

DELETE v2/offer-users/{offer_user_id}/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

URL Parameters

offer_user_id   string   

The ID of the offerUser. Example: 1

offerCommentId   string   

The ID of the comment. Example: 1

Offer User Activity

Get the list of activities on OfferUser card

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-users/{offerUser_id}/activities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offer-users/{offerUser_id}/activities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-users/{offerUser_id}/activities"
);

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

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

Example response (200):


{
    "data": [
        {
            "type": "COMMENT",
            "actor_id": 34985,
            "actor_display_name": "@username",
            "comment_id": 1,
            "comment_text": "Qui delectus provident labore iusto aut ad aperiam. Vitae recusandae quis laborum culpa placeat animi quibusdam. Cum omnis quas velit rerum blanditiis voluptas modi provident.",
            "created_at": "2024-04-16T22:39:26"
        },
        {
            "type": "COMMENT",
            "actor_id": 40185,
            "actor_display_name": "Mark",
            "comment_id": 1,
            "comment_text": "Cum a maxime sit rem tenetur. Ad in quibusdam suscipit est eos aut. Ex eligendi necessitatibus tempora distinctio.",
            "created_at": "2024-04-16T22:39:26",
            "updated_at": "2024-04-16T22:39:26"
        },
        {
            "type": "DELETED_COMMENT",
            "created_at": "2024-04-16CEST22:15:41"
        },
        {
            "type": "STATUS_CHANGE",
            "actor_id": 40185,
            "actor_display_name": "Admin",
            "old_status": "suggestion",
            "new_status": "denied",
            "created_at": "2024-04-16T22:39:26"
        },
        {
            "type": "STATUS_CHANGE",
            "old_status": "applied",
            "new_status": "have_posted",
            "created_at": "2024-04-16T22:42:35"
        },
        {
            "type": "STATUS_CHANGE",
            "actor_id": 34985,
            "actor_display_name": "@username",
            "old_status": "applied",
            "new_status": "accepted",
            "created_at": "2024-04-16T22:44:59"
        }
    ],
    "links": {
        "first": "/v2/offer-users/48798908/activities?page=1",
        "last": "/v2/offer-users/48798908/activities?page=10",
        "prev": null,
        "next": "/v2/offer-users/48798908/activities?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 10,
        "links": [],
        "path": "/v2/offer-users/48798908/activities",
        "per_page": 20,
        "to": 20,
        "total": 200
    }
}
 

Request      

GET v2/offer-users/{offerUser_id}/activities

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Response

Response Fields

type   string   

The type of the activity. Can be one of the following values:
- COMMENT
- DELETED_COMMENT
- STATUS_CHANGE

actor_id   integer   

Unique identifier of the user who initiated the activity.
Absent when the activity was caused by the system.

actor_display_name   string   

The name of the actor who initiated the activity.
In case of Creator contains username
In case of Admin or Advertiser contains the full name
Absent when the activity was caused by the system.

comment_id   integer   

Unique identifier of the comment.
Present when type is COMMENT

comment_text   string   

Contains the comment text.
Present when type is COMMENT

new_status   string   

New offerUser status
Present when type is STATUS_CHANGE

old_status   string   

Old offerUser status
Present when type is STATUS_CHANGE

created_at   string   

Indicates time at which the activity happened.

updated_at   string   

Time of last editing.
Present if comment was edited

Offers

Get offer

requires authentication

Return offer details.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}"
);

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

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

Request      

GET v2/offers/{offer_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Upload Offer Image (v2)

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/uploads';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'default' => 'image.png',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offers/{offer_id}/uploads" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"default\": \"image.png\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/uploads"
);

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

let body = {
    "default": "image.png"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST v2/offers/{offer_id}/uploads

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

default   string   

Offer image.

Must not be greater than 10240 characters. Example: image.png

Get offer

requires authentication

Return offer details.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/{offer_token}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offer-by-token/{offer_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-by-token/{offer_token}"
);

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

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

Request      

GET v2/offer-by-token/{offer_token}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get Offers

requires authentication

Get Influencer Offers List

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/offers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'status' => 'open',
            'name' => 'testOffer',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
name   string  optional  

Offer name.

Must not be greater than 128 characters. Example: testOffer

Apply Offer

requires authentication

Apply offer by Influencer

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/offers/123/apply';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/offers/123/deny';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/offers/123/revert';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/offers/123/todo';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'todo' => [
                [
                    'key' => 'porro',
                    'value' => true,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": [
        {
            \"key\": \"porro\",
            \"value\": true
        }
    ]
}"
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": [
        {
            "key": "porro",
            "value": true
        }
    ]
};

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   object[]   
key   string   

Example: porro

value   boolean   

Example: true

Offer Participants

Checks if user has been added to the offer.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/users/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/users/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/users/{id}"
);

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

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

Request      

GET v2/offers/{offer_id}/users/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

List participants in a campaign

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'query' => 'sit',
            'status' => 'applied',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/participants?query=sit&status=applied" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants"
);

const params = {
    "query": "sit",
    "status": "applied",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "offer_id": 14,
            "user_id": null,
            "display_name": "abe11",
            "clicks": 2202221,
            "status": "suggestion",
            "pre_registered_identifier": "abe11",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 36419,
            "avatar": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/abe11.jpg"
        },
        {
            "id": null,
            "offer_id": 16,
            "user_id": null,
            "display_name": "reynolds.patricia",
            "clicks": 6,
            "status": "applied",
            "pre_registered_identifier": "reynolds.patricia",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 8,
            "avatar": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/reynolds.patricia.jpg"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET v2/offers/{offer_id}/participants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Query Parameters

query   string  optional  

Filters the results that contain a text match for this term. A match may happen on either:

  • social media identifier
  • email
  • user id
  • user's username
  • user tag

Partial matches are supported. For example, 'el' will match 'hello'.

Must not be greater than 128 characters. Example: sit

status   string  optional  

Example: applied

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent

Response

Response Fields

offer_comments_count   The number of comments on this participation.   
id   integer   

The unique id of this participant

offer_id   integer   

The id of the offer for this participant

display_name   string   

The name of the participant

clicks   integer   

The number of clicks left for this participant

status   string   

The status of this campaign participant

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
pre_registered_email   string|null   

The email by which/if the participant was added to the campaign

pre_registered_identifier   string|null   

The social media identifier by which/if the participant was added to the campaign

todo   array|null   

List of todo items

user_id   int|null   

The id of the user, if Metapic user is linked to the participant

username   string|null   

The username of the user, if Metapic user is linked to the participant

avatar   string|null   

The image associated with the user through social media identifier

social_media   array|null   

List of user's social media, if available

tags   array|null   

List of user tags, if available

Store a newly created resource in storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offers/{offer_id}/participants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants"
);

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

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

Request      

POST v2/offers/{offer_id}/participants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Get participant details

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}"
);

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

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

Example response (200):


{
    "id": 5,
    "offer_id": 17,
    "user_id": 6,
    "display_name": "[email protected]",
    "clicks": 14,
    "status": "denied",
    "pre_registered_email": "[email protected]",
    "todo": null,
    "payment_amount": null
}
 

Request      

GET v2/offers/{offer_id}/participants/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Response

Response Fields

id   integer   

The unique id of this participant

offer_id   integer   

The id of the offer for this participant

display_name   string   

The name of the participant

clicks   integer   

The number of clicks left for this participant

status   string   

The status of this campaign participant

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
pre_registered_email   string|null   

The email by which/if the participant was added to the campaign

pre_registered_identifier   string|null   

The social media identifier by which/if the participant was added to the campaign

todo   array|null   

List of todo items

user_id   int|null   

The id of the user, if Metapic user is linked to the participant

username   string|null   

The username of the user, if Metapic user is linked to the participant

avatar   string|null   

The image associated with the user through social media identifier

social_media   array|null   

List of user's social media, if available

tags   array|null   

List of user tags, if available

Update the specified resource in storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{id}';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}"
);

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

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

Request      

PUT v2/offers/{offer_id}/participants/{id}

PATCH v2/offers/{offer_id}/participants/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Remove the specified resource from storage.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{id}';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{id}"
);

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

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

Request      

DELETE v2/offers/{offer_id}/participants/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Update participant status

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offers/{offer_id}/participants/{participant_id}/update-status';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'status' => 'applied',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{participant_id}/update-status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"status\": \"applied\"
}"
const url = new URL(
    "https://api.metapic.com/v2/offers/{offer_id}/participants/{participant_id}/update-status"
);

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

let body = {
    "status": "applied"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "id": 6,
    "offer_id": 18,
    "user_id": null,
    "display_name": "stiedemann.isadore",
    "clicks": 9942,
    "status": "applied",
    "pre_registered_identifier": "stiedemann.isadore",
    "todo": null,
    "payment_amount": null,
    "avatar": "https://metapic-instagram.s3.eu-west-1.amazonaws.com/profilePictures/stiedemann.isadore.jpg"
}
 

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 v2/offers/{offer_id}/participants/{participant_id}/update-status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

status   string   

Example: applied

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent

Response

Response Fields

id   integer   

The unique id of this participant

offer_id   integer   

The id of the offer for this participant

display_name   string   

The name of the participant

clicks   integer   

The number of clicks left for this participant

status   string   

The status of this campaign participant

Must be one of:
  • open
  • applied
  • denied
  • accepted
  • store_denied
  • done
  • suggestion
  • second_prio
  • have_posted
  • have_received
  • product_sent
pre_registered_email   string|null   

The email by which/if the participant was added to the campaign

pre_registered_identifier   string|null   

The social media identifier by which/if the participant was added to the campaign

todo   array|null   

List of todo items

user_id   int|null   

The id of the user, if Metapic user is linked to the participant

username   string|null   

The username of the user, if Metapic user is linked to the participant

avatar   string|null   

The image associated with the user through social media identifier

social_media   array|null   

List of user's social media, if available

tags   array|null   

List of user tags, if available

Checks if user has been added to the offer.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{userId}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{userId}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{userId}"
);

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

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

Request      

GET v2/offer-by-token/{offer_token}/users/{userId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Mark user as having joined the campaign

requires authentication

This can only be performed by the user themselves.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{user_id}/join';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{user_id}/join" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/v2/offer-by-token/{offer_token}/users/{user_id}/join"
);

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

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

Request      

POST v2/offer-by-token/{offer_token}/users/{user_id}/join

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

OneTimeEarnings

Create One Time Earning

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/admin/one-time-earnings';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'user_id' => 'qui',
            'store_id' => 1,
            'user_earnings' => 1000,
            'invoice_amount' => 1000,
            'payment_date' => '2022-01-01',
            'comment' => '"Your one time payment"',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": \"qui\",
    \"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": "qui",
    "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: qui

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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/pending-orders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/product-carousels';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/product-carousels';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'name' => '[email protected]',
            'products' => [
                [
                    'name' => 'quam',
                    'link' => 'http://www.marquardt.com/',
                    'price' => 'laudantium',
                    'id' => 'neque',
                    'tag_id' => 3681.91,
                    'store_name' => 'peag',
                    'image_url' => 'http://smitham.org/',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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\": [
        {
            \"name\": \"quam\",
            \"link\": \"http:\\/\\/www.marquardt.com\\/\",
            \"price\": \"laudantium\",
            \"id\": \"neque\",
            \"tag_id\": 3681.91,
            \"store_name\": \"peag\",
            \"image_url\": \"http:\\/\\/smitham.org\\/\"
        }
    ]
}"
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": [
        {
            "name": "quam",
            "link": "http:\/\/www.marquardt.com\/",
            "price": "laudantium",
            "id": "neque",
            "tag_id": 3681.91,
            "store_name": "peag",
            "image_url": "http:\/\/smitham.org\/"
        }
    ]
};

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   object[]   

The Product Carousel products array

name   string   

Example: quam

link   string   

Must be a valid URL. Example: http://www.marquardt.com/

price   string   

Example: laudantium

id   string   

Example: neque

tag_id   number   

Example: 3681.91

store_name   string   

Must not be greater than 255 characters. Example: peag

image_url   string   

Must be a valid URL. Example: http://smitham.org/

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/product-carousels/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'name' => '[email protected]',
            'products' => [
                [
                    'name' => 'voluptas',
                    'link' => 'https://kihn.com/nesciunt-voluptatem-minus-doloremque-itaque-voluptatum.html',
                    'price' => 'quis',
                    'id' => 'beatae',
                    'tag_id' => 3630.8,
                    'store_name' => 'ymxxlduztnfiegcmha',
                    'image_url' => 'http://www.kuvalis.com/quaerat-porro-ut-commodi-voluptatem-placeat-non',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/users/123/product-carousels/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"name\": \"[email protected]\",
    \"products\": [
        {
            \"name\": \"voluptas\",
            \"link\": \"https:\\/\\/kihn.com\\/nesciunt-voluptatem-minus-doloremque-itaque-voluptatum.html\",
            \"price\": \"quis\",
            \"id\": \"beatae\",
            \"tag_id\": 3630.8,
            \"store_name\": \"ymxxlduztnfiegcmha\",
            \"image_url\": \"http:\\/\\/www.kuvalis.com\\/quaerat-porro-ut-commodi-voluptatem-placeat-non\"
        }
    ]
}"
const url = new URL(
    "https://api.metapic.com/users/123/product-carousels/1"
);

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

let body = {
    "name": "[email protected]",
    "products": [
        {
            "name": "voluptas",
            "link": "https:\/\/kihn.com\/nesciunt-voluptatem-minus-doloremque-itaque-voluptatum.html",
            "price": "quis",
            "id": "beatae",
            "tag_id": 3630.8,
            "store_name": "ymxxlduztnfiegcmha",
            "image_url": "http:\/\/www.kuvalis.com\/quaerat-porro-ut-commodi-voluptatem-placeat-non"
        }
    ]
};

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

product_carousel   integer   

The ID of the Product Carouse. Example: 123

Body Parameters

name   string   

Product carousel name. Example: [email protected]

products   object[]   

The Product Carousel products array

name   string   

Example: voluptas

link   string   

Must be a valid URL. Example: https://kihn.com/nesciunt-voluptatem-minus-doloremque-itaque-voluptatum.html

price   string   

Example: quis

id   string   

Example: beatae

tag_id   number   

Example: 3630.8

store_name   string   

Must not be greater than 255 characters. Example: ymxxlduztnfiegcmha

image_url   string   

Must be a valid URL. Example: http://www.kuvalis.com/quaerat-porro-ut-commodi-voluptatem-placeat-non

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/product-carousels/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://api.metapic.com/users/123/product-carousels/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/users/123/product-carousels/1"
);

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

product_carousel   integer   

The ID of the Product Carousel. Example: 123

Sms Verification

Create User Sms Verification

requires authentication

Uses to create verification and send verification code to user

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/verifications/sms';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'phone' => '+380xxxxxxx',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stats/earnings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-02-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stats/performance';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-02-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stats/getPaymentsDateAndAmount';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stats/one-time-earnings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-02-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stats/stores';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-02-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/{userId}/get-tag-stats-by-date';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'from' => '2019-01-01',
            'to' => '2019-02-02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/users/{userId}/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/{userId}/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}

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

Create Store

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/v2/stores';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'name' => 'eaque',
            'domains' => [
                'YdwAp.MIO(',
            ],
            'categories' => [
                1,
            ],
            'logo_url' => 'http://ankunding.info/eaque-consectetur-sequi-est-nemo',
            'country' => 'SE',
            'currency' => 'EUR',
            'language' => 'ut',
            'billing' => [
                'company_name' => 'itaque',
                'street' => 'nihil',
                'postal_code' => 'deleniti',
                'city' => 'totam',
                'vat_number' => 'voluptates',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://api.metapic.com/v2/stores" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"name\": \"eaque\",
    \"domains\": [
        \"YdwAp.MIO(\"
    ],
    \"categories\": [
        1
    ],
    \"logo_url\": \"http:\\/\\/ankunding.info\\/eaque-consectetur-sequi-est-nemo\",
    \"country\": \"SE\",
    \"currency\": \"EUR\",
    \"language\": \"ut\",
    \"billing\": {
        \"company_name\": \"itaque\",
        \"street\": \"nihil\",
        \"postal_code\": \"deleniti\",
        \"city\": \"totam\",
        \"vat_number\": \"voluptates\"
    }
}"
const url = new URL(
    "https://api.metapic.com/v2/stores"
);

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

let body = {
    "name": "eaque",
    "domains": [
        "YdwAp.MIO("
    ],
    "categories": [
        1
    ],
    "logo_url": "http:\/\/ankunding.info\/eaque-consectetur-sequi-est-nemo",
    "country": "SE",
    "currency": "EUR",
    "language": "ut",
    "billing": {
        "company_name": "itaque",
        "street": "nihil",
        "postal_code": "deleniti",
        "city": "totam",
        "vat_number": "voluptates"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST v2/stores

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authorization      

Example: {token}

Body Parameters

name   string   

Example: eaque

domains   string[]  optional  

Store domains.

Must match the regex /^(https?:\/\/)?([\dA-Za-z.-]+).([A-Za-z.]{2,6})([\/\w .-])\/?$/.

categories   string[]  optional  

Store categories IDs.

logo_url   string   

the logo url Example: http://ankunding.info/eaque-consectetur-sequi-est-nemo

country   string   

Store locale. Example: SE

currency   string   

Store ISO currency code. Example: EUR

language   string  optional  

Example: ut

billing   object  optional  
company_name   string   

Example: itaque

street   string   

Example: nihil

postal_code   string   

Example: deleniti

city   string   

Example: totam

vat_number   string  optional  

Example: voluptates

Store Categories

Get User Store Categories

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/store-categories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/users/123/store-categories';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'store_categories' => [
                'interested' => [
                    1,
                ],
                'very_interested' => [
                    1,
                ],
                'not_interested' => [
                    1,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/store-categories-list';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stores';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/user/stores/{id}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/user/stores/{id}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/user/stores/{id}"
);

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}

Get Stores by category interests

requires authentication

List of Stores ordered by category interests and price

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/stores-by-interests';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/topList/{locale}';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/topList/{locale}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}"
const url = new URL(
    "https://api.metapic.com/topList/{locale}"
);

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}

Subscriptions

Unsubscribe

Unsubscribe from newsletter or campaign mails

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/unsubscribe';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'email' => '[email protected]',
            'type' => 'campaign',
            'token' => '$2y$10$Hvf6Y9lVjrY/Qzg8eiynsu8vgq53cw3uDV3J9hAs/ScpSyt32Sl6S',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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

User

User Info

requires authentication

Get the same info as postLogin but with access token.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/user/info';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://api.metapic.com/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:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/extraUserInfo';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'json' => [
            'extraInfo' => 'molestiae',
            'code' => 'neque',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://api.metapic.com/extraUserInfo" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: {token}" \
    --data "{
    \"extraInfo\": \"molestiae\",
    \"code\": \"neque\"
}"
const url = new URL(
    "https://api.metapic.com/extraUserInfo"
);

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

let body = {
    "extraInfo": "molestiae",
    "code": "neque"
};

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

phone   string   

Example: suscipit

email   string  optional  
vat_no   string  optional  
code   string   

Example: neque

Validate IBAN

requires authentication

Check IBAN and get additional bank info

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api.metapic.com/validate-iban';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => '{token}',
        ],
        'query' => [
            'iban' => 'SEXXXXXXXXXXX',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
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