Skip to main content
Get a token, choose a project and read its locations. This quickstart only reads data. JavaScript examples use Node.js 22 or later; PHP examples use PHP 8.2 or later with the cURL extension. No SDK is required.

1. Create a token

Open API Tokens, create a token with location:read, and copy the token shown. Location endpoints also require API access on the project, available on the Business plan. Set the token in the terminal where you will run your integration:
Terminal
Replace YOUR_TOKEN with your token. Keep it on your server, in an environment variable or secret manager. Do not include it in public browser JavaScript or your repository. See authentication for permissions and revocation.

Test in your browser

  1. Open List projects and click Try it beside the endpoint URL.
  2. Paste the token into Authorization without the Bearer prefix, then click Send.
  3. Check for 200 OK and a data array. Copy the id of the project you want to use.
  4. Open List locations, click Try it, enter the project ID, and click Send. Expect 200 OK with data, links and meta.
The four GET endpoints have browser testing. Requests go directly to StoreRocket and only run when you click Send. Their forms read data; they do not change locations. The result marked with an HTTP status is your request’s response. Example response shows a fixed illustration; the code tabs are templates you can copy and run separately. Create, update and delete requests use the runnable cURL, JavaScript and PHP examples. See test an update for a request and the result to check.

2. Find your project ID

Choose your language and run the request below. Save JavaScript as request.mjs and run node request.mjs; save PHP as request.php and run php request.php. cURL runs directly in your terminal.
A successful request returns 200 with a data array. Choose the project you intend to manage; do not assume the first one is correct.
Example response
Use the returned public id, kept as a string. Set it in the same terminal:
Terminal

3. Read locations

The result contains data, links and meta. data is an array, including when there is one location. A project with no locations returns an empty array. This request reads the first page; use the pagination guide to read every page.

If your request fails

The error reference explains field validation and safe retries. JavaScript and PHP examples report the HTTP status and error body instead of treating an API error as success.

Build your integration

Sync location updates

Read every page, preview changes and apply them with PATCH.

API reference

Find methods, field names, filters and response formats.