Send and Update Stores Data

Hox to manage your stores data on Woosmap servers
  1. Upload assets data using Woosmap Data API
  2. Supported HTTTP methods
  3. Structure of requests
    1. Data sent
  4. Managing assets data
    1. Create assets data
    2. Updating assets data
    3. Deleting an asset
    4. Replace all assets

Upload assets data using Woosmap Data API

You’ll need to upload your assets data file through Woosmap Data API. The API can be accessed through https://api.woosmap.com. It takes a mandatory parameter : your private key. Therefore the url you’ll call should look like this:

https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_KEY

Supported HTTTP methods

use this method to add new assets from a JSON file (assets whose ids are not already in the database). Ex : https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_KEY

use this method with api.woosmap.com to update assets from a JSON file. Add the store_id of an asset to update it. Ex : https://api.woosmap.com/stores/12/?private_key=YOUR_PRIVATE_KEY

use this method with api.woosmap.com to delete all store. Add the store_id of an asset to delete one. Ex : https://api.woosmap.com/stores/12/?private_key=YOUR_PRIVATE_KEY

Structure of requests

All data sent and received are in JSON format.

Data sent

The data sent through POST and PUT methods should be in the following format:

{
    "stores": [{"storeId": "0", "key": "value"}]
}

Each element of the stores array must be in the format explained here .

Managing assets data

The restrictions on POST and PUT on storeIds are made to ensure identifier stability.

Create assets data

Used to create assets in batch.

Warning: storeId must not exists when using POST method, if one store already exists, the batch will be refused.

curl -X POST \
	-H 'Content-Type: application/json' \
	-d @data.json \
	'https://api.woosmap.com/stores?private_key={private_key}'

Updating assets data

Used to update assets in batch.

Warning: storeId must exists when using PUT method, if one asset does not exists, the batch will be refused.

curl -X PUT \
	-H 'Content-Type: application/json' \
	-d @data.json \
	'https://api.woosmap.com/stores?private_key={private_key}'

Deleting an asset

You can delete an asset using the following url, the storeId is the id you defined.

curl -X DELETE \
	'https://api.woosmap.com/stores/{storeId}?private_key={private_key}'

Replace all assets

You can replace all assets of a Project using the following url.

curl -X POST \
	-H 'Content-Type: application/json' \
	-d @data.json \
	'https://api.woosmap.com/stores/replace?private_key={private_key}'

This command will delete all previous assets and import assets from the json file.

During the operation previous assets could always be displayed on map.

If the import failed previous assets will not be deleted.