add-api-catalog-fields
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
{
"name": "discount",
"type": "number"
}
]
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields"
payload = { "fields": [
{
"name": "discount",
"type": "number"
}
] }
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({fields: [{name: 'discount', type: 'number'}]})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields', 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}/fields",
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([
'fields' => [
[
'name' => 'discount',
'type' => 'number'
]
]
]),
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}/fields"
payload := strings.NewReader("{\n \"fields\": [\n {\n \"name\": \"discount\",\n \"type\": \"number\"\n }\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}/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n {\n \"name\": \"discount\",\n \"type\": \"number\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields")
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 \"fields\": [\n {\n \"name\": \"discount\",\n \"type\": \"number\"\n }\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."
}
]
}
}필드
카탈로그 필드 추가
카탈로그에 필드를 한 번에 최대 50개 추가합니다.
POST
/
v1
/
projects
/
{projectId}
/
catalogs
/
{catalogName}
/
fields
add-api-catalog-fields
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
{
"name": "discount",
"type": "number"
}
]
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields"
payload = { "fields": [
{
"name": "discount",
"type": "number"
}
] }
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({fields: [{name: 'discount', type: 'number'}]})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields', 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}/fields",
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([
'fields' => [
[
'name' => 'discount',
'type' => 'number'
]
]
]),
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}/fields"
payload := strings.NewReader("{\n \"fields\": [\n {\n \"name\": \"discount\",\n \"type\": \"number\"\n }\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}/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n {\n \"name\": \"discount\",\n \"type\": \"number\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/fields")
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 \"fields\": [\n {\n \"name\": \"discount\",\n \"type\": \"number\"\n }\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
요청 안에서 필드 이름은 중복될 수 없습니다.
Required array length:
1 - 50 elements- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
⌘I
