Update Webhook (partial)
curl --request PATCH \
--url https://api.coinvoyage.io/v3/webhooks/{webhook_id} \
--header 'Authorization: <api-key>' \
--header 'Authorization-Signature: <authorization-signature>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"subscription_events": [
"ORDER_CREATED",
"ORDER_COMPLETED"
],
"url": "https://example.com/webhook"
}
'import requests
url = "https://api.coinvoyage.io/v3/webhooks/{webhook_id}"
payload = {
"active": True,
"subscription_events": ["ORDER_CREATED", "ORDER_COMPLETED"],
"url": "https://example.com/webhook"
}
headers = {
"Authorization-Signature": "<authorization-signature>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Authorization-Signature': '<authorization-signature>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
subscription_events: ['ORDER_CREATED', 'ORDER_COMPLETED'],
url: 'https://example.com/webhook'
})
};
fetch('https://api.coinvoyage.io/v3/webhooks/{webhook_id}', 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.coinvoyage.io/v3/webhooks/{webhook_id}",
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([
'active' => true,
'subscription_events' => [
'ORDER_CREATED',
'ORDER_COMPLETED'
],
'url' => 'https://example.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Authorization-Signature: <authorization-signature>",
"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.coinvoyage.io/v3/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"active\": true,\n \"subscription_events\": [\n \"ORDER_CREATED\",\n \"ORDER_COMPLETED\"\n ],\n \"url\": \"https://example.com/webhook\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization-Signature", "<authorization-signature>")
req.Header.Add("Authorization", "<api-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))
}HttpResponse<String> response = Unirest.patch("https://api.coinvoyage.io/v3/webhooks/{webhook_id}")
.header("Authorization-Signature", "<authorization-signature>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"subscription_events\": [\n \"ORDER_CREATED\",\n \"ORDER_COMPLETED\"\n ],\n \"url\": \"https://example.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinvoyage.io/v3/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization-Signature"] = '<authorization-signature>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"subscription_events\": [\n \"ORDER_CREATED\",\n \"ORDER_COMPLETED\"\n ],\n \"url\": \"https://example.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"id": "cuidjkhg3e289y74u5t6v",
"subscription_events": [
"ORDER_CREATED",
"ORDER_COMPLETED"
],
"url": "https://example.com/webhook",
"webhook_secret": "whsec_xxxxx"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}webhooks
Update Webhook (partial)
PATCH
/
webhooks
/
{webhook_id}
Update Webhook (partial)
curl --request PATCH \
--url https://api.coinvoyage.io/v3/webhooks/{webhook_id} \
--header 'Authorization: <api-key>' \
--header 'Authorization-Signature: <authorization-signature>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"subscription_events": [
"ORDER_CREATED",
"ORDER_COMPLETED"
],
"url": "https://example.com/webhook"
}
'import requests
url = "https://api.coinvoyage.io/v3/webhooks/{webhook_id}"
payload = {
"active": True,
"subscription_events": ["ORDER_CREATED", "ORDER_COMPLETED"],
"url": "https://example.com/webhook"
}
headers = {
"Authorization-Signature": "<authorization-signature>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Authorization-Signature': '<authorization-signature>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
subscription_events: ['ORDER_CREATED', 'ORDER_COMPLETED'],
url: 'https://example.com/webhook'
})
};
fetch('https://api.coinvoyage.io/v3/webhooks/{webhook_id}', 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.coinvoyage.io/v3/webhooks/{webhook_id}",
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([
'active' => true,
'subscription_events' => [
'ORDER_CREATED',
'ORDER_COMPLETED'
],
'url' => 'https://example.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Authorization-Signature: <authorization-signature>",
"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.coinvoyage.io/v3/webhooks/{webhook_id}"
payload := strings.NewReader("{\n \"active\": true,\n \"subscription_events\": [\n \"ORDER_CREATED\",\n \"ORDER_COMPLETED\"\n ],\n \"url\": \"https://example.com/webhook\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization-Signature", "<authorization-signature>")
req.Header.Add("Authorization", "<api-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))
}HttpResponse<String> response = Unirest.patch("https://api.coinvoyage.io/v3/webhooks/{webhook_id}")
.header("Authorization-Signature", "<authorization-signature>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"subscription_events\": [\n \"ORDER_CREATED\",\n \"ORDER_COMPLETED\"\n ],\n \"url\": \"https://example.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinvoyage.io/v3/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization-Signature"] = '<authorization-signature>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"subscription_events\": [\n \"ORDER_CREATED\",\n \"ORDER_COMPLETED\"\n ],\n \"url\": \"https://example.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"id": "cuidjkhg3e289y74u5t6v",
"subscription_events": [
"ORDER_CREATED",
"ORDER_COMPLETED"
],
"url": "https://example.com/webhook",
"webhook_secret": "whsec_xxxxx"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}Authorizations
HMAC-SHA256 signature. See the Authorization-Signature header parameter on signed operations.
Headers
HMAC-SHA256 signature header: 'APIKey=<api_key>,signature=,timestamp=<unix_timestamp>'. The signature is computed over METHOD + path (with the /v3 prefix stripped) + timestamp.
Path Parameters
Body
application/json
Was this page helpful?
⌘I