patch-api-catalog-items
curl --request PATCH \
--url https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "sku-001",
"price": 49000,
"tags": {
"$add": [
"sale"
],
"$remove": [
"new"
]
}
}
]
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items"
payload = { "items": [
{
"id": "sku-001",
"price": 49000,
"tags": {
"$add": ["sale"],
"$remove": ["new"]
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [{id: 'sku-001', price: 49000, tags: {$add: ['sale'], $remove: ['new']}}]
})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items', 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}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'id' => 'sku-001',
'price' => 49000,
'tags' => [
'$add' => [
'sale'
],
'$remove' => [
'new'
]
]
]
]
]),
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}/items"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"sku-001\",\n \"price\": 49000,\n \"tags\": {\n \"$add\": [\n \"sale\"\n ],\n \"$remove\": [\n \"new\"\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"sku-001\",\n \"price\": 49000,\n \"tags\": {\n \"$add\": [\n \"sale\"\n ],\n \"$remove\": [\n \"new\"\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"id\": \"sku-001\",\n \"price\": 49000,\n \"tags\": {\n \"$add\": [\n \"sale\"\n ],\n \"$remove\": [\n \"new\"\n ]\n }\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개 부분 수정합니다. 없는 ID가 포함되면 전체 요청이 404로 실패합니다.
PATCH
/
v1
/
projects
/
{projectId}
/
catalogs
/
{catalogName}
/
items
patch-api-catalog-items
curl --request PATCH \
--url https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "sku-001",
"price": 49000,
"tags": {
"$add": [
"sale"
],
"$remove": [
"new"
]
}
}
]
}
'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items"
payload = { "items": [
{
"id": "sku-001",
"price": 49000,
"tags": {
"$add": ["sale"],
"$remove": ["new"]
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [{id: 'sku-001', price: 49000, tags: {$add: ['sale'], $remove: ['new']}}]
})
};
fetch('https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items', 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}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'id' => 'sku-001',
'price' => 49000,
'tags' => [
'$add' => [
'sale'
],
'$remove' => [
'new'
]
]
]
]
]),
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}/items"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"sku-001\",\n \"price\": 49000,\n \"tags\": {\n \"$add\": [\n \"sale\"\n ],\n \"$remove\": [\n \"new\"\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"sku-001\",\n \"price\": 49000,\n \"tags\": {\n \"$add\": [\n \"sale\"\n ],\n \"$remove\": [\n \"new\"\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/catalogs/{catalogName}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"id\": \"sku-001\",\n \"price\": 49000,\n \"tags\": {\n \"$add\": [\n \"sale\"\n ],\n \"$remove\": [\n \"new\"\n ]\n }\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
요청 안에서 아이템 ID는 중복될 수 없습니다.
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
⌘I
