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"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations"
payload = {
"object_type": "customer",
"object_id": 1,
"title": "some string"
}
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'})
};
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));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}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"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/locations"
payload = {
"object_type": "customer",
"object_id": 1,
"title": "some string"
}
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'})
};
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));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Body raw (json)
{
"object_type": "customer",// required | string | description: object type which location is
"object_id": 1,// required | integer | existing object id
"title": "some string",// required | string | max:255
"address_1": "some string",// string | nullable | max:255
"address_2": "some string",// string | nullable | max:255
"city": "some string",// string | nullable | max:255
"state": "some string",// string | nullable | max:255
"zip_code": "some string",// string | nullable | max:255
"notes": "some string",// string | nullable | max:5000
"is_main_location": true,// optional | boolean
"is_primary_location": true,// optional | boolean
"primary_customer_contact_id": null // optional | integer | existing customer contact id
}
Authorizations
Body
application/json
Object type which location is.
Existing object id.
Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
5000Existing customer contact id.