메인 콘텐츠로 건너뛰기
PUT
/
api
/
v2
/
orders
/
webhooks
/
{webhookId}
cURL
curl -X PUT https://api.bizmori.com/api/v2/orders/webhooks/WEBHOOK_ID \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Webhook",
    "url": "https://example.com/webhook-v2"
  }'
const webhookId = 'WEBHOOK_ID';
const response = await fetch(
`https://api.bizmori.com/api/v2/orders/webhooks/${webhookId}`,
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Updated Webhook',
url: 'https://example.com/webhook-v2'
})
}
);
const data = await response.json();
import requests

webhook_id = 'WEBHOOK_ID'
response = requests.put(
f'https://api.bizmori.com/api/v2/orders/webhooks/{webhook_id}',
headers={'Authorization': 'YOUR_API_KEY'},
json={
'name': 'Updated Webhook',
'url': 'https://example.com/webhook-v2'
}
)
data = response.json()
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v2/orders/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'url' => 'https://example.com/webhook'
]),
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.bizmori.com/api/v2/orders/webhooks/{webhookId}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"https://example.com/webhook\"\n}")

req, _ := http.NewRequest("PUT", 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.put("https://api.bizmori.com/api/v2/orders/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"https://example.com/webhook\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.bizmori.com/api/v2/orders/webhooks/{webhookId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"url\": \"https://example.com/webhook\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 123,
    "name": "<string>",
    "url": "<string>",
    "isActive": true,
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}
{
"code": "VALIDATION_FAILED"
}
{
"code": "AUTH_NOT_AUTHENTICATED"
}
{
"code": "RESOURCE_NOT_FOUND"
}

인증

Authorization
string
header
필수

외부 클라이언트 접근을 위한 API 키

경로 매개변수

webhookId
integer
필수

웹훅 ID

본문

application/json
name
string

웹훅 이름

Maximum string length: 100
url
string<uri>

웹훅 URL

예시:

"https://example.com/webhook"

응답

수정 성공

data
object