Webhook events
location.updated
Delivered when a location changes (edit, reactivation, or PO fill-in on reuse), through the API, MCP, or CurbWaste.
location.updated
curl --request POST \
--url https://api.example.com/webhooks/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"streetNo": "<string>",
"county": "<string>",
"borough": "<string>",
"geoPlaceId": "<string>",
"latitude": 123,
"longitude": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reused": true,
"reactivated": true
}
}
'import requests
url = "https://api.example.com/webhooks/location.updated"
payload = {
"id": "evt_bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"streetNo": "<string>",
"county": "<string>",
"borough": "<string>",
"geoPlaceId": "<string>",
"latitude": 123,
"longitude": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reused": True,
"reactivated": True
}
}
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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff',
createdAt: '2023-11-07T05:31:56Z',
companyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
data: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
status: '<string>',
locationNote: '<string>',
purchaseOrderNumber: '<string>',
address: {
address: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
streetNo: '<string>',
county: '<string>',
borough: '<string>',
geoPlaceId: '<string>',
latitude: 123,
longitude: 123
},
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
reused: true,
reactivated: true
}
})
};
fetch('https://api.example.com/webhooks/location.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/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff',
'createdAt' => '2023-11-07T05:31:56Z',
'companyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'data' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'status' => '<string>',
'locationNote' => '<string>',
'purchaseOrderNumber' => '<string>',
'address' => [
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'streetNo' => '<string>',
'county' => '<string>',
'borough' => '<string>',
'geoPlaceId' => '<string>',
'latitude' => 123,
'longitude' => 123
],
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'reused' => true,
'reactivated' => true
]
]),
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/location.updated"
payload := strings.NewReader("{\n \"id\": \"evt_bbbbbbbb-cccc-dddd-eeee-ffffffffffff\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"streetNo\": \"<string>\",\n \"county\": \"<string>\",\n \"borough\": \"<string>\",\n \"geoPlaceId\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"reused\": true,\n \"reactivated\": true\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/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"streetNo\": \"<string>\",\n \"county\": \"<string>\",\n \"borough\": \"<string>\",\n \"geoPlaceId\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"reused\": true,\n \"reactivated\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/webhooks/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"streetNo\": \"<string>\",\n \"county\": \"<string>\",\n \"borough\": \"<string>\",\n \"geoPlaceId\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"reused\": true,\n \"reactivated\": true\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
location.updated
curl --request POST \
--url https://api.example.com/webhooks/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"streetNo": "<string>",
"county": "<string>",
"borough": "<string>",
"geoPlaceId": "<string>",
"latitude": 123,
"longitude": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reused": true,
"reactivated": true
}
}
'import requests
url = "https://api.example.com/webhooks/location.updated"
payload = {
"id": "evt_bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"streetNo": "<string>",
"county": "<string>",
"borough": "<string>",
"geoPlaceId": "<string>",
"latitude": 123,
"longitude": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reused": True,
"reactivated": True
}
}
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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff',
createdAt: '2023-11-07T05:31:56Z',
companyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
data: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
status: '<string>',
locationNote: '<string>',
purchaseOrderNumber: '<string>',
address: {
address: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
streetNo: '<string>',
county: '<string>',
borough: '<string>',
geoPlaceId: '<string>',
latitude: 123,
longitude: 123
},
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
reused: true,
reactivated: true
}
})
};
fetch('https://api.example.com/webhooks/location.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/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff',
'createdAt' => '2023-11-07T05:31:56Z',
'companyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'data' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'status' => '<string>',
'locationNote' => '<string>',
'purchaseOrderNumber' => '<string>',
'address' => [
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'streetNo' => '<string>',
'county' => '<string>',
'borough' => '<string>',
'geoPlaceId' => '<string>',
'latitude' => 123,
'longitude' => 123
],
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'reused' => true,
'reactivated' => true
]
]),
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/location.updated"
payload := strings.NewReader("{\n \"id\": \"evt_bbbbbbbb-cccc-dddd-eeee-ffffffffffff\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"streetNo\": \"<string>\",\n \"county\": \"<string>\",\n \"borough\": \"<string>\",\n \"geoPlaceId\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"reused\": true,\n \"reactivated\": true\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/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"streetNo\": \"<string>\",\n \"county\": \"<string>\",\n \"borough\": \"<string>\",\n \"geoPlaceId\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"reused\": true,\n \"reactivated\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/webhooks/location.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_bbbbbbbb-cccc-dddd-eeee-ffffffffffff\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"data\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"streetNo\": \"<string>\",\n \"county\": \"<string>\",\n \"borough\": \"<string>\",\n \"geoPlaceId\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"reused\": true,\n \"reactivated\": true\n }\n}"
response = http.request(request)
puts response.read_body