Locations
Create or replace a location
PUT
/
v1
/
locations
/
{location_external_id}
Create or replace a location
curl --request PUT \
--url https://api.technicallyfit.com/v1/locations/{location_external_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"region": "<string>"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
time_zone: '<string>',
address: {
city: '<string>',
country: '<string>',
line1: '<string>',
line2: '<string>',
postal_code: '<string>',
region: '<string>'
},
region: '<string>'
})
};
fetch('https://api.technicallyfit.com/v1/locations/{location_external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/locations/{location_external_id}"
payload = {
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"region": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"inventory_revision": 123,
"name": "<string>",
"overrides_count": 123,
"region": "<string>",
"status": "active",
"time_zone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"inventory_revision": 123,
"name": "<string>",
"overrides_count": 123,
"region": "<string>",
"status": "active",
"time_zone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}Path Parameters
Body
application/json
Response
⌘I
Create or replace a location
curl --request PUT \
--url https://api.technicallyfit.com/v1/locations/{location_external_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"region": "<string>"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
time_zone: '<string>',
address: {
city: '<string>',
country: '<string>',
line1: '<string>',
line2: '<string>',
postal_code: '<string>',
region: '<string>'
},
region: '<string>'
})
};
fetch('https://api.technicallyfit.com/v1/locations/{location_external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/locations/{location_external_id}"
payload = {
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"region": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"inventory_revision": 123,
"name": "<string>",
"overrides_count": 123,
"region": "<string>",
"status": "active",
"time_zone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"inventory_revision": 123,
"name": "<string>",
"overrides_count": 123,
"region": "<string>",
"status": "active",
"time_zone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}