Locations
Update Location
PATCH
/
v1
/
locations
/
{id}
Update Location
curl --request PATCH \
--url https://api.curbwaste.com/v1/locations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": "<string>"
}
'import requests
url = "https://api.curbwaste.com/v1/locations/{id}"
payload = {
"name": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
locationNote: '<string>',
purchaseOrderNumber: '<string>',
address: '<string>'
})
};
fetch('https://api.curbwaste.com/v1/locations/{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.curbwaste.com/v1/locations/{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([
'name' => '<string>',
'locationNote' => '<string>',
'purchaseOrderNumber' => '<string>',
'address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.curbwaste.com/v1/locations/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.curbwaste.com/v1/locations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.curbwaste.com/v1/locations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"customerId": "<string>",
"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>",
"location": {
"lat": 123,
"lng": 123
}
},
"createdAt": "<string>",
"updatedAt": "<string>",
"reused": true,
"reactivated": true
}
}Authorizations
Company API key from the developer platform. Header: Authorization: Bearer cw_live_…. Key must include customers:read and/or customers:write.
Path Parameters
Query Parameters
Body
application/json
Required string length:
1 - 255Maximum string length:
2000Maximum string length:
255Street address to re-geocode. When set, replaces the stored address JSON.
Required string length:
1 - 500Set to "ACTIVE" to reactivate an inactive location.
Available options:
ACTIVE, INACTIVE Response
200 - application/json
Show child attributes
Show child attributes
⌘I
Update Location
curl --request PATCH \
--url https://api.curbwaste.com/v1/locations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": "<string>"
}
'import requests
url = "https://api.curbwaste.com/v1/locations/{id}"
payload = {
"name": "<string>",
"locationNote": "<string>",
"purchaseOrderNumber": "<string>",
"address": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
locationNote: '<string>',
purchaseOrderNumber: '<string>',
address: '<string>'
})
};
fetch('https://api.curbwaste.com/v1/locations/{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.curbwaste.com/v1/locations/{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([
'name' => '<string>',
'locationNote' => '<string>',
'purchaseOrderNumber' => '<string>',
'address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.curbwaste.com/v1/locations/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.curbwaste.com/v1/locations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.curbwaste.com/v1/locations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"locationNote\": \"<string>\",\n \"purchaseOrderNumber\": \"<string>\",\n \"address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"customerId": "<string>",
"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>",
"location": {
"lat": 123,
"lng": 123
}
},
"createdAt": "<string>",
"updatedAt": "<string>",
"reused": true,
"reactivated": true
}
}