API Reference for Developers

Getting Started

An API key is required for requests to be processed by the system. Once a user registers, an API key is automatically generated for this user. The API key must be sent with each request (see full example below). If the API key is not sent or is expired, there will be an error. Please make sure to keep your API key secret to prevent abuse.

Authentication

To authenticate with the API system, you need to send your API key as an authorization token with each request. You can see sample code below.

curl --location --request POST 'https://vo.la/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/account",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
));

$response = curl_exec($curl);
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/account',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: ''
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Rate Limit

Our API has a rate limiter to safeguard against spike in requests to maximize its stability. Our rate limiter is currently caped at 30 requests per 1 minute.

Several headers will be sent alongside the response and these can be examined to determine various information about the request.

X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: TIMESTAMP
Response Handling

All API response are returned in JSON format by default. To convert this into usable data, the appropriate function will need to be used according to the language. In PHP, the function json_decode() can be used to convert the data to either an object (default) or an array (set the second parameter to true). It is very important to check the error key as that provides information on whether there was an error or not. You can also check the header code.

{
    "error": 1,
    "message": "An error occurred"
}

Branded Domains

도메인 연결 목록
GET https://vo.la/api/domains?limit=2&page=1

API를 통해 브랜드 도메인을 얻으려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택사항) 페이지별 데이터 결과
page (선택사항) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/domains?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/domains?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "domains": [
            {
                "id": 1,
                "domain": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "domain": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}
브랜드 도메인 생성
POST https://vo.la/api/domain/add

이 엔드포인트를 사용하여 도메인을 추가할 수 있습니다. 도메인이 당사 서버를 올바르게 가리키는지 확인하십시오.

ParameterDescription
domain (필수) http 또는 https를 포함한 브랜드 도메인
redirectroot (선택) 회원님의 도메인을 방문하면 루트 리디렉션
redirect404 (선택) 커스텀 404 리디렉션
curl --location --request POST 'https://vo.la/api/domain/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/domain/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'domain' => 'https://domain1.com',
      'redirectroot' => 'https://rootdomain.com',
      'redirect404' => 'https://rootdomain.com/404',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/domain/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "id": 1
}
도메인 업데이트
PUT https://vo.la/api/domain/:id/update

브랜드 도메인을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

ParameterDescription
redirectroot (선택) 회원님의 도메인을 방문하면 루트 리디렉션
redirect404 (선택) 맞춤 404 리디렉션
curl --location --request PUT 'https://vo.la/api/domain/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/domain/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'redirectroot' => 'https://rootdomain-new.com',
      'redirect404' => 'https://rootdomain-new.com/404',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'PUT',
    'url': 'https://vo.la/api/domain/:id/update',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
도메인 삭제
DELETE https://vo.la/api/domain/:id/delete

도메인을 삭제하려면 DELETE 요청을 보내야 합니다.

curl --location --request DELETE 'https://vo.la/api/domain/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/domain/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'DELETE',
    'url': 'https://vo.la/api/domain/:id/delete',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

CTA 팝업배너

CTA 팝업배너 목록
GET https://vo.la/api/overlay?limit=2&page=1

API를 통해 CTA 팝업배너를 얻으려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/overlay?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/overlay?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "cta": [
            {
                "id": 1,
                "type": "message",
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "contact",
                "name": "Contact Page",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Campaigns

캠페인 목록
GET https://vo.la/api/campaigns?limit=2&page=1

API를 통해 캠페인을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/campaigns?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/campaigns?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "campaigns": [
            {
                "id": 1,
                "name": "Sample Campaign",
                "public": false,
                "rotator": false,
                "list": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Facebook Campaign",
                "public": true,
                "rotator": "https:\/\/domain.com\/r\/test",
                "list": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}
캠페인 생성
POST https://vo.la/api/campaign/add

이 엔드포인트를 사용하여 캠페인을 추가할 수 있습니다.

ParameterDescription
name (선택) 캠페인 명
slug (선택) 로테이터 Slug
public (선택) 액세스
curl --location --request POST 'https://vo.la/api/campaign/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/campaign/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'name' => 'New Campaign',
      'slug' => 'new-campaign',
      'public' => true,
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/campaign/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "id": 3,
    "domain": "New Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
캠페인에 링크 할당
POST https://vo.la/api/campaign/:campaignid/assign/:linkid

이 엔드포인트를 사용하여 짧은 링크를 캠페인에 할당할 수 있습니다. 엔드포인트에는 캠페인 ID와 짧은 링크 ID가 필요합니다.

curl --location --request POST 'https://vo.la/api/campaign/:campaignid/assign/:linkid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/campaign/:campaignid/assign/:linkid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/campaign/:campaignid/assign/:linkid',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Link successfully added to the campaign."
}
캠페인 업데이트
PUT https://vo.la/api/campaign/:id/update

캠페인을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

ParameterDescription
name 필수) 캠페인 명
slug (선택) 로테이터 Slug
public (선택) 액세스
curl --location --request PUT 'https://vo.la/api/campaign/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/campaign/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'name' => 'Twitter Campaign',
      'slug' => 'twitter-campaign',
      'public' => true,
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'PUT',
    'url': 'https://vo.la/api/campaign/:id/update',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "id": 3,
    "domain": "Twitter Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/twitter-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}
캠페인 삭제
DELETE https://vo.la/api/campaign/:id/delete

캠페인을 삭제하려면 DELETE 요청을 보내야 합니다.

curl --location --request DELETE 'https://vo.la/api/campaign/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/campaign/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'DELETE',
    'url': 'https://vo.la/api/campaign/:id/delete',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

Channels

채널 목록
GET https://vo.la/api/channels?limit=2&page=1

API를 통해 채널을 얻으려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/channels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/channels?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "channels": [
            {
                "id": 1,
                "name": "Channel 1",
                "description": "Description of channel 1",
                "color": "#000000",
                "starred": true
            },
            {
                "id": 2,
                "name": "Channel 2",
                "description": "Description of channel 2",
                "color": "#FF0000",
                "starred": false
            }
        ]
    }
}
채널 항목 목록
GET https://vo.la/api/channel/:id?limit=1&page=1

API를 통해 특정 채널의 항목을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/channel/:id?limit=1&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/channel/:id?limit=1&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "items": [
            {
                "type": "links",
                "id": 1,
                "title": "My Sample Link",
                "preview": "https:\/\/google.com",
                "link": "https:\/\/vo.la\/google",
                "date": "2022-05-12"
            },
            {
                "type": "bio",
                "id": 1,
                "title": "My Sample Bio",
                "preview": "https:\/\/vo.la\/mybio",
                "link": "https:\/\/vo.la\/mybio",
                "date": "2022-06-01"
            }
        ]
    }
}
채널 생성
POST https://vo.la/api/channel/add

이 엔드포인트를 사용하여 채널을 추가할 수 있습니다.

ParameterDescription
name (필수) 채널 명
description (선택) 채널 설명
color (선택) 채널 배지 색상(HEX)
starred (선택) 채널에 별표를 표시할지 여부(true 또는 false)
curl --location --request POST 'https://vo.la/api/channel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/channel/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'name' => 'New Channel',
      'description' => 'my new channel',
      'color' => '#000000',
      'starred' => true,
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/channel/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}
채널에 항목 할당
POST https://vo.la/api/channel/:channelid/assign/:type/:itemid

채널 ID, 항목 유형(링크, 바이오 또는 qr) 및 항목 ID가 포함된 요청을 보내면 항목을 모든 채널에 할당할 수 있습니다.

ParameterDescription
:channelid (필수) 채널 ID
:type (필수) 링크나 약력, QR
:itemid (필수) 아이템 ID
curl --location --request POST 'https://vo.la/api/channel/:channelid/assign/:type/:itemid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/channel/:channelid/assign/:type/:itemid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/channel/:channelid/assign/:type/:itemid',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Item successfully added to the channel."
}
채널 업데이트
PUT https://vo.la/api/channel/:id/update

채널을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

ParameterDescription
name (선택) 채널 명
description (선택) 채널 설명
color (선택) 채널 배지 색상(HEX)
starred (선택) 채널에 별표를 표시할지 여부(true 또는 false)
curl --location --request PUT 'https://vo.la/api/channel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/channel/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'name' => 'Acme Corp',
      'description' => 'channel for items for Acme Corp',
      'color' => '#FFFFFF',
      'starred' => false,
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'PUT',
    'url': 'https://vo.la/api/channel/:id/update',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Channel has been updated successfully."
}
채널 삭제
DELETE https://vo.la/api/channel/:id/delete

채널을 삭제하려면 DELETE 요청을 보내야 합니다. 모든 항목도 할당 취소됩니다.

curl --location --request DELETE 'https://vo.la/api/channel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/channel/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'DELETE',
    'url': 'https://vo.la/api/channel/:id/delete',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

Custom Splash

사용자 타임배너 목록
GET https://vo.la/api/splash?limit=2&page=1

API를 통해 사용자 정의 타임배너 페이지를 얻으려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/splash?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/splash?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "splash": [
            {
                "id": 1,
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Product 2 Promo",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Links


QR Codes

QR코드 목록
GET https://vo.la/api/qr?limit=2&page=1

API를 통해 QR 코드를 얻으려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/qr?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/qr?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/vo.la\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/vo.la\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}
단일 QR코드 받기
GET https://vo.la/api/qr/:id

API를 통해 단일 QR 코드에 대한 세부 정보를 얻으려면 이 엔드포인트를 사용할 수 있습니다.

curl --location --request GET 'https://vo.la/api/qr/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/qr/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/qr/:id',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/vo.la\/qr\/b9edfe",
        "scans": 5,
        "name": "Google Canada",
        "date": "2020-11-10 18:00:25"
    },
    "data": {
        "clicks": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Unknown": "1"
        },
        "topReferrers": {
            "Direct, email and other": "1"
        },
        "topBrowsers": {
            "Chrome": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "socialCount": {
            "facebook": 0,
            "twitter": 0,
            "instagram": 0
        }
    }
}
QR코드 생성
POST https://vo.la/api/qr/add

QR 코드를 생성하려면 POST 요청을 통해 JSON 형식의 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

ParameterDescription
type (필수) text | vcard | link | email | phone | sms | wifi
data (필수) QR코드 내부에 삽입할 데이터입니다. 데이터는 유형에 따라 문자열 또는 배열이 될 수 있습니다.
background (선택) RGB 색상 예: RGB(255,255,255)
foreground (선택) RGB 색상 예: RGB(0,0,0)
logo (선택) png 또는 jpg 로고 경로
curl --location --request POST 'https://vo.la/api/qr/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/qr/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'type' => 'link',
      'data' => 'https://google.com',
      'background' => 'rgb(255,255,255)',
      'foreground' => 'rgb(0,0,0)',
      'logo' => 'https://site.com/logo.png',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/qr/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/vo.la\/qr\/a58f79"
}
QR코드 업데이트
PUT https://vo.la/api/qr/:id/update

QR 코드를 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

ParameterDescription
data (필수) QR코드 내부에 삽입할 데이터입니다. 데이터는 유형에 따라 문자열 또는 배열이 될 수 있습니다.
background (선택 사항) RGB 색상 예: RGB(255,255,255)
foreground (선택 사항) RGB 색상 예: RGB(0,0,0)
logo (선택) png 또는 jpg 로고 경로
curl --location --request PUT 'https://vo.la/api/qr/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/qr/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'type' => 'link',
      'data' => 'https://google.com',
      'background' => 'rgb(255,255,255)',
      'foreground' => 'rgb(0,0,0)',
      'logo' => 'https://site.com/logo.png',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'PUT',
    'url': 'https://vo.la/api/qr/:id/update',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "QR has been updated successfully."
}
QR코드 삭제
DELETE https://vo.la/api/qr/:id/delete

QR 코드를 삭제하려면 DELETE 요청을 보내야 합니다.

curl --location --request DELETE 'https://vo.la/api/qr/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/qr/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'DELETE',
    'url': 'https://vo.la/api/qr/:id/delete',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

계정

계정 보기
GET https://vo.la/api/account

계정에 대한 정보를 얻으려면, 이 엔드포인트에 요청을 보내면 계정에 대한 데이터가 반환됩니다.

curl --location --request GET 'https://vo.la/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/account",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/account',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "data": {
        "id": 1,
        "email": "sample@domain.com",
        "username": "sampleuser",
        "avatar": "https:\/\/domain.com\/content\/avatar.png",
        "status": "pro",
        "expires": "2022-11-15 15:00:00",
        "registered": "2020-11-10 18:01:43"
    }
}
계정 업데이트
PUT https://vo.la/api/account/update

계정 정보를 업데이트하려면 이 엔드포인트에 요청을 보내면 계정의 데이터가 업데이트됩니다.

curl --location --request PUT 'https://vo.la/api/account/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "newemail@google.com",
    "password": "newpassword"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/account/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'email' => 'newemail@google.com',
      'password' => 'newpassword',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'PUT',
    'url': 'https://vo.la/api/account/update',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "email": "newemail@google.com",
    "password": "newpassword"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Account has been successfully updated."
}

픽셀

픽셀 목록
GET https://vo.la/api/pixels?limit=2&page=1

API를 통해 픽셀 코드를 얻으려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

ParameterDescription
limit (선택) 페이지별 데이터 결과
page (선택) 현재 페이지 요청
curl --location --request GET 'https://vo.la/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/pixels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'GET',
    'url': 'https://vo.la/api/pixels?limit=2&page=1',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "pixels": [
            {
                "id": 1,
                "type": "gtmpixel",
                "name": "GTM Pixel",
                "tag": "GA-123456789",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "twitterpixel",
                "name": "Twitter Pixel",
                "tag": "1234567",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}
픽셀 생성
POST https://vo.la/api/pixel/add

이 엔드포인트를 사용하여 픽셀을 만들 수 있습니다. 픽셀 유형과 태그를 보내야 합니다.

ParameterDescription
type (required) gtmpixel | gapixel | fbpixel | adwordspixel | linkedinpixel | twitterpixel | adrollpixel | quorapixel | pinterest | bing | snapchat | reddit | tiktok
name (required) Custom name for your pixel
tag (required) The tag for the pixel
curl --location --request POST 'https://vo.la/api/pixel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/pixel/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'type' => 'gtmpixel',
      'name' => 'My GTM',
      'tag' => 'GTM-ABCDE',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'POST',
    'url': 'https://vo.la/api/pixel/add',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "id": 1
}
픽셀 업데이트
PUT https://vo.la/api/pixel/:id/update

픽셀을 업데이트하려면 PUT 요청을 통해 JSON으로 유효한 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여 주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

ParameterDescription
name (선택) 픽셀의 맞춤 이름
tag (필수) 픽셀의 태그
curl --location --request PUT 'https://vo.la/api/pixel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/pixel/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(array(
      'name' => 'My GTM',
      'tag' => 'GTM-ABCDE',
    )),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'PUT',
    'url': 'https://vo.la/api/pixel/:id/update',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}),
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
픽셀 삭제
DELETE https://vo.la/api/pixel/:id/delete

픽셀을 삭제하려면 DELETE 요청을 보내야 합니다.

curl --location --request DELETE 'https://vo.la/api/pixel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vo.la/api/pixel/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ],
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
    'method': 'DELETE',
    'url': 'https://vo.la/api/pixel/:id/delete',
    'headers': {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    },
    
};
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});
Server response
{
    "error": 0,
    "message": "\ud53d\uc140\uc774 \uc131\uacf5\uc801\uc73c\ub85c \uc0ad\uc81c\ub418\uc5c8\uc2b5\ub2c8\ub2e4."
}