CRUD API V3
You need an APITOKEN to access api v3. Please contact our support to obtain it. In this example, API token is e165ba2c55ba47c8c3ab4a9ecabad247. Replace it with your api token
Create a store
POST https://www.storemapper.co/api/v3/stores/
Example Request
curl https://www.storemapper.co/api/v3/stores \ -u e165ba2c55ba47c8c3ab4a9ecabad247: \ -d name="The Central Store" \ -d address="New York City"
Valid Arguments
name, address, phone, email, url, description, tags, custom_fields, image_url, custom_marker_url, latitude, longitude, hidden(true/false), tier
Mandatory: name, address
Example Request Body
{ "address": "Calle Gran Vía, 67, Madrid, Spain", "phone": "", "name": "Test Store", "latitude": 40.4226995, "longitude": -3.7100868, "url": "", "email": "", "description": "", "tier": null, "image_url": "", "custom_marker_url": "", "hidden": false, "color_marker": null, "tags": { "Animals": [ "Dogs", "Cats" ], "Colours": [ "Red", "Green" ] }, "custom_fields": { "field1": { "value": "test_value", "display_text": null }, "field 2": { "value": "test_value", "display_text": null }, "field3": { "value": "test_value", "display_text": null } } }
Query Stores
GET https://www.storemapper.co/api/v3/stores/query
Stores can be queried by partial name and address
Example
curl https://www.storemapper.co/api/v3/stores/query \ -u e165ba2c55ba47c8c3ab4a9ecabad247: \ -d name="Central" \ -d address="New York" \ -X GET
Valid Arguments
name, address
Example Response
[ { "id": 6386052, "created_at": "2018-04-19T20:17:51.220-04:00", "updated_at": "2018-04-19T20:17:51.220-04:00", "address": "New York City", "phone": null, "name": "The Central Store", "latitude": null, "longitude": null, "user_id": 2121, "url": null, "email": null, "description": null, "tier": null, "category": null, "custom_field_1": null, "custom_field_2": null, "custom_field_3": null, "image_url": null, "custom_marker_url": null, "last_geocoded_by": null, "last_geocoded_on": null, "long_google_place_id": null, "long_formatted_address": null, "hidden": false } ]
Update A Store
PUT https://www.storemapper.co/api/v3/stores/:id
By using the store :id, you can update a store using the same set arguments as creation. Get the store id by querying the store.
Example
curl https://www.storemapper.co/api/v3/stores/6386052 \ -u e165ba2c55ba47c8c3ab4a9ecabad247: \ -d name="The Middle Store" \ -d address="New York, United States" \ -X PUT \
Valid Arguments
name, address, phone, email, url, description, tags, custom_fields, image_url, custom_marker_url, latitude, longitude, hidden(true/false), tier
Mandatory: name, address
Example Response
{ "address": "Calle Gran Vía, 67, Madrid, Spain", "phone": "", "name": "Test Store", "latitude": 40.4226995, "longitude": -3.7100868, "url": "", "email": "", "description": "", "tier": null, "image_url": "", "custom_marker_url": "", "hidden": false, "color_marker": null, "tags": { "Animals": [ "Dogs", "Cats" ], "Colours": [ "Red", "Green" ] }, "custom_fields": { "field1": { "value": "test_value", "display_text": null }, "field 2": { "value": "test_value", "display_text": null }, "field3": { "value": "test_value", "display_text": null } } }
Delete A Store
You can also delete a store by specifying it’s id
Example
curl https://www.storemapper.co/api/v3/stores/6386052 \ -u e165ba2c55ba47c8c3ab4a9ecabad247: \ -X DELETE \
Response will be empty with 204 status
Quick note - Value is the value of the field.
Display text only matters for some fields. (Email, URL & File Type)
e.g. if the type of field is URL or file, you can add a display text to not show the link and show a text in the field
If the type of the field text, you can ignore the display text