Create a location
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Locations
Create a location
Create a location
POST
/
locations
Create a location
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Authorizations
Body
application/json
The body is of type object.
Response
200 - application/json
Successful response
Was this page helpful?
⌘I