Aggiorna webhook
curl --request PUT \
--url https://service.e-manager.io/api/v1/integrations/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"label": "Produzione tracking",
"url": "https://example.com/webhooks/e-manager",
"events": [
"tracking.order_shipped",
"tracking.delivered"
],
"isActive": true
}
'import requests
url = "https://service.e-manager.io/api/v1/integrations/webhooks/{id}"
payload = {
"label": "Produzione tracking",
"url": "https://example.com/webhooks/e-manager",
"events": ["tracking.order_shipped", "tracking.delivered"],
"isActive": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Produzione tracking',
url: 'https://example.com/webhooks/e-manager',
events: ['tracking.order_shipped', 'tracking.delivered'],
isActive: true
})
};
fetch('https://service.e-manager.io/api/v1/integrations/webhooks/{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://service.e-manager.io/api/v1/integrations/webhooks/{id}",
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([
'label' => 'Produzione tracking',
'url' => 'https://example.com/webhooks/e-manager',
'events' => [
'tracking.order_shipped',
'tracking.delivered'
],
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://service.e-manager.io/api/v1/integrations/webhooks/{id}"
payload := strings.NewReader("{\n \"label\": \"Produzione tracking\",\n \"url\": \"https://example.com/webhooks/e-manager\",\n \"events\": [\n \"tracking.order_shipped\",\n \"tracking.delivered\"\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.put("https://service.e-manager.io/api/v1/integrations/webhooks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Produzione tracking\",\n \"url\": \"https://example.com/webhooks/e-manager\",\n \"events\": [\n \"tracking.order_shipped\",\n \"tracking.delivered\"\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.e-manager.io/api/v1/integrations/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"Produzione tracking\",\n \"url\": \"https://example.com/webhooks/e-manager\",\n \"events\": [\n \"tracking.order_shipped\",\n \"tracking.delivered\"\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Produzione tracking",
"url": "https://example.com/webhooks/e-manager",
"secretLast4": "a1b2",
"events": [
"tracking.order_shipped",
"tracking.delivered"
],
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"disabledAt": "2023-11-07T05:31:56Z",
"lastDelivery": {
"status": "success",
"deliveredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}Webhook
Aggiorna webhook
Aggiorna etichetta, URL HTTPS ed eventi di un endpoint webhook esistente. Richiede scope webhooks:manage. L’endpoint deve appartenere alla company dell’API key.
PUT
/
v1
/
integrations
/
webhooks
/
{id}
Aggiorna webhook
curl --request PUT \
--url https://service.e-manager.io/api/v1/integrations/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"label": "Produzione tracking",
"url": "https://example.com/webhooks/e-manager",
"events": [
"tracking.order_shipped",
"tracking.delivered"
],
"isActive": true
}
'import requests
url = "https://service.e-manager.io/api/v1/integrations/webhooks/{id}"
payload = {
"label": "Produzione tracking",
"url": "https://example.com/webhooks/e-manager",
"events": ["tracking.order_shipped", "tracking.delivered"],
"isActive": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Produzione tracking',
url: 'https://example.com/webhooks/e-manager',
events: ['tracking.order_shipped', 'tracking.delivered'],
isActive: true
})
};
fetch('https://service.e-manager.io/api/v1/integrations/webhooks/{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://service.e-manager.io/api/v1/integrations/webhooks/{id}",
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([
'label' => 'Produzione tracking',
'url' => 'https://example.com/webhooks/e-manager',
'events' => [
'tracking.order_shipped',
'tracking.delivered'
],
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://service.e-manager.io/api/v1/integrations/webhooks/{id}"
payload := strings.NewReader("{\n \"label\": \"Produzione tracking\",\n \"url\": \"https://example.com/webhooks/e-manager\",\n \"events\": [\n \"tracking.order_shipped\",\n \"tracking.delivered\"\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.put("https://service.e-manager.io/api/v1/integrations/webhooks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Produzione tracking\",\n \"url\": \"https://example.com/webhooks/e-manager\",\n \"events\": [\n \"tracking.order_shipped\",\n \"tracking.delivered\"\n ],\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.e-manager.io/api/v1/integrations/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"Produzione tracking\",\n \"url\": \"https://example.com/webhooks/e-manager\",\n \"events\": [\n \"tracking.order_shipped\",\n \"tracking.delivered\"\n ],\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Produzione tracking",
"url": "https://example.com/webhooks/e-manager",
"secretLast4": "a1b2",
"events": [
"tracking.order_shipped",
"tracking.delivered"
],
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"disabledAt": "2023-11-07T05:31:56Z",
"lastDelivery": {
"status": "success",
"deliveredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Path Parameters
ID endpoint webhook
Body
application/json
Minimum string length:
1Example:
"Produzione tracking"
Example:
"https://example.com/webhooks/e-manager"
Available options:
tracking.order_shipped, tracking.in_transit, tracking.out_for_delivery, tracking.delay, tracking.pickup_point, tracking.delivery_failed, tracking.delivered, tracking.* Example:
[
"tracking.order_shipped",
"tracking.delivered"
]
Example:
true
Response
200 - application/json
Example:
"Produzione tracking"
Example:
"https://example.com/webhooks/e-manager"
Example:
"a1b2"
Example:
[
"tracking.order_shipped",
"tracking.delivered"
]
Example:
true
Show child attributes
Show child attributes
Was this page helpful?

