Locations
Upsert multiple locations
PUT
/
location
/
bulk
Upsert multiple locations
curl --request PUT \
--url https://{instance}/api/v2/location/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
[
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"metadata": {},
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"deliveryInstructions": "<string>",
"notes": "<string>"
}
]
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
name: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
shopId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
code: '<string>',
metadata: {},
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
stateOrProvince: '<string>',
postalCode: '<string>',
latitude: 123,
longitude: 123,
timezone: '<string>',
deliveryInstructions: '<string>',
notes: '<string>'
}
])
};
fetch('https://{instance}/api/v2/location/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/location/bulk"
payload = [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"metadata": {},
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"deliveryInstructions": "<string>",
"notes": "<string>"
}
]
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>",
"type": "storage",
"metadata": {},
"isArchived": true,
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>",
"country": "US",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"deliveryInstructions": "<string>",
"notes": "<string>"
}
]
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Query Parameters
Body
application/json
⌘I
Upsert multiple locations
curl --request PUT \
--url https://{instance}/api/v2/location/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
[
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"metadata": {},
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"deliveryInstructions": "<string>",
"notes": "<string>"
}
]
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
name: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
shopId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
code: '<string>',
metadata: {},
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
stateOrProvince: '<string>',
postalCode: '<string>',
latitude: 123,
longitude: 123,
timezone: '<string>',
deliveryInstructions: '<string>',
notes: '<string>'
}
])
};
fetch('https://{instance}/api/v2/location/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/location/bulk"
payload = [
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"metadata": {},
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"deliveryInstructions": "<string>",
"notes": "<string>"
}
]
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>",
"type": "storage",
"metadata": {},
"isArchived": true,
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>",
"country": "US",
"latitude": 123,
"longitude": 123,
"timezone": "<string>",
"deliveryInstructions": "<string>",
"notes": "<string>"
}
]
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}