Introduction

This documentation aims to provide all the information you need to work with our API. The v2 (and above) API follows the Design Principles and Guidelines. If you find anything that doesn't comply, please complain to the dev team immediately 👮

Authenticating requests

To authenticate requests, include a Authorization header with the value "{accessToken}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

For more information see Authentication in the P&E docs.

Client

List clients

GET
https://api.metapic.dev
/v2/clients
requires authentication

Endpoint for querying & sorting all clients.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

name
string

Query by client's name or User revenue tier name. Returns all clients matching the given name. Must not be greater than 255 characters.

Example:
Metapic SE
store_group_id
integer

Query by client's store group. Returns all clients which belong to the given store_group_id.

Example:
15
size
integer

Page size. Defaults to 20. Must not be greater than 100.

Example:
20
sort_by
string

Must follow the correct format: column_name:direction, where column_name must be a valid property for given resource and direction can be one of asc|desc, both of which are required if sort_by is present.

Example:
created_at:desc
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/clients?name=Metapic+SE&store_group_id=15&size=20&sort_by=created_at%3Adesc" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "name": "Anita Russel DVM"
        },
        {
            "id": null,
            "name": "Kathlyn Shields Sr."
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}

Creator Media

Operations on Media posted by Creators

Lists Creator generated media captured by Metapic.

GET
https://api.metapic.dev
/v2/user-media
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

query
string

Filters media by username.

Example:
voluptatem
status
string

Filter user media by show store value.

Must be one of:
  • all
  • 0
  • 1
  • 2
Example:
2
type
string

Filters media by type.

Must be one of:
  • all
  • instagram
  • tiktok
  • youtube
Example:
instagram
favorite
string

Filter user media by favorite value.

Must be one of:
  • all
  • 1
  • 0
Example:
1
group
integer

:shrug:.

Example:
3
format
string

Format to export.

Must be one of:
  • csv
  • xlsx
  • json
Example:
csv

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/user-media?query=voluptatem&status=2&type=instagram&favorite=1&group=3&format=csv" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "media_type": "youtube",
            "media_id": "FLR0BB4qDt8",
            "username": "hamida_most",
            "tag_id": null,
            "user_id": null,
            "favorite": 1,
            "show_store": 1,
            "published_at": "2023-05-13",
            "created_at": "2023-07-18T12:02:53.000000Z",
            "updated_at": "2023-07-18T12:09:13.000000Z"
        },
        {
            "id": 2,
            "media_type": "tiktok",
            "username": "juliaringblomm",
            "tag_id": null,
            "user_id": null,
            "favorite": 1,
            "show_store": 0,
            "published_at": "2023-06-17",
            "created_at": "2023-07-18T12:10:49.000000Z",
            "updated_at": "2023-07-18T13:39:28.000000Z",
            "media": {
                "content_type": "video/mp4",
                "href": "https://metapic-tiktok-media.example/juliaringblomm/7245692137566653722"
            }
        },
        {
            "id": 3,
            "media_type": "instagram",
            "username": "juliaringblomm",
            "tag_id": null,
            "user_id": null,
            "favorite": 1,
            "show_store": 0,
            "published_at": "2023-06-17",
            "created_at": "2023-07-18T12:10:49.000000Z",
            "updated_at": "2023-07-18T13:39:28.000000Z",
            "media": {
                "content_type": "video/mp4",
                "href": "https://metapic-instragram-media.example/juliaringblomm/7245692137566653722"
            }
        },
        {
            "id": 4,
            "media_type": "instagram",
            "username": "juliaringblomm",
            "tag_id": null,
            "user_id": null,
            "favorite": 1,
            "show_store": 0,
            "published_at": "2023-06-17",
            "created_at": "2023-07-18T12:10:49.000000Z",
            "updated_at": "2023-07-18T13:39:28.000000Z",
            "media": {
                "content_type": "image/jpeg",
                "href": "https://metapic-instragram-media.example/juliaringblomm/7245692137566653722"
            }
        }
    ],
    "first_page_url": "http://metapic-api.my/user-media?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "http://metapic-api.my/user-media?page=3",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "http://metapic-api.my/user-media?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "http://metapic-api.my/user-media?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "http://metapic-api.my/user-media?page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "http://metapic-api.my/user-media?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "http://metapic-api.my/user-media?page=2",
    "path": "http://metapic-api.my/user-media",
    "per_page": 5,
    "prev_page_url": null,
    "to": 5,
    "total": 12
}

Endpoints

Get Store Categories

GET
https://api.metapic.dev
/v2/store-categories
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/store-categories" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "id": null,
        "name": "Fashion"
    },
    {
        "id": null,
        "name": "Books"
    }
]

GET v2/users/{user_id}/stores-by-categories

GET
https://api.metapic.dev
/v2/users/{user_id}/stores-by-categories
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

user_id
integer
required

The ID of the user.

Example:
17
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users/17/stores-by-categories" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

GET v2/users/{user_id}/stores-by-toplist

GET
https://api.metapic.dev
/v2/users/{user_id}/stores-by-toplist
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

user_id
integer
required

The ID of the user.

Example:
4
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users/4/stores-by-toplist" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

Entrypoint

App's entrypoint

GET
https://api.metapic.dev
/v2/entrypoint
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/entrypoint" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"app\": \"advertiser\",
    \"store_id\": 6
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

Offer

Create campaign

POST
https://api.metapic.dev
/v2/stores/{store_id}/offers
requires authentication

Creates new campaign for a store.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

store_id
integer
required

The store ID.

Example:
15

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/stores/15/offers" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_group_id\": 2,
    \"type\": \"store_accept\",
    \"name\": \"Summer campaign for VIP creators\",
    \"campaign_title\": \"Summer campaign\",
    \"campaign_text\": \"This is a summer campaign!\",
    \"has_product_seeding\": false,
    \"has_onetime_payment\": true,
    \"per_user_limit\": true,
    \"one_time_payment\": 4.5,
    \"max_money\": 0.88,
    \"budget_limit\": 2,
    \"max_clicks\": 16,
    \"valid_from\": \"2024-11-20T16:38:42\",
    \"valid_until\": \"2123-07-18\",
    \"todo\": [
        \"ruttevexcrez\"
    ],
    \"store_visibility\": \"0\",
    \"show_for_advertiser\": false,
    \"priority_after\": 7,
    \"shared_budget_id\": 1,
    \"shared_budget\": {
        \"title\": \"Summer budget\",
        \"amount\": 10000
    },
    \"targets\": {
        \"user_ids\": [
            12
        ],
        \"user_tag_ids\": [
            8
        ],
        \"store_group_ids\": [
            11
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"axvsbuyfyopgjmi\"
        ],
        \"client_ids\": [
            20
        ],
        \"revenue_tier_ids\": [
            19
        ]
    },
    \"traffic_sources_costs\": [
        {
            \"source\": 1,
            \"cpc\": 230,
            \"cpa\": 0.2,
            \"invoice_cpc\": 250,
            \"invoice_cpa\": 0.25,
            \"user_revenue\": 1
        }
    ]
}"
Example response:
{
    "data": {
        "id": null,
        "campaign_title": "Jovanny Turner",
        "campaign_text": "Dolores et architecto non est alias eum. Sed delectus dolores quibusdam est explicabo tenetur. Ut omnis totam et voluptas odit et.",
        "has_product_seeding": null,
        "has_onetime_payment": null,
        "status": "active",
        "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBlZTY2P3RleHQ9cmVydW0=",
        "image": null,
        "store_id": 1122,
        "token": null,
        "type": "standard",
        "warnings": {
            "skipped_targets": {
                "user_ids": [
                    12,
                    15
                ]
            }
        }
    },
    "warnings": {
        "skipped_targets": {
            "user_ids": [
                12,
                15
            ]
        }
    }
}

Display campaign

GET
https://api.metapic.dev
/v2/offers/{offer_id}
requires authentication

Returns information about a specific campaign.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/15556" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "campaign_title": "Joyce Monahan",
    "campaign_text": "Est laborum quis ipsum nulla delectus numquam voluptas dolorum. Reprehenderit atque nihil inventore et voluptas. Ut qui ipsam libero dolorum harum enim.",
    "has_product_seeding": null,
    "has_onetime_payment": null,
    "status": "active",
    "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBiYjMzP3RleHQ9dXQ=",
    "image": null,
    "store_id": 1123,
    "token": null,
    "type": "standard"
}

Update campaign

PUT
PATCH
https://api.metapic.dev
/v2/offers/{id}
requires authentication

Updates existing campaign.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the offer.

Example:
19
offer_id
integer
required

The offer ID

Example:
15556

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/offers/19" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_group_id\": 15,
    \"type\": \"suggestion\",
    \"name\": \"Summer campaign for VIP creators\",
    \"campaign_title\": \"Summer campaign\",
    \"campaign_text\": \"This is a summer campaign!\",
    \"has_product_seeding\": true,
    \"has_onetime_payment\": false,
    \"per_user_limit\": false,
    \"one_time_payment\": 0,
    \"max_money\": 4168.182484058,
    \"budget_limit\": 19,
    \"max_clicks\": 10,
    \"valid_from\": \"2024-11-20T16:38:42\",
    \"valid_until\": \"1995-06-08\",
    \"todo\": [
        \"xomvzzzspfbrzyudjyoyjhwp\"
    ],
    \"store_visibility\": \"2\",
    \"show_for_advertiser\": false,
    \"priority_after\": 18,
    \"traffic_sources_costs\": [
        {
            \"source\": 1,
            \"cpc\": 230,
            \"cpa\": 0.2,
            \"invoice_cpc\": 250,
            \"invoice_cpa\": 0.25,
            \"user_revenue\": 0
        }
    ],
    \"targets\": {
        \"0\": [],
        \"user_ids\": [
            6
        ],
        \"user_tag_ids\": [
            8
        ],
        \"store_group_ids\": [
            3
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"alabscuiq\"
        ],
        \"client_ids\": [
            14
        ],
        \"revenue_tier_ids\": [
            9
        ]
    },
    \"shared_budget_id\": 1,
    \"shared_budget\": {
        \"title\": \"Summer budget\",
        \"amount\": 10000
    }
}"
Example response:
{
    "data": {
        "id": null,
        "campaign_title": "Sterling Stroman",
        "campaign_text": "Odio tenetur explicabo dolor in nemo. Quo est sint a fugiat laborum consequatur voluptatibus. Voluptate non aspernatur modi iste voluptatem sed.",
        "has_product_seeding": null,
        "has_onetime_payment": null,
        "status": "active",
        "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBkZGNjP3RleHQ9YXV0",
        "image": null,
        "store_id": 1124,
        "token": null,
        "type": "standard",
        "warnings": {
            "skipped_targets": {
                "user_ids": [
                    12,
                    15
                ]
            }
        }
    },
    "warnings": {
        "skipped_targets": {
            "user_ids": [
                12,
                15
            ]
        }
    }
}

Delete campaign

DELETE
https://api.metapic.dev
/v2/offers/{id}
requires authentication

Soft deletes a campaign.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the offer.

Example:
4
offer_id
integer
required

The offer ID

Example:
15556
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/offers/4" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

List campaigns

GET
https://api.metapic.dev
/v2/offers
requires authentication

Endpoint for querying & sorting all campaigns.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

query
string

Query by either of the following: ID, internal name, title. Returns all offers with id equal to query OR name contains query OR campaign_title contains query. Must not be greater than 64 characters.

Example:
black friday
statuses
string[]
Must be one of:
  • deleted
  • ended
  • scheduled
  • paused
  • active
Example:
["scheduled"]
store_ids
integer[]

Query by offer's store. Returns all offers which belong to the given store_ids.

Example:
[1]
store_group_ids
integer[]

Query by offer's store group. Returns all offers which belong to the given store_group_ids.

Example:
[1]
created_by
integer
required

Query by offer's author ID. Returns all offers created by the user making the request

Example:
5
or_id
integer

Query by offer's ID. Performs an 'OR' search, compared to 'AND' search for other filters, so an offer with given ID is always included in the results, if matched.

Example:
1234
target_user_id
integer
Example:
20
size
integer

Page size. Defaults to 20. Must not be greater than 100.

Example:
20
sort_by
string

Must follow the correct format: column_name:direction, where column_name must be a valid property for given resource and direction can be one of asc|desc, both of which are required if sort_by is present.

Example:
created_at:desc
custom_sort_by
string
Must be one of:
  • ends_soon
Example:
ends_soon
include
string[]

Include optional relationships in the response.

Must be one of:
  • trafficSourcesCosts
  • store
  • targets
Example:
["trafficSourcesCosts"]
format
string
Must be one of:
  • csv
  • xlsx
Example:
csv

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers?query=black+friday&statuses[]=scheduled&store_ids[]=1&store_group_ids[]=1&created_by=5&or_id=1234&target_user_id=20&size=20&sort_by=created_at%3Adesc&custom_sort_by=ends_soon&include[]=trafficSourcesCosts&format=csv" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "campaign_title": "Mr. Brayan Batz",
            "campaign_text": "Labore similique voluptatem autem nostrum id consequatur. Soluta placeat nemo non nulla fugit. Voluptatibus omnis animi facere.",
            "has_product_seeding": null,
            "has_onetime_payment": null,
            "status": "active",
            "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBiYjExP3RleHQ9ZXZlbmlldA==",
            "image": null,
            "store_id": 1125,
            "token": null,
            "type": "standard"
        },
        {
            "id": null,
            "campaign_title": "Rashawn Powlowski",
            "campaign_text": "Dolorem autem et inventore quisquam nihil id. Expedita fuga velit consequuntur cum est rem. Est est provident eaque consectetur non aliquid.",
            "has_product_seeding": null,
            "has_onetime_payment": null,
            "status": "active",
            "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAyMmFhP3RleHQ9Y29ycnVwdGk=",
            "image": null,
            "store_id": 1126,
            "token": null,
            "type": "standard"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}

Upload campaign image

POST
https://api.metapic.dev
/v2/offers/{offer_id}/uploads
requires authentication

Uploads an image to a campaign.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/offers/15556/uploads" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"default\": \"adipisci\"
}"
Example response:
{
    "id": null,
    "campaign_title": "Miss Priscilla Flatley V",
    "campaign_text": "Omnis cumque voluptatum distinctio magnam doloribus alias. Nemo laudantium cum alias ea in. Qui impedit quibusdam dicta dolore.",
    "has_product_seeding": null,
    "has_onetime_payment": null,
    "status": "active",
    "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAwMDExP3RleHQ9c2l0",
    "image": null,
    "store_id": 1127,
    "token": null,
    "type": "standard"
}

Pause campaign

PUT
https://api.metapic.dev
/v2/offers/{offer_id}/pause
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/offers/15556/pause" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "campaign_title": "Sallie Wehner DVM",
    "campaign_text": "Laboriosam suscipit ipsum veniam fugit tempore. Quis laborum harum culpa rerum quos. Dolorem consequatur doloremque non magni adipisci voluptatem consequatur. Sed laudantium minus aut placeat.",
    "has_product_seeding": null,
    "has_onetime_payment": null,
    "status": "active",
    "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA4ODY2P3RleHQ9YWNjdXNhbXVz",
    "image": null,
    "store_id": 1128,
    "token": null,
    "type": "standard"
}

Unpause campaign

PUT
https://api.metapic.dev
/v2/offers/{offer_id}/unpause
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/offers/15556/unpause" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "campaign_title": "Ms. Haylie Thiel DDS",
    "campaign_text": "Earum possimus maiores architecto sunt rerum odit exercitationem. Accusantium non architecto asperiores. Enim fugiat commodi nemo laboriosam sed explicabo expedita molestiae.",
    "has_product_seeding": null,
    "has_onetime_payment": null,
    "status": "active",
    "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBiYmVlP3RleHQ9Y29uc2VxdWF0dXI=",
    "image": null,
    "store_id": 1129,
    "token": null,
    "type": "standard"
}
null

Display campaign stats

GET
https://api.metapic.dev
/v2/offers/{offer_id}/stats
requires authentication

Returns statistics about a specific campaign.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Query Parameters

start_date
string
required

The start date for the stats period (YYYY-MM-DD)

Example:
2023-01-01
end_date
string
required

The end date for the stats period (YYYY-MM-DD)

Example:
2023-01-31

Body Parameters

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/15556/stats?start_date=2023-01-01&end_date=2023-01-31" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2010-04-06\",
    \"end_date\": \"2064-06-04\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

GET v2/users/{user_id}/offers

GET
https://api.metapic.dev
/v2/users/{user_id}/offers
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

user_id
integer
required

The ID of the user.

Example:
18

Body Parameters

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users/18/offers" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"product_sent\",
    \"name\": \"tehgorlmexy\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

Display campaign

GET
https://api.metapic.dev
/v2/offer-by-token/{offer_token}
requires authentication

Returns information about a specific campaign.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_token
string
required
Example:
corrupti
offer_id
integer
required

The offer ID

Example:
15556

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offer-by-token/corrupti" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "campaign_title": "Giuseppe Heidenreich",
    "campaign_text": "Expedita aut est tempora consequuntur quod eligendi sed. Illum aliquam sed aut at hic quis. Itaque quo ducimus nesciunt vel rerum. Eaque corrupti aut eum incidunt enim ea impedit nihil.",
    "has_product_seeding": null,
    "has_onetime_payment": null,
    "status": "active",
    "image_url": "https://media.metapic.com/insecure/rs:fill:800:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBjYzc3P3RleHQ9YXV0",
    "image": null,
    "store_id": 1148,
    "token": null,
    "type": "standard"
}

Offer Target


Get targets for offer

GET
https://api.metapic.dev
/v2/offers/{offer_id}/targets
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/15556/targets" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

Add new targets to offer

POST
https://api.metapic.dev
/v2/offers/{offer_id}/targets
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The offer ID

Example:
15556

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/offers/15556/targets" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_ids\": [
        9
    ],
    \"user_tag_ids\": [
        13
    ],
    \"store_group_ids\": [
        13
    ],
    \"emails\": [
        \"[email protected]\"
    ],
    \"social_media_identifiers\": [
        \"kcrav\"
    ],
    \"client_ids\": [
        11
    ],
    \"revenue_tier_ids\": [
        15
    ]
}"

Offer Participant

Checks if user has been added to the offer.

GET
https://api.metapic.dev
/v2/offers/{offer_id}/users/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The ID of the offer.

Example:
1
id
integer
required

The ID of the user.

Example:
19
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/1/users/19" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

List participants in a campaign

GET
https://api.metapic.dev
/v2/offers/{offer_id}/participants
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The ID of the offer.

Example:
7

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/7/participants" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"query\": \"hnafzcwjqso\",
    \"status\": \"store_denied\",
    \"participants_v2\": true
}"
Example response:
{
    "data": [
        {
            "id": null,
            "offer_id": 589,
            "user_id": 109906,
            "display_name": "bayer.guy",
            "clicks": 8,
            "status": "denied",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 7098138
        },
        {
            "id": null,
            "offer_id": 590,
            "user_id": null,
            "display_name": "[email protected]",
            "clicks": 76440,
            "status": "store_denied",
            "pre_registered_email": "[email protected]",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 81455
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}

Get participant details

GET
https://api.metapic.dev
/v2/offers/{offer_id}/participants/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The ID of the offer.

Example:
9
id
integer
required

The ID of the participant.

Example:
20

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/9/participants/20" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "offer_id": 591,
    "user_id": 109910,
    "display_name": "magnus.corwin",
    "clicks": 65186,
    "status": "have_posted",
    "todo": null,
    "payment_amount": null
}

Retrieve participants statistics for an offer

GET
https://api.metapic.dev
/v2/offers/{offer_id}/participants-stats
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The ID of the offer.

Example:
19

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/19/participants-stats" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"query\": \"lojasjinpqg\",
    \"active\": false,
    \"start_date\": \"2011-12-03\",
    \"end_date\": \"2037-07-10\",
    \"sort_by\": \"clicks:asc\"
}"
Example response:
{
    "data": [
        {
            "id": null,
            "user_id": 109911,
            "display_name": "delta80",
            "clicks": 805195320,
            "status": "have_posted",
            "username": "delta80",
            "links_created": null,
            "estimated_gp": null,
            "estimated_earning_to_cost_ratio": null
        },
        {
            "id": null,
            "user_id": 109913,
            "display_name": "hkessler",
            "clicks": 835906834,
            "status": "open",
            "username": "hkessler",
            "links_created": null,
            "estimated_gp": null,
            "estimated_earning_to_cost_ratio": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}

Retrieve participants count by active/inactive

GET
https://api.metapic.dev
/v2/offers/{offer_id}/participants-count-by-click-activity
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The ID of the offer.

Example:
20

Body Parameters

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/20/participants-count-by-click-activity" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2009-08-07\",
    \"end_date\": \"2060-09-01\"
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

Update participant status

PATCH
https://api.metapic.dev
/v2/offers/{offer_id}/participants/{participant_id}/update-status
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_id
integer
required

The ID of the offer.

Example:
14
participant_id
integer
required

The ID of the participant.

Example:
9

Body Parameters

Response Fields

Example request:
curl --request PATCH \
    "https://api.metapic.dev/v2/offers/14/participants/9/update-status" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"open\"
}"
Example response:
{
    "id": null,
    "offer_id": 594,
    "user_id": null,
    "display_name": "[email protected]",
    "clicks": 342275606,
    "status": "applied",
    "pre_registered_email": "[email protected]",
    "todo": null,
    "payment_amount": null
}

Checks if user has been added to the offer.

GET
https://api.metapic.dev
/v2/offer-by-token/{offer_token}/users/{userId}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_token
string
required
Example:
et
userId
integer
required
Example:
7
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offer-by-token/et/users/7" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                                                                                    set-cookie
                                                            : metapic_session=eyJpdiI6IlNFaWRFcnY5OFFma05TZmhvS2hUK2c9PSIsInZhbHVlIjoiWVA5cGRzaFBYQUlWbjFKd3l2QkEvSS8xL095ZGxJMzg5WXVhVitDNnRnNjgydWZ2L291ZWFJNVZjbFZYVGQ3ancyeG4vWlQyeTZKZlYzK0liMGlvREpFNFZFYTJtTWlWa09oWGhqbGtXVXhTYTdMNmI2WWZuTEdZTEozaHJSQk8iLCJtYWMiOiJlMjdiZjZjYmRkMzBhZjc4Nzc5NmUwZmU0YjA0NzljNDE1NWZjOTdhMDI4ZTY3YjJkN2IxMjQxMDMwYjk0MTQyIiwidGFnIjoiIn0%3D; expires=Wed, 20 Nov 2024 17:38:43 GMT; Max-Age=7200; path=/; httponly
                                                         
{
    "message": "Unauthenticated."
}

Mark user as having joined the campaign

POST
https://api.metapic.dev
/v2/offer-by-token/{offer_token}/users/{user_id}/join
requires authentication

This can only be performed by the user themselves.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_token
string
required
Example:
quod
user_id
integer
required

The ID of the user.

Example:
11
Example request:
curl --request POST \
    "https://api.metapic.dev/v2/offer-by-token/quod/users/11/join" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Comment


Add OfferUser comment

POST
https://api.metapic.dev
/v2/offer-users/{offer_user_id}/comments
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_user_id
string
required

The ID of the offerUser.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/offer-users/1/comments" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment\": \"ulmjwrnzwga\"
}"

Update OfferUser comment

PUT
PATCH
https://api.metapic.dev
/v2/offer-users/{offer_user_id}/comments/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_user_id
string
required

The ID of the offerUser.

Example:
1
id
integer
required

The ID of the comment.

Example:
5
offer_comment_id
string
required

The ID of the comment.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/offer-users/1/comments/5" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment\": \"pybawromuoemztxjojw\"
}"

Delete OfferUser comment

DELETE
https://api.metapic.dev
/v2/offer-users/{offer_user_id}/comments/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offer_user_id
string
required

The ID of the offerUser.

Example:
1
id
integer
required

The ID of the comment.

Example:
8
offerCommentId
string
required

The ID of the comment.

Example:
1
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/offer-users/1/comments/8" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Activity


Get the list of activities on OfferUser card

GET
https://api.metapic.dev
/v2/offer-users/{offerUser}/activities
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

offerUser
integer
required
Example:
17

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offer-users/17/activities" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthenticated."
}

Return Ads

List Return Ads

GET
https://api.metapic.dev
/v2/return-ads
requires authentication

Paginated list of Return Ads

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

size
integer

Page size. Defaults to 20. Must not be greater than 100.

Example:
20

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/return-ads?size=20" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "name": "Emilie Smith",
            "advertiser_group_id": 2162,
            "affiliate_link": {
                "url": "https://www.ullrich.com/et-atque-laudantium-non-perferendis",
                "advertiser_name": "Durgan-Kub",
                "advertiser_logo": {
                    "url": "https://media.metapic.com/insecure/rs:fill:500:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA5OTAwP3RleHQ9bGF1ZGFudGl1bQ==",
                    "key": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA5OTAwP3RleHQ9bGF1ZGFudGl1bQ==",
                    "base64": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA5OTAwP3RleHQ9bGF1ZGFudGl1bQ==",
                    "base_url": "https://media.metapic.com"
                }
            },
            "author_id": 109916,
            "display_for_all_advertisers": false,
            "styles": null,
            "image": null,
            "starts_at": "2024-10-20T14:38:43.121124Z",
            "ends_at": "2024-12-20T15:38:43.121190Z"
        },
        {
            "id": null,
            "name": "Layne Labadie",
            "advertiser_group_id": 2165,
            "affiliate_link": {
                "url": "http://muller.com/aliquam-beatae-nisi-dolore-eius-blanditiis-dignissimos-omnis",
                "advertiser_name": "Buckridge, Lebsack and Pfannerstill",
                "advertiser_logo": {
                    "url": "https://media.metapic.com/insecure/rs:fill:500:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBjYzY2P3RleHQ9cXVpYQ==",
                    "key": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBjYzY2P3RleHQ9cXVpYQ==",
                    "base64": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBjYzY2P3RleHQ9cXVpYQ==",
                    "base_url": "https://media.metapic.com"
                }
            },
            "author_id": 109918,
            "display_for_all_advertisers": false,
            "styles": null,
            "image": null,
            "starts_at": "2024-10-20T14:38:43.135661Z",
            "ends_at": "2024-12-20T15:38:43.135739Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}

Create Return Ad

POST
https://api.metapic.dev
/v2/return-ads
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/return-ads" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"hpxkgcurqggaxbpodpgk\",
    \"advertiser_group_id\": 18,
    \"return_link\": \"https:\\/\\/advertiser.com\",
    \"display_for_all_advertisers\": false,
    \"advertiser_ids\": [
        18
    ],
    \"advertiser_category_ids\": [
        15
    ],
    \"styles\": {
        \"color\": \"#ffffff\"
    },
    \"image_key\": \"dG1wL2ltYWdlLmpwZw==\",
    \"starts_at\": \"2024-11-20T16:38:43\",
    \"ends_at\": \"2099-12-10\"
}"
Example response:
{
    "id": null,
    "name": "Velda Gleichner",
    "advertiser_group_id": 2168,
    "affiliate_link": {
        "url": "https://www.bogan.com/aspernatur-voluptates-dolores-explicabo",
        "advertiser_name": "Bechtelar, Murazik and Turner",
        "advertiser_logo": {
            "url": "https://media.metapic.com/insecure/rs:fill:500:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAyMjk5P3RleHQ9aGFydW0=",
            "key": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAyMjk5P3RleHQ9aGFydW0=",
            "base64": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAyMjk5P3RleHQ9aGFydW0=",
            "base_url": "https://media.metapic.com"
        }
    },
    "author_id": 109920,
    "display_for_all_advertisers": false,
    "styles": null,
    "image": null,
    "starts_at": "2024-10-20T14:38:43.160699Z",
    "ends_at": "2024-12-20T15:38:43.160754Z"
}

Display Return Ad

GET
https://api.metapic.dev
/v2/return-ads/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the return ad.

Example:
16

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/return-ads/16" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "name": "Newell McDermott II",
    "advertiser_group_id": 2171,
    "affiliate_link": {
        "url": "http://www.feil.com/sed-odit-aut-tenetur-voluptas-exercitationem",
        "advertiser_name": "Reinger PLC",
        "advertiser_logo": {
            "url": "https://media.metapic.com/insecure/rs:fill:500:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA1NWFhP3RleHQ9ZGlzdGluY3Rpbw==",
            "key": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA1NWFhP3RleHQ9ZGlzdGluY3Rpbw==",
            "base64": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA1NWFhP3RleHQ9ZGlzdGluY3Rpbw==",
            "base_url": "https://media.metapic.com"
        }
    },
    "author_id": 109922,
    "display_for_all_advertisers": false,
    "styles": null,
    "image": null,
    "starts_at": "2024-10-20T14:38:43.189701Z",
    "ends_at": "2024-12-20T15:38:43.189753Z"
}

Update Return Ad

PUT
PATCH
https://api.metapic.dev
/v2/return-ads/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the return ad.

Example:
3

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/return-ads/3" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"rseizxlrutibghpvz\",
    \"advertiser_group_id\": 16,
    \"return_link\": \"https:\\/\\/advertiser.com\",
    \"display_for_all_advertisers\": true,
    \"advertiser_ids\": [
        10
    ],
    \"advertiser_category_ids\": [
        5
    ],
    \"styles\": {
        \"color\": \"#ffffff\"
    },
    \"image_key\": \"dG1wL2ltYWdlLmpwZw==\",
    \"starts_at\": \"2024-11-20T16:38:43\",
    \"ends_at\": \"2057-05-21\"
}"
Example response:
{
    "id": null,
    "name": "Katherine Harber",
    "advertiser_group_id": 2174,
    "affiliate_link": {
        "url": "http://leuschke.biz/rerum-id-sint-ipsam-consequatur.html",
        "advertiser_name": "Okuneva-Mann",
        "advertiser_logo": {
            "url": "https://media.metapic.com/insecure/rs:fill:500:500/g:sm/q:90/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA4OGRkP3RleHQ9c3VudA==",
            "key": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA4OGRkP3RleHQ9c3VudA==",
            "base64": "dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA4OGRkP3RleHQ9c3VudA==",
            "base_url": "https://media.metapic.com"
        }
    },
    "author_id": 109924,
    "display_for_all_advertisers": false,
    "styles": null,
    "image": null,
    "starts_at": "2024-10-20T14:38:43.243367Z",
    "ends_at": "2024-12-20T15:38:43.243420Z"
}

Delete Return Ad

DELETE
https://api.metapic.dev
/v2/return-ads/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the return ad.

Example:
8
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/return-ads/8" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
POST
https://api.metapic.dev
/v2/affiliate-link-preview
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/affiliate-link-preview" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"link\": \"r\",
    \"advertiser_group_id\": 6
}"

Shared Budget

List Shared Budgets

GET
https://api.metapic.dev
/v2/stores/{store_id}/shared-budgets
requires authentication

List Shared Budgets for Store

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

store_id
integer
required

The ID of the store.

Example:
3

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/stores/3/shared-budgets" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "id": null,
        "title": "Dr. Enid Kihn III",
        "amount": 3,
        "consumed_budget": 0,
        "currency": "GBP",
        "campaigns_count": 0
    },
    {
        "id": null,
        "title": "Ruthe Barrows",
        "amount": 9,
        "consumed_budget": 0,
        "currency": "PLN",
        "campaigns_count": 0
    }
]

Display Budget

GET
https://api.metapic.dev
/v2/stores/{store_id}/shared-budgets/{id}
requires authentication

Returns information about a specific budget.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

store_id
integer
required

The ID of the store.

Example:
10
id
integer
required

The ID of the shared budget.

Example:
7

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/stores/10/shared-budgets/7" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "title": "Justen Larkin",
    "amount": 9,
    "consumed_budget": 0,
    "currency": "GBP",
    "campaigns_count": 0
}

Update Shared Budget

PUT
PATCH
https://api.metapic.dev
/v2/stores/{store_id}/shared-budgets/{id}
requires authentication

Updates existing budget.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

store_id
integer
required

The ID of the store.

Example:
10
id
integer
required

The ID of the shared budget.

Example:
19

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/stores/10/shared-budgets/19" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Summer budget\",
    \"amount\": 10000
}"
Example response:
{
    "id": null,
    "title": "Dr. Kennedi Rohan DDS",
    "amount": 4,
    "consumed_budget": 0,
    "currency": "EUR",
    "campaigns_count": 0
}

Delete Shared Budget

DELETE
https://api.metapic.dev
/v2/stores/{store_id}/shared-budgets/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

store_id
integer
required

The ID of the store.

Example:
2
id
integer
required

The ID of the shared budget.

Example:
14
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/stores/2/shared-budgets/14" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Store

List stores

GET
https://api.metapic.dev
/v2/stores
requires authentication

Endpoint for querying & sorting all stores.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

query
string

Query by either of the following: ID, store name. Returns all stores with id equal to query OR name contains query. Must not be greater than 255 characters.

Example:
nike
store_group_id
integer

Query by store's store group. Returns all stores which belong to the given store_group_id.

Example:
15
size
integer

Page size. Defaults to 20. Must not be greater than 100.

Example:
20
sort_by
string

Must follow the correct format: column_name:direction, where column_name must be a valid property for given resource and direction can be one of asc|desc, both of which are required if sort_by is present.

Example:
created_at:desc
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/stores?query=nike&store_group_id=15&size=20&sort_by=created_at%3Adesc" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "name": "Heller-Reynolds",
            "key": "Heller-Reynolds",
            "currency": "EUR",
            "deeplinkable": true,
            "product_feed": false,
            "categories": [],
            "logo_url": "https://via.placeholder.com/640x480.png/00ccdd?text=adipisci",
            "logo": {
                "url": "https://via.placeholder.com/640x480.png/00ccdd?text=adipisci"
            }
        },
        {
            "id": null,
            "name": "Hilpert, Hermann and Bode",
            "key": "Hilpert, Hermann and Bode",
            "currency": "PLN",
            "deeplinkable": false,
            "product_feed": false,
            "categories": [],
            "logo_url": "https://via.placeholder.com/640x480.png/00eebb?text=molestiae",
            "logo": {
                "url": "https://via.placeholder.com/640x480.png/00eebb?text=molestiae"
            }
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}

Create new self-service store

POST
https://api.metapic.dev
/v2/stores
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/stores" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Store\",
    \"domains\": [
        [
            \"dev.test-test.com\"
        ]
    ],
    \"categories\": [
        2
    ],
    \"logo_url\": \"http:\\/\\/www.parker.com\\/at-esse-pariatur-ut-aut\",
    \"country\": \" Example: SE\",
    \"currency\": \"Example: EUR\",
    \"language\": \"sv\",
    \"billing\": {
        \"company_name\": \"ipsam\",
        \"street\": \"sint\",
        \"postal_code\": \"deserunt\",
        \"city\": \"eius\",
        \"vat_number\": \"nesciunt\"
    }
}"
Example response:
{
    "id": null,
    "name": "Zboncak-Marquardt",
    "key": "Zboncak-Marquardt",
    "currency": "SEK",
    "deeplinkable": false,
    "product_feed": false,
    "categories": [],
    "logo_url": "https://via.placeholder.com/640x480.png/0033cc?text=beatae",
    "logo": {
        "url": "https://via.placeholder.com/640x480.png/0033cc?text=beatae"
    }
}

PUT v2/stores/{store_id}/payment

PUT
https://api.metapic.dev
/v2/stores/{store_id}/payment
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

store_id
integer
required

The ID of the store.

Example:
11
Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/stores/11/payment" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Tag

GET v2/tags/{id}

GET
https://api.metapic.dev
/v2/tags/{id}
requires authentication

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
integer
required

The ID of the tag.

Example:
6
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/tags/6" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    x-ratelimit-limit
                                                            : 300
                                                                                                                    x-ratelimit-remaining
                                                            : 300
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "status": 403,
    "error": "Forbidden"
}

Uploads

Upload image

POST
https://api.metapic.dev
/v2/image-uploads
requires authentication

Uploads an image to tmp folder.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "https://api.metapic.dev/v2/image-uploads" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"image\": \"ab\"
}"

User

List users

GET
https://api.metapic.dev
/v2/users
requires authentication

Endpoint for querying & sorting all users.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

query
string

Query by either of the following: ID, username, email. Returns all users with id equal to query OR username contains query OR email contains query. Must not be greater than 64 characters.

Example:
testcreator123
client_id
integer

Query by user's client. Returns all users which belong to the given client_id.

Example:
2
store_group_id
integer

Query by user's store group. Returns all users which belong to the given store_group_id.

Example:
15
size
integer

Page size. Defaults to 20. Must not be greater than 100.

Example:
20
sort_by
string

Must follow the correct format: column_name:direction, where column_name must be a valid property for given resource and direction can be one of asc|desc, both of which are required if sort_by is present.

Example:
created_at:desc
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users?query=testcreator123&client_id=2&store_group_id=15&size=20&sort_by=created_at%3Adesc" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "username": "mhegmann",
            "email": "[email protected]",
            "client_id": 1765
        },
        {
            "id": null,
            "username": "aharvey",
            "email": "[email protected]",
            "client_id": 1766
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}

User Tag

List user tags

GET
https://api.metapic.dev
/v2/user-tags
requires authentication

Endpoint for querying & sorting all user tags.

Headers

Authorization
Example:
{accessToken}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

name
string

Query by user tag's name. Returns all user tags whose name contains the given name. Must not be greater than 255 characters.

Example:
favourites
store_id
integer

Query by user tag's store. Returns all user tags which belong to the given store_id.

Example:
15
access_levels
object

Query by user tag's access levels. Returns all user tags which have the given access_levels:

  • ACCESS_LEVEL_ADMIN = 0
  • ACCESS_LEVEL_ALL = 1
  • ACCESS_LEVEL_STORE = 2
.
Must be one of:
  • 0
  • 1
  • 2
Example:
[0,1]
size
integer

Page size. Defaults to 20. Must not be greater than 100.

Example:
20
sort_by
string

Must follow the correct format: column_name:direction, where column_name must be a valid property for given resource and direction can be one of asc|desc, both of which are required if sort_by is present.

Example:
created_at:desc
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/user-tags?name=favourites&store_id=15&access_levels[]=0&access_levels[]=1&size=20&sort_by=created_at%3Adesc" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "name": "Brandon Jakubowski",
            "slug": "id-in-in",
            "access_level": 1,
            "store_id": 1146
        },
        {
            "id": null,
            "name": "Jailyn Nicolas",
            "slug": "quod-adipisci-quo",
            "access_level": 1,
            "store_id": 1147
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 20,
        "to": 2,
        "total": 2
    }
}