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": "Wilfred Hilpert"
        },
        {
            "id": null,
            "name": "Lera Goldner"
        }
    ],
    "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:
voluptas
status
string

Filter user media by show store value.

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

Filters media by type.

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

Filter user media by favorite value.

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

:shrug:.

Example:
20
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=voluptas&status=1&type=youtube&favorite=all&group=20&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 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:
20
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users/20/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:
1
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users/1/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\": \"creator\",
    \"store_id\": 2
}"
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\": 4,
    \"type\": \"suggestion\",
    \"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\": false,
    \"one_time_payment\": 736141.5,
    \"max_money\": 19.7692131,
    \"budget_limit\": 15,
    \"max_clicks\": 5,
    \"valid_from\": \"2024-10-17T15:22:44\",
    \"valid_until\": \"2025-01-16\",
    \"todo\": [
        \"yfghorkzssinffxdpmnobmdwv\"
    ],
    \"store_visibility\": \"1\",
    \"show_for_advertiser\": false,
    \"priority_after\": 20,
    \"shared_budget_id\": 1,
    \"shared_budget\": {
        \"title\": \"Summer budget\",
        \"amount\": 10000
    },
    \"targets\": {
        \"user_ids\": [
            15
        ],
        \"user_tag_ids\": [
            14
        ],
        \"store_group_ids\": [
            13
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"fv\"
        ],
        \"client_ids\": [
            18
        ],
        \"revenue_tier_ids\": [
            17
        ]
    },
    \"traffic_sources_costs\": [
        {
            \"source\": 1,
            \"cpc\": 230,
            \"cpa\": 0.2,
            \"invoice_cpc\": 250,
            \"invoice_cpa\": 0.25
        }
    ]
}"
Example response:
{
    "data": {
        "id": null,
        "campaign_title": "Vallie Hackett Jr.",
        "campaign_text": "Molestiae fuga velit nihil harum saepe qui sit. Ipsa eos qui adipisci ut. Libero at quis cupiditate optio. Beatae sed rerum voluptas.",
        "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBlZTMzP3RleHQ9cXVvcw==",
        "image": null,
        "store_id": 1255,
        "token": "aje21bpewf7wtqax",
        "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": "Dr. Reina Armstrong",
    "campaign_text": "Qui molestiae vero veniam qui earum. Illo minima qui pariatur quod. Illum neque eos pariatur debitis et consequuntur ut odit. Quia a in tempore dolore cumque amet dolorem sint.",
    "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA5OTU1P3RleHQ9cXVpc3F1YW0=",
    "image": null,
    "store_id": 1257,
    "token": "gg43koj67x12ndx1",
    "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:
6
offer_id
integer
required

The offer ID

Example:
15556

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/offers/6" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_group_id\": 8,
    \"type\": \"store_accept\",
    \"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\": 55656.821,
    \"max_money\": 73.1,
    \"budget_limit\": 16,
    \"max_clicks\": 19,
    \"valid_from\": \"2024-10-17T15:22:44\",
    \"valid_until\": \"1983-01-08\",
    \"todo\": [
        \"hvoeeonwutzyrrnwwhe\"
    ],
    \"store_visibility\": \"2\",
    \"show_for_advertiser\": false,
    \"priority_after\": 16,
    \"traffic_sources_costs\": [
        {
            \"source\": 1,
            \"cpc\": 230,
            \"cpa\": 0.2,
            \"invoice_cpc\": 250,
            \"invoice_cpa\": 0.25
        }
    ],
    \"targets\": {
        \"0\": [],
        \"user_ids\": [
            7
        ],
        \"user_tag_ids\": [
            11
        ],
        \"store_group_ids\": [
            9
        ],
        \"emails\": [
            \"[email protected]\"
        ],
        \"social_media_identifiers\": [
            \"xpgfjwxrzfmpptanjlsm\"
        ],
        \"client_ids\": [
            5
        ],
        \"revenue_tier_ids\": [
            13
        ]
    },
    \"shared_budget_id\": 1,
    \"shared_budget\": {
        \"title\": \"Summer budget\",
        \"amount\": 10000
    }
}"
Example response:
{
    "data": {
        "id": null,
        "campaign_title": "Prof. Kim McKenzie MD",
        "campaign_text": "Dignissimos incidunt inventore sed tempore. Qui odit delectus unde aut vitae. Ratione et quia voluptatem eaque adipisci voluptatem. Optio ipsum ut dolores.",
        "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAyMmJiP3RleHQ9bmVjZXNzaXRhdGlidXM=",
        "image": null,
        "store_id": 1258,
        "token": "obnyvh23q7o6zxy4",
        "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:
2
offer_id
integer
required

The offer ID

Example:
15556
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/offers/2" \
    --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:
["paused"]
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:
14
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:
["targets"]
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[]=paused&store_ids[]=1&store_group_ids[]=1&created_by=14&or_id=1234&target_user_id=20&size=20&sort_by=created_at%3Adesc&custom_sort_by=ends_soon&include[]=targets&format=csv" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": null,
            "campaign_title": "Eldora Tremblay I",
            "campaign_text": "Et aut rerum non. Omnis odit consequatur accusantium animi. Qui laboriosam incidunt dolores facere aspernatur ducimus fugit. Sed quia quos tempora placeat eligendi. Quis eos quos atque.",
            "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBmZjY2P3RleHQ9YWxpcXVhbQ==",
            "image": null,
            "store_id": 1259,
            "token": "dke9batu0m5x5spf",
            "type": "standard"
        },
        {
            "id": null,
            "campaign_title": "Dr. Rashad Wolf",
            "campaign_text": "Et nisi laborum ut ut natus qui aut impedit. Eos earum odio debitis doloremque repudiandae qui. Ipsam sint expedita et dolorem itaque amet.",
            "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDA3Nzk5P3RleHQ9c3VzY2lwaXQ=",
            "image": null,
            "store_id": 1260,
            "token": "v0rgf2oesfvgskvr",
            "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\": \"quasi\"
}"
Example response:
{
    "id": null,
    "campaign_title": "Mr. Louisa Blanda PhD",
    "campaign_text": "Eum quo tempore maiores nobis corporis quia odio. Molestiae et aspernatur amet occaecati a. Quia esse aspernatur enim et eos 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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBiYmVlP3RleHQ9ZXVt",
    "image": null,
    "store_id": 1261,
    "token": "h727yrg4e97yu8e7",
    "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": "Dawson Bergnaum",
    "campaign_text": "Enim vitae est et id animi vel nihil. Totam consequatur nulla voluptate.",
    "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBlZTc3P3RleHQ9dm9sdXB0YXM=",
    "image": null,
    "store_id": 1262,
    "token": "qhc6rx403c3d83wo",
    "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": "Aida O'Hara",
    "campaign_text": "Facilis enim eaque quia molestias sint temporibus pariatur et. Corporis aliquam omnis ullam nisi. Est dignissimos est doloremque accusantium.",
    "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDBjYzU1P3RleHQ9b2RpdA==",
    "image": null,
    "store_id": 1263,
    "token": "crj6880j8oi6yrep",
    "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\": \"2013-02-13\",
    \"end_date\": \"2052-02-18\"
}"
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:
3

Body Parameters

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/users/3/offers" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"accepted\",
    \"name\": \"scdklhrfgbhnna\"
}"
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:
qui
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/qui" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "campaign_title": "Prof. Marty Satterfield",
    "campaign_text": "Animi reprehenderit ipsa est aliquid voluptate voluptatum. Nobis autem numquam et consequatur velit voluptates magnam molestiae. Earum deserunt rerum esse.",
    "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/dXBsb2Fkcy9odHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vNjQweDQ4MC5wbmcvMDAyMjc3P3RleHQ9dGVtcG9yYQ==",
    "image": null,
    "store_id": 1278,
    "token": "dwi0tbjl3ohhdzpv",
    "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\": [
        2
    ],
    \"store_group_ids\": [
        19
    ],
    \"emails\": [
        \"[email protected]\"
    ],
    \"social_media_identifiers\": [
        \"fqjlm\"
    ],
    \"client_ids\": [
        4
    ],
    \"revenue_tier_ids\": [
        6
    ]
}"

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:
9
id
integer
required

The ID of the user.

Example:
11
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/9/users/11" \
    --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:
6

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/6/participants" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"query\": \"qb\",
    \"status\": \"suggestion\",
    \"participants_v2\": false
}"
Example response:
{
    "data": [
        {
            "id": null,
            "offer_id": 541,
            "user_id": null,
            "display_name": "[email protected]",
            "clicks": 142138,
            "status": "denied",
            "pre_registered_email": "[email protected]",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 50
        },
        {
            "id": null,
            "offer_id": 542,
            "user_id": null,
            "display_name": "[email protected]",
            "clicks": 61903565,
            "status": "second_prio",
            "pre_registered_email": "[email protected]",
            "todo": null,
            "payment_amount": null,
            "offer_comments_count": 798197193
        }
    ],
    "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:
16

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/9/participants/16" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "offer_id": 543,
    "user_id": 109810,
    "display_name": "[email protected]",
    "clicks": 5,
    "status": "suggestion",
    "pre_registered_email": "[email protected]",
    "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:
9

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/9/participants-stats" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"query\": \"skgmkmvpuyiiwcbwlgyejhntu\",
    \"active\": false,
    \"start_date\": \"2000-02-25\",
    \"end_date\": \"2059-09-05\",
    \"sort_by\": \"estimated_earning_to_cost_ratio:desc\"
}"
Example response:
{
    "data": [
        {
            "id": null,
            "user_id": 109811,
            "display_name": "hailee34",
            "clicks": 7,
            "status": "have_posted",
            "username": "hailee34",
            "links_created": null,
            "estimated_gp": null,
            "estimated_earning_to_cost_ratio": null
        },
        {
            "id": null,
            "user_id": null,
            "display_name": "[email protected]",
            "clicks": 3474,
            "status": "second_prio",
            "username": null,
            "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:
18

Body Parameters

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offers/18/participants-count-by-click-activity" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2023-01-26\",
    \"end_date\": \"2101-05-11\"
}"
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:
1
participant_id
integer
required

The ID of the participant.

Example:
14

Body Parameters

Response Fields

Example request:
curl --request PATCH \
    "https://api.metapic.dev/v2/offers/1/participants/14/update-status" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"done\"
}"
Example response:
{
    "id": null,
    "offer_id": 546,
    "user_id": null,
    "display_name": "owatsica",
    "clicks": 865380166,
    "status": "open",
    "pre_registered_identifier": "owatsica",
    "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:
nostrum
userId
integer
required
Example:
13
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offer-by-token/nostrum/users/13" \
    --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=eyJpdiI6ImRtazNpK3lXZkRtbUNzcThJcEIrT3c9PSIsInZhbHVlIjoiaEthdkgyME5sT2xjbzI2Nk5PVnVkOElKeDREWE5CV2k1MlJyUElrcE5TYXZYajJEc2xwOEdQUXJYYWZrbndtVVpTNnhaM1V6ZWl2YVZXYjJnb201V2lqN1lkaFpobjVweXNKQksvZW9Ec2lBc1UxUkpFQi9NNllNSnZRWjJRN3AiLCJtYWMiOiI4OGRjMTMwY2YzYmI0ZmVhNGY4MWYzNWE4YjBjNzBiZWFlZDc3NmI5YTI1ODQzZTkzYmJhMGIwMGU2M2Y1MzZkIiwidGFnIjoiIn0%3D; expires=Thu, 17 Oct 2024 15:22:45 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:
magnam
user_id
integer
required

The ID of the user.

Example:
16
Example request:
curl --request POST \
    "https://api.metapic.dev/v2/offer-by-token/magnam/users/16/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\": \"mmonmbiebwsvyinoojjula\"
}"

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\": \"oelxkrheehimkjlblale\"
}"

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:
11
offerCommentId
string
required

The ID of the comment.

Example:
1
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/offer-users/1/comments/11" \
    --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_id}/activities
requires authentication

Headers

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

URL Parameters

offerUser_id
integer
required

The ID of the offerUser.

Example:
4

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/offer-users/4/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."
}

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

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/stores/17/shared-budgets" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "id": null,
        "title": "Wilson Roberts",
        "amount": 2,
        "consumed_budget": 0,
        "currency": "PLN",
        "campaigns_count": 0
    },
    {
        "id": null,
        "title": "Joanie Stiedemann",
        "amount": 2,
        "consumed_budget": 0,
        "currency": "GBP",
        "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:
19
id
integer
required

The ID of the shared budget.

Example:
8

Response Fields

Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/stores/19/shared-budgets/8" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": null,
    "title": "Leta McClure",
    "amount": 7,
    "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:
1
id
integer
required

The ID of the shared budget.

Example:
2

Body Parameters

Response Fields

Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/stores/1/shared-budgets/2" \
    --header "Authorization: {accessToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Summer budget\",
    \"amount\": 10000
}"
Example response:
{
    "id": null,
    "title": "Eden Ledner",
    "amount": 9,
    "consumed_budget": 0,
    "currency": "GBP",
    "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:
1
id
integer
required

The ID of the shared budget.

Example:
20
Example request:
curl --request DELETE \
    "https://api.metapic.dev/v2/stores/1/shared-budgets/20" \
    --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": "Murray and Sons",
            "key": "Murray and Sons",
            "currency": "USD",
            "deeplinkable": false,
            "product_feed": null,
            "categories": [],
            "logo_url": "https://via.placeholder.com/640x480.png/001177?text=sit",
            "logo": {
                "url": "https://via.placeholder.com/640x480.png/001177?text=sit"
            }
        },
        {
            "id": null,
            "name": "Christiansen LLC",
            "key": "Christiansen LLC",
            "currency": "PLN",
            "deeplinkable": true,
            "product_feed": null,
            "categories": [],
            "logo_url": "https://via.placeholder.com/640x480.png/0044ee?text=quia",
            "logo": {
                "url": "https://via.placeholder.com/640x480.png/0044ee?text=quia"
            }
        }
    ],
    "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\": [
        8
    ],
    \"logo_url\": \"http:\\/\\/www.nader.com\\/reprehenderit-dolor-vel-laboriosam-nihil-similique-illo-et\",
    \"country\": \" Example: SE\",
    \"currency\": \"Example: EUR\",
    \"language\": \"sv\",
    \"billing\": {
        \"company_name\": \"ut\",
        \"street\": \"assumenda\",
        \"postal_code\": \"voluptatem\",
        \"city\": \"sapiente\",
        \"vat_number\": \"ea\"
    }
}"
Example response:
{
    "id": null,
    "name": "Steuber Inc",
    "key": "Steuber Inc",
    "currency": "SEK",
    "deeplinkable": true,
    "product_feed": null,
    "categories": [],
    "logo_url": "https://via.placeholder.com/640x480.png/0033cc?text=enim",
    "logo": {
        "url": "https://via.placeholder.com/640x480.png/0033cc?text=enim"
    }
}

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:
6
Example request:
curl --request PUT \
    "https://api.metapic.dev/v2/stores/6/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
string
required

The ID of the tag.

Example:
optio
Example request:
curl --request GET \
    --get "https://api.metapic.dev/v2/tags/optio" \
    --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"
}

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": "ortiz.aidan",
            "email": "[email protected]",
            "client_id": 3033
        },
        {
            "id": null,
            "username": "ybins",
            "email": "[email protected]",
            "client_id": 3035
        }
    ],
    "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": "Charlotte Walker V",
            "slug": "doloribus-neque",
            "access_level": 1,
            "store_id": 1275
        },
        {
            "id": null,
            "name": "Prof. Mckayla Dare Sr.",
            "slug": "dolores-neque-vel",
            "access_level": 1,
            "store_id": 1276
        }
    ],
    "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
    }
}