Locations
Create a location
Add a location, with or without a street address or opening hours.
POST
Requires
JavaScript examples run in Node.js 22 or later; PHP examples require PHP 8.2 or later with cURL. Both read
Do not send an hours array or weekday objects containing
location:create and project API access. Returns 200 and the location resource, with a geocoding object next to data describing the address lookup.
Run this request with the cURL, JavaScript or PHP examples. It creates a real location; the example sets
visible to false so it stays hidden from the locator.STOREROCKET_TOKEN from your environment. See the quickstart for setup.
Opening hours
Omithours or send {} for a location without hours. You do not need to invent opening times for coming-soon locations.
A nonempty POST hours object requires all seven weekdays. Use short keys mon, tue, wed, thu, fri, sat, sun, or the corresponding full weekday names.
Values are time-range strings, closed, or null for an unset day:
open/close keys.
Additional fields
The response’s
socials list is derived; send individual public social field names when writing.
POST can geocode synchronously when either coordinate is missing or zero. Supplying both nonzero coordinates avoids depending on a geocoding result. Check geocoding.status in the response: approximate means only a rough match was found, such as the town or postcode area, and the location was placed there. Zero passes validation, but POST and PUT retain this older geocoding behavior; PATCH preserves supplied zero coordinates.
Errors: 401, 403, 404, 422, 429. Invalid input does not create a partially populated location. See errors.