Locations
Sync the baseline and many locations
POST
/
v1
/
locations:sync
Sync the baseline and many locations
curl --request POST \
--url https://api.technicallyfit.com/v1/locations:sync \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"locations": [
{
"external_id": "<string>",
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"overrides": [
{
"token": "<string>",
"attributes": {},
"back_in_service_on": "<string>",
"count": 50000,
"note": "<string>"
}
],
"region": "<string>"
}
],
"archive_missing": false,
"dry_run": true
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locations: [
{
external_id: '<string>',
name: '<string>',
time_zone: '<string>',
address: {
city: '<string>',
country: '<string>',
line1: '<string>',
line2: '<string>',
postal_code: '<string>',
region: '<string>'
},
overrides: [
{
token: '<string>',
attributes: {},
back_in_service_on: '<string>',
count: 50000,
note: '<string>'
}
],
region: '<string>'
}
],
archive_missing: false,
dry_run: true
})
};
fetch('https://api.technicallyfit.com/v1/locations:sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/locations:sync"
payload = {
"locations": [
{
"external_id": "<string>",
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"overrides": [
{
"token": "<string>",
"attributes": {},
"back_in_service_on": "<string>",
"count": 50000,
"note": "<string>"
}
],
"region": "<string>"
}
],
"archive_missing": False,
"dry_run": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"applied": true,
"baseline": {
"added": [
"<string>"
],
"changed": true,
"removed": [
"<string>"
]
},
"changes": [
{
"action": "created",
"effective_inventory": {
"added": [
"<string>"
],
"removed": [
"<string>"
]
},
"external_id": "<string>",
"teammates_to_replan": 123
}
],
"locations": {
"archived": 123,
"created": 123,
"unchanged": 123,
"updated": 123
},
"totals": {
"locations_with_inventory_change": 123,
"teammates_to_replan": 123
}
}{
"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>"
}
}Body
application/json
Response
⌘I
Sync the baseline and many locations
curl --request POST \
--url https://api.technicallyfit.com/v1/locations:sync \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"locations": [
{
"external_id": "<string>",
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"overrides": [
{
"token": "<string>",
"attributes": {},
"back_in_service_on": "<string>",
"count": 50000,
"note": "<string>"
}
],
"region": "<string>"
}
],
"archive_missing": false,
"dry_run": true
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locations: [
{
external_id: '<string>',
name: '<string>',
time_zone: '<string>',
address: {
city: '<string>',
country: '<string>',
line1: '<string>',
line2: '<string>',
postal_code: '<string>',
region: '<string>'
},
overrides: [
{
token: '<string>',
attributes: {},
back_in_service_on: '<string>',
count: 50000,
note: '<string>'
}
],
region: '<string>'
}
],
archive_missing: false,
dry_run: true
})
};
fetch('https://api.technicallyfit.com/v1/locations:sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/locations:sync"
payload = {
"locations": [
{
"external_id": "<string>",
"name": "<string>",
"time_zone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"region": "<string>"
},
"overrides": [
{
"token": "<string>",
"attributes": {},
"back_in_service_on": "<string>",
"count": 50000,
"note": "<string>"
}
],
"region": "<string>"
}
],
"archive_missing": False,
"dry_run": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"applied": true,
"baseline": {
"added": [
"<string>"
],
"changed": true,
"removed": [
"<string>"
]
},
"changes": [
{
"action": "created",
"effective_inventory": {
"added": [
"<string>"
],
"removed": [
"<string>"
]
},
"external_id": "<string>",
"teammates_to_replan": 123
}
],
"locations": {
"archived": 123,
"created": 123,
"unchanged": 123,
"updated": 123
},
"totals": {
"locations_with_inventory_change": 123,
"teammates_to_replan": 123
}
}{
"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>"
}
}