Webhook events
customer.updated
Delivered when a customer’s profile changes, through the API, MCP, or CurbWaste. Respond with 2xx quickly.
customer.updated
curl --request POST \
--url https://api.example.com/webhooks/customer.updated \
--header 'Content-Type: application/json' \
--header 'X-CurbWaste-Event-Id: <x-curbwaste-event-id>' \
--header 'X-CurbWaste-Event-Type: <x-curbwaste-event-type>' \
--header 'X-CurbWaste-Signature: <x-curbwaste-signature>' \
--data '
{
"id": "evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"customerNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"companyName": "<string>",
"billingEmails": [
"<string>"
],
"notes": "<string>",
"customerLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"globalLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.example.com/webhooks/customer.updated"
payload = {
"id": "evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"customerNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"companyName": "<string>",
"billingEmails": ["<string>"],
"notes": "<string>",
"customerLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"globalLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
headers = {
"X-CurbWaste-Signature": "<x-curbwaste-signature>",
"X-CurbWaste-Event-Id": "<x-curbwaste-event-id>",
"X-CurbWaste-Event-Type": "<x-curbwaste-event-type>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-CurbWaste-Signature': '<x-curbwaste-signature>',
'X-CurbWaste-Event-Id': '<x-curbwaste-event-id>',
'X-CurbWaste-Event-Type': '<x-curbwaste-event-type>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
createdAt: '2023-11-07T05:31:56Z',
companyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
data: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
displayName: '<string>',
customerNumber: '<string>',
email: '<string>',
phone: '<string>',
companyName: '<string>',
billingEmails: ['<string>'],
notes: '<string>',
customerLabels: [
{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>', code: '<string>'}
],
globalLabels: [
{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>', code: '<string>'}
],
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.example.com/webhooks/customer.updated', 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.example.com/webhooks/customer.updated",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
'createdAt' => '2023-11-07T05:31:56Z',
'companyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'data' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'displayName' => '<string>',
'customerNumber' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'companyName' => '<string>',
'billingEmails' => [
'<string>'
],
'notes' => '<string>',
'customerLabels' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'code' => '<string>'
]
],
'globalLabels' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'code' => '<string>'
]
],
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CurbWaste-Event-Id: <x-curbwaste-event-id>",
"X-CurbWaste-Event-Type: <x-curbwaste-event-type>",
"X-CurbWaste-Signature: <x-curbwaste-signature>"
],
]);
$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.example.com/webhooks/customer.updated"
payload := strings.NewReader("{\n \"id\": \"evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"billingEmails\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"customerLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"globalLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CurbWaste-Signature", "<x-curbwaste-signature>")
req.Header.Add("X-CurbWaste-Event-Id", "<x-curbwaste-event-id>")
req.Header.Add("X-CurbWaste-Event-Type", "<x-curbwaste-event-type>")
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.post("https://api.example.com/webhooks/customer.updated")
.header("X-CurbWaste-Signature", "<x-curbwaste-signature>")
.header("X-CurbWaste-Event-Id", "<x-curbwaste-event-id>")
.header("X-CurbWaste-Event-Type", "<x-curbwaste-event-type>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"billingEmails\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"customerLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"globalLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/webhooks/customer.updated")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CurbWaste-Signature"] = '<x-curbwaste-signature>'
request["X-CurbWaste-Event-Id"] = '<x-curbwaste-event-id>'
request["X-CurbWaste-Event-Type"] = '<x-curbwaste-event-type>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"billingEmails\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"customerLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"globalLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_bodyHeaders
Body
application/json
Response
200
Acknowledge receipt. Prefer 204 or 200 promptly so the delivery succeeds.
⌘I
customer.updated
curl --request POST \
--url https://api.example.com/webhooks/customer.updated \
--header 'Content-Type: application/json' \
--header 'X-CurbWaste-Event-Id: <x-curbwaste-event-id>' \
--header 'X-CurbWaste-Event-Type: <x-curbwaste-event-type>' \
--header 'X-CurbWaste-Signature: <x-curbwaste-signature>' \
--data '
{
"id": "evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"customerNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"companyName": "<string>",
"billingEmails": [
"<string>"
],
"notes": "<string>",
"customerLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"globalLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.example.com/webhooks/customer.updated"
payload = {
"id": "evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"customerNumber": "<string>",
"email": "<string>",
"phone": "<string>",
"companyName": "<string>",
"billingEmails": ["<string>"],
"notes": "<string>",
"customerLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"globalLabels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
headers = {
"X-CurbWaste-Signature": "<x-curbwaste-signature>",
"X-CurbWaste-Event-Id": "<x-curbwaste-event-id>",
"X-CurbWaste-Event-Type": "<x-curbwaste-event-type>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-CurbWaste-Signature': '<x-curbwaste-signature>',
'X-CurbWaste-Event-Id': '<x-curbwaste-event-id>',
'X-CurbWaste-Event-Type': '<x-curbwaste-event-type>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
createdAt: '2023-11-07T05:31:56Z',
companyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
data: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
displayName: '<string>',
customerNumber: '<string>',
email: '<string>',
phone: '<string>',
companyName: '<string>',
billingEmails: ['<string>'],
notes: '<string>',
customerLabels: [
{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>', code: '<string>'}
],
globalLabels: [
{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>', code: '<string>'}
],
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.example.com/webhooks/customer.updated', 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.example.com/webhooks/customer.updated",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
'createdAt' => '2023-11-07T05:31:56Z',
'companyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'data' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'displayName' => '<string>',
'customerNumber' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'companyName' => '<string>',
'billingEmails' => [
'<string>'
],
'notes' => '<string>',
'customerLabels' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'code' => '<string>'
]
],
'globalLabels' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'code' => '<string>'
]
],
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CurbWaste-Event-Id: <x-curbwaste-event-id>",
"X-CurbWaste-Event-Type: <x-curbwaste-event-type>",
"X-CurbWaste-Signature: <x-curbwaste-signature>"
],
]);
$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.example.com/webhooks/customer.updated"
payload := strings.NewReader("{\n \"id\": \"evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"billingEmails\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"customerLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"globalLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CurbWaste-Signature", "<x-curbwaste-signature>")
req.Header.Add("X-CurbWaste-Event-Id", "<x-curbwaste-event-id>")
req.Header.Add("X-CurbWaste-Event-Type", "<x-curbwaste-event-type>")
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.post("https://api.example.com/webhooks/customer.updated")
.header("X-CurbWaste-Signature", "<x-curbwaste-signature>")
.header("X-CurbWaste-Event-Id", "<x-curbwaste-event-id>")
.header("X-CurbWaste-Event-Type", "<x-curbwaste-event-type>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"billingEmails\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"customerLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"globalLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/webhooks/customer.updated")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CurbWaste-Signature"] = '<x-curbwaste-signature>'
request["X-CurbWaste-Event-Id"] = '<x-curbwaste-event-id>'
request["X-CurbWaste-Event-Type"] = '<x-curbwaste-event-type>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"evt_aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"companyName\": \"<string>\",\n \"billingEmails\": [\n \"<string>\"\n ],\n \"notes\": \"<string>\",\n \"customerLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"globalLabels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body