Update location by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations/{locationId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"object_type": "customer",
"object_id": 1,
"title": "some string",
"address_1": "some string",
"address_2": "some string",
"city": "some string",
"state": "some string",
"zip_code": "some string",
"notes": "some string",
"is_main_location": true,
"is_primary_location": true,
"primary_customer_contact_id": null
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations/{locationId}"
payload = {
"object_type": "customer",
"object_id": 1,
"title": "some string",
"address_1": "some string",
"address_2": "some string",
"city": "some string",
"state": "some string",
"zip_code": "some string",
"notes": "some string",
"is_main_location": True,
"is_primary_location": True,
"primary_customer_contact_id": None
}
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({
object_type: 'customer',
object_id: 1,
title: 'some string',
address_1: 'some string',
address_2: 'some string',
city: 'some string',
state: 'some string',
zip_code: 'some string',
notes: 'some string',
is_main_location: true,
is_primary_location: true,
primary_customer_contact_id: null
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Locations
Update location by ID
Update a location
PUT
/
locations
/
{locationId}
Update location by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations/{locationId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"object_type": "customer",
"object_id": 1,
"title": "some string",
"address_1": "some string",
"address_2": "some string",
"city": "some string",
"state": "some string",
"zip_code": "some string",
"notes": "some string",
"is_main_location": true,
"is_primary_location": true,
"primary_customer_contact_id": null
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations/{locationId}"
payload = {
"object_type": "customer",
"object_id": 1,
"title": "some string",
"address_1": "some string",
"address_2": "some string",
"city": "some string",
"state": "some string",
"zip_code": "some string",
"notes": "some string",
"is_main_location": True,
"is_primary_location": True,
"primary_customer_contact_id": None
}
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({
object_type: 'customer',
object_id: 1,
title: 'some string',
address_1: 'some string',
address_2: 'some string',
city: 'some string',
state: 'some string',
zip_code: 'some string',
notes: 'some string',
is_main_location: true,
is_primary_location: true,
primary_customer_contact_id: null
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Was this page helpful?
⌘I