Create your Assets
POST
https://api.woosmap.com/stores
Used to batch create Assets to a specific project identified with the private_key parameter.
Authorization
private_key
apiKey query
Request Body
The request body must of Stores Creation be formatted as JSON.
stores
object[] required
Show 10 propertiesHide 10 properties
Show 4 propertiesHide 4 properties
Show 3 propertiesHide 3 properties
Show 8 propertiesHide 8 properties
Show 2 propertiesHide 2 properties
Example
Stores data to create as JSON
{
"stores": [
{
"types": [
"drive",
"click_and_collect"
],
"tags": [
"wifi",
"covered_parking"
],
"location": {
"lat": 38.719,
"lng": -77.1067
},
"storeId": "STORE_ID_123456",
"name": "My Cool Store",
"address": {
"lines": [
"Building Centre",
"26 Store Street"
],
"countryCode": "UK",
"city": "London",
"zipcode": "WC1E 7BT"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "Europe/London",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
},
"special": {
"2015-02-07": [
{
"start": "08:00",
"end": "23:00"
}
]
}
}
},
{
"types": [
"drive"
],
"tags": [
"covered_parking"
],
"location": {
"lat": 38.5239,
"lng": -77.0157
},
"storeId": "STORE_ID_45678",
"name": "My Cool Store 2",
"address": {
"lines": [
"1805-1899",
"Orchard St"
],
"countryCode": "US",
"city": "Alexandria",
"zipcode": "22309"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "America/New_York",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
}
}
}
]
}
Response
Assets successfully created
curl -L 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY' \
-H 'content-type: application/json' \
--data-raw '{
"stores": [
{
"types": [
"drive",
"click_and_collect"
],
"tags": [
"wifi",
"covered_parking"
],
"location": {
"lat": 38.719,
"lng": -77.1067
},
"storeId": "STORE_ID_123456",
"name": "My Cool Store",
"address": {
"lines": [
"Building Centre",
"26 Store Street"
],
"countryCode": "UK",
"city": "London",
"zipcode": "WC1E 7BT"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "Europe/London",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
},
"special": {
"2015-02-07": [
{
"start": "08:00",
"end": "23:00"
}
]
}
}
},
{
"types": [
"drive"
],
"tags": [
"covered_parking"
],
"location": {
"lat": 38.5239,
"lng": -77.0157
},
"storeId": "STORE_ID_45678",
"name": "My Cool Store 2",
"address": {
"lines": [
"1805-1899",
"Orchard St"
],
"countryCode": "US",
"city": "Alexandria",
"zipcode": "22309"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "America/New_York",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
}
}
}
]
}'
import requests
import json
url = "https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY"
payload = json.dumps({
"stores": [
{
"types": [
"drive",
"click_and_collect"
],
"tags": [
"wifi",
"covered_parking"
],
"location": {
"lat": 38.719,
"lng": -77.1067
},
"storeId": "STORE_ID_123456",
"name": "My Cool Store",
"address": {
"lines": [
"Building Centre",
"26 Store Street"
],
"countryCode": "UK",
"city": "London",
"zipcode": "WC1E 7BT"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "Europe/London",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
},
"special": {
"2015-02-07": [
{
"start": "08:00",
"end": "23:00"
}
]
}
}
},
{
"types": [
"drive"
],
"tags": [
"covered_parking"
],
"location": {
"lat": 38.5239,
"lng": -77.0157
},
"storeId": "STORE_ID_45678",
"name": "My Cool Store 2",
"address": {
"lines": [
"1805-1899",
"Orchard St"
],
"countryCode": "US",
"city": "Alexandria",
"zipcode": "22309"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "America/New_York",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
}
}
}
]
})
headers = {
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
"stores": [
{
"types": [
"drive",
"click_and_collect"
],
"tags": [
"wifi",
"covered_parking"
],
"location": {
"lat": 38.719,
"lng": -77.1067
},
"storeId": "STORE_ID_123456",
"name": "My Cool Store",
"address": {
"lines": [
"Building Centre",
"26 Store Street"
],
"countryCode": "UK",
"city": "London",
"zipcode": "WC1E 7BT"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "Europe/London",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
},
"special": {
"2015-02-07": [
{
"start": "08:00",
"end": "23:00"
}
]
}
}
},
{
"types": [
"drive"
],
"tags": [
"covered_parking"
],
"location": {
"lat": 38.5239,
"lng": -77.0157
},
"storeId": "STORE_ID_45678",
"name": "My Cool Store 2",
"address": {
"lines": [
"1805-1899",
"Orchard St"
],
"countryCode": "US",
"city": "Alexandria",
"zipcode": "22309"
},
"contact": {
"website": "https://www.woosmap.com",
"phone": "+44 20 7693 4000",
"email": "[email protected]"
},
"userProperties": {
"some_user_properties": "associated user value"
},
"openingHours": {
"timezone": "America/New_York",
"usual": {
"1": [],
"default": [
{
"start": "08:30",
"end": "22:00"
}
]
}
}
}
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY',
headers: {
'content-type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
{
"status": "success",
"value": "2 stores"
}
{
"status": "error",
"value": "The request is invalid, the data is not a valid JSON."
}
{
"detail": "Incorrect authentication credentials. Please check or use a valid API Key"
}
{
"detail": "This Woosmap API is not enabled for this project."
}