create-api-catalog-selection
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"name": "sale-products",
"description": "할인 상품",
"filters": [
{
"field": "price",
"operator": "less than",
"value": 50000
}
],
"results_limit": 10,
"sort_field": "price",
"sort_order": "asc"
}
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections"
payload = { "selection": {
"name": "sale-products",
"description": "할인 상품",
"filters": [
{
"field": "price",
"operator": "less than",
"value": 50000
}
],
"results_limit": 10,
"sort_field": "price",
"sort_order": "asc"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
selection: {
name: 'sale-products',
description: '할인 상품',
filters: [{field: 'price', operator: 'less than', value: 50000}],
results_limit: 10,
sort_field: 'price',
sort_order: 'asc'
}
})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'selection' => [
'name' => 'sale-products',
'description' => '할인 상품',
'filters' => [
[
'field' => 'price',
'operator' => 'less than',
'value' => 50000
]
],
'results_limit' => 10,
'sort_field' => 'price',
'sort_order' => 'asc'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections"
payload := strings.NewReader("{\n \"selection\": {\n \"name\": \"sale-products\",\n \"description\": \"할인 상품\",\n \"filters\": [\n {\n \"field\": \"price\",\n \"operator\": \"less than\",\n \"value\": 50000\n }\n ],\n \"results_limit\": 10,\n \"sort_field\": \"price\",\n \"sort_order\": \"asc\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"name\": \"sale-products\",\n \"description\": \"할인 상품\",\n \"filters\": [\n {\n \"field\": \"price\",\n \"operator\": \"less than\",\n \"value\": 50000\n }\n ],\n \"results_limit\": 10,\n \"sort_field\": \"price\",\n \"sort_order\": \"asc\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"selection\": {\n \"name\": \"sale-products\",\n \"description\": \"할인 상품\",\n \"filters\": [\n {\n \"field\": \"price\",\n \"operator\": \"less than\",\n \"value\": 50000\n }\n ],\n \"results_limit\": 10,\n \"sort_field\": \"price\",\n \"sort_order\": \"asc\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": null,
"error": null
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}셀렉션
카탈로그 셀렉션 생성
필터·정렬·결과 개수 조건으로 셀렉션을 생성합니다.
POST
/
v1
/
projects
/
{projectId}
/
catalogs
/
{catalogName}
/
selections
create-api-catalog-selection
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selection": {
"name": "sale-products",
"description": "할인 상품",
"filters": [
{
"field": "price",
"operator": "less than",
"value": 50000
}
],
"results_limit": 10,
"sort_field": "price",
"sort_order": "asc"
}
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections"
payload = { "selection": {
"name": "sale-products",
"description": "할인 상품",
"filters": [
{
"field": "price",
"operator": "less than",
"value": 50000
}
],
"results_limit": 10,
"sort_field": "price",
"sort_order": "asc"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
selection: {
name: 'sale-products',
description: '할인 상품',
filters: [{field: 'price', operator: 'less than', value: 50000}],
results_limit: 10,
sort_field: 'price',
sort_order: 'asc'
}
})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'selection' => [
'name' => 'sale-products',
'description' => '할인 상품',
'filters' => [
[
'field' => 'price',
'operator' => 'less than',
'value' => 50000
]
],
'results_limit' => 10,
'sort_field' => 'price',
'sort_order' => 'asc'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections"
payload := strings.NewReader("{\n \"selection\": {\n \"name\": \"sale-products\",\n \"description\": \"할인 상품\",\n \"filters\": [\n {\n \"field\": \"price\",\n \"operator\": \"less than\",\n \"value\": 50000\n }\n ],\n \"results_limit\": 10,\n \"sort_field\": \"price\",\n \"sort_order\": \"asc\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selection\": {\n \"name\": \"sale-products\",\n \"description\": \"할인 상품\",\n \"filters\": [\n {\n \"field\": \"price\",\n \"operator\": \"less than\",\n \"value\": 50000\n }\n ],\n \"results_limit\": 10,\n \"sort_field\": \"price\",\n \"sort_order\": \"asc\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/selections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"selection\": {\n \"name\": \"sale-products\",\n \"description\": \"할인 상품\",\n \"filters\": [\n {\n \"field\": \"price\",\n \"operator\": \"less than\",\n \"value\": 50000\n }\n ],\n \"results_limit\": 10,\n \"sort_field\": \"price\",\n \"sort_order\": \"asc\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": null,
"error": null
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}{
"data": null,
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid bulk item request.",
"details": [
{
"field": "items[0].unknown_field",
"path": [
"items",
0,
"unknown_field"
],
"code": "invalid-fields",
"message": "Unrecognized field: unknown_field."
}
]
}
}인증
POST /authenticate로 발급받은 인증 토큰을 Bearer 형식으로 전달합니다.
경로 매개변수
노티플라이 프로젝트 ID입니다.
Required string length:
32Pattern:
^[a-f0-9]{32}$카탈로그를 만들 때 지정한 고유한 이름입니다.
Maximum string length:
250Pattern:
^[A-Za-z0-9_-]+$본문
application/json
- Option 1
- Option 2
Show child attributes
Show child attributes
⌘I
