whereparcel

궁금한 게 있으세요? 편하게 물어보세요. WhereParcel을 만든 개발자가 직접 읽고 답장드립니다.

웹훅 엔드포인트 API - WhereParcel

웹훅을 수신할 엔드포인트 URL 사전 등록 및 관리. 엔드포인트 테스트, 시크릿 키 갱신, 배송 상태 모니터링.

플레이그라운드에서 테스트 빠른 시작 가이드 → 시작하기 →

EndpointPOST/v2/webhook-endpoints
웹훅 엔드포인트 생성

개요

웹훅을 받을 URL을 사전 등록합니다. 등록한 엔드포인트는 웹훅 등록 시 webhookEndpointId로 참조할 수 있습니다. 무료 API로 사용량이 차감되지 않습니다.

요청 예제

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const endpoint = await wp.createWebhookEndpoint({
  "name": "Production Webhook",
  "url": "https://myapp.com/webhooks/whereparcel",
  "description": "프로덕션 환경 웹훅 수신 URL"
});
console.log(endpoint);
curl -X POST https://api.whereparcel.com/v2/webhook-endpoints \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Webhook",
    "url": "https://myapp.com/webhooks/whereparcel",
    "description": "프로덕션 환경 웹훅 수신 URL"
  }'
const response = await fetch('https://api.whereparcel.com/v2/webhook-endpoints', {
  method: 'POST',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
      "name": "Production Webhook",
      "url": "https://myapp.com/webhooks/whereparcel",
      "description": "프로덕션 환경 웹훅 수신 URL"
    })
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/webhook-endpoints');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$data = [
  'name' => "Production Webhook",
  'url' => "https://myapp.com/webhooks/whereparcel",
  'description' => "프로덕션 환경 웹훅 수신 URL"
];
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/webhook-endpoints'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

data = {
    'name': "Production Webhook",
    'url': "https://myapp.com/webhooks/whereparcel",
    'description': "프로덕션 환경 웹훅 수신 URL"
}

response = requests.post(url, headers=headers, json=data)

result = response.json()
print(result)
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/webhook-endpoints"

	payload := []byte(`{"name":"Production Webhook","url":"https://myapp.com/webhooks/whereparcel","description":"프로덕션 환경 웹훅 수신 URL"}`)
	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	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))
}

테스트 API 키를 대시보드에서 발급받은 실제 API 키로 교체하세요.

요청 본문

name string · required
url string · required
secret string
description string

응답

성공 응답 (201)

201Created — 엔드포인트 생성 성공
{
  "success": true,
  "data": {
    "endpointId": "wep_a1b2c3d4e5f6",
    "name": "Production Webhook",
    "url": "https://myapp.com/webhooks/whereparcel",
    "secret": "whsec_aBcDeFgHiJkLmNoPqRsTuVwXyZ123456",
    "description": "프로덕션 환경 웹훅 수신 URL",
    "isActive": true,
    "createdAt": "2026-02-05T10:00:00.000Z"
  }
}

오류 응답 (400)

400Bad Request — 잘못된 요청 (URL 형식 오류 등)
{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The request parameters are invalid"
  }
}

오류 응답 (401)

401Unauthorized — 인증 실패
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

오류 응답 (409)

409409 — 이미 등록된 웹훅 URL(DUPLICATE_URL)
{
  "success": false,
  "error": {
    "code": "DUPLICATE_URL",
    "message": "This webhook URL is already registered"
  }
}
EndpointGET/v2/webhook-endpoints
웹훅 엔드포인트 목록 조회

개요

등록된 모든 웹훅 엔드포인트를 조회합니다. 무료 API로 사용량이 차감되지 않습니다.

요청 예제

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const endpoints = await wp.getWebhookEndpoints();
console.log(endpoints);
curl -X GET https://api.whereparcel.com/v2/webhook-endpoints \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/webhook-endpoints', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/webhook-endpoints');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/webhook-endpoints'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

result = response.json()
print(result)
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/webhook-endpoints"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	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))
}

테스트 API 키를 대시보드에서 발급받은 실제 API 키로 교체하세요.

응답

성공 응답 (200)

200OK — 엔드포인트 목록 조회 성공
{
  "success": true,
  "data": [
    {
      "endpointId": "wep_a1b2c3d4e5f6",
      "name": "Production Webhook",
      "url": "https://myapp.com/webhooks/whereparcel",
      "description": "프로덕션 환경 웹훅 수신 URL",
      "isActive": true,
      "createdAt": "2026-02-05T10:00:00.000Z",
      "updatedAt": "2026-02-05T10:00:00.000Z"
    },
    {
      "endpointId": "wep_a1b2c3d4e5f6",
      "name": "Staging Webhook",
      "url": "https://staging.myapp.com/webhooks/whereparcel",
      "description": "스테이징 환경 웹훅 수신 URL",
      "isActive": false,
      "createdAt": "2026-02-04T15:30:00.000Z",
      "updatedAt": "2026-02-04T16:00:00.000Z"
    }
  ]
}

오류 응답 (401)

401Unauthorized — 인증 실패
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
EndpointPUT/v2/webhook-endpoints/{endpointId}
웹훅 엔드포인트 수정

개요

웹훅 엔드포인트의 정보를 수정합니다. URL, 이름, 설명, 활성화 상태 등을 변경할 수 있습니다. 무료 API로 사용량이 차감되지 않습니다.

요청 예제

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const endpoint = await wp.updateWebhookEndpoint('wep_a1b2c3d4e5f6', {
  "name": "Updated Webhook Name",
  "url": "https://myapp.com/webhooks/new-url",
  "isActive": true
});
console.log(endpoint);
curl -X PUT https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6 \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Webhook Name",
    "url": "https://myapp.com/webhooks/new-url",
    "isActive": true
  }'
const response = await fetch('https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6', {
  method: 'PUT',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
      "name": "Updated Webhook Name",
      "url": "https://myapp.com/webhooks/new-url",
      "isActive": true
    })
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$data = [
  'name' => "Updated Webhook Name",
  'url' => "https://myapp.com/webhooks/new-url",
  'isActive' => true
];
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

data = {
    'name': "Updated Webhook Name",
    'url': "https://myapp.com/webhooks/new-url",
    'isActive': True
}

response = requests.put(url, headers=headers, json=data)

result = response.json()
print(result)
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6"

	payload := []byte(`{"name":"Updated Webhook Name","url":"https://myapp.com/webhooks/new-url","isActive":true}`)
	req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(payload))

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	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))
}

테스트 API 키를 대시보드에서 발급받은 실제 API 키로 교체하세요.

경로 매개변수

endpointId string · required <p>수정할 엔드포인트 ID</p> wep_a1b2c3d4e5f6

요청 본문

name string
url string
description string
isActive boolean

응답

성공 응답 (200)

200OK — 엔드포인트 수정 성공
{
  "success": true,
  "data": {
    "endpointId": "wep_a1b2c3d4e5f6",
    "name": "Updated Webhook Name",
    "url": "https://myapp.com/webhooks/new-url",
    "description": "Updated description",
    "isActive": true,
    "updatedAt": "2026-02-05T11:00:00.000Z"
  }
}

오류 응답 (400)

400Bad Request — 잘못된 요청 (바꿀 필드 없음, URL 형식 오류 등)
{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "At least one field must be provided"
  }
}

오류 응답 (401)

401Unauthorized — 인증 실패
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

오류 응답 (404)

404Not Found — endpointId를 찾을 수 없음
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "The requested resource was not found"
  }
}

오류 응답 (409)

409409 — 이미 등록된 웹훅 URL(DUPLICATE_URL)
{
  "success": false,
  "error": {
    "code": "DUPLICATE_URL",
    "message": "This webhook URL is already registered"
  }
}
EndpointDELETE/v2/webhook-endpoints/{endpointId}
웹훅 엔드포인트 삭제

개요

웹훅 엔드포인트를 삭제합니다. 이 엔드포인트를 사용 중인 웹훅이 있으면 삭제할 수 없습니다. 무료 API로 사용량이 차감되지 않습니다.

요청 예제

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const result = await wp.deleteWebhookEndpoint('wep_a1b2c3d4e5f6');
console.log(result);
curl -X DELETE https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6 \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6', {
  method: 'DELETE',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

response = requests.delete(url, headers=headers)

result = response.json()
print(result)
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/webhook-endpoints/wep_a1b2c3d4e5f6"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	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))
}

테스트 API 키를 대시보드에서 발급받은 실제 API 키로 교체하세요.

경로 매개변수

endpointId string · required <p>삭제할 엔드포인트 ID</p> wep_a1b2c3d4e5f6

응답

성공 응답 (200)

200OK — 엔드포인트 삭제 성공
{
  "success": true,
  "data": {
    "deleted": true,
    "endpointId": "wep_a1b2c3d4e5f6",
    "message": "Webhook endpoint deleted successfully"
  }
}

오류 응답 (401)

401Unauthorized — 인증 실패
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

오류 응답 (404)

404Not Found — endpointId를 찾을 수 없음
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "The requested resource was not found"
  }
}

오류 응답 (409)

409409 — 사용 중인 엔드포인트는 삭제할 수 없음
{
  "success": false,
  "error": {
    "code": "ERROR",
    "message": "An error occurred"
  }
}