Skip to main content

API Authentication

To interact with the StoreLinkr REST API, you must authenticate your requests using two custom HTTP headers. These headers identify your application and ensure that you have permission to access the requested data.

Required Headers​

Every request to the StoreLinkr API must include the following headers:

HeaderDescription
X-StoreLinkr-Api-KeyYour unique API Token.
X-StoreLinkr-Api-SecretYour private API Secret.

Obtaining Your Credentials​

You can manage your API credentials within the StoreLinkr dashboard.

  1. Go to Settings > API Keys.
  2. Create a new set of keys or use an existing one.
  3. Your API Token corresponds to X-StoreLinkr-Api-Key.
  4. Your API Secret corresponds to X-StoreLinkr-Api-Secret.
warning

Protect your API Secret! The secret should never be shared publicly, committed to version control, or exposed in client-side code (like JavaScript running in a browser). If you suspect your secret has been compromised, revoke the key immediately in the dashboard.

API Key Scopes​

Each API key can be limited to a set of scopes, the actions it is allowed to perform. This lets you hand out a key that can, for example, only read stock, without giving it permission to change your catalog or read orders.

  • By default a new key can do everything. If you leave the scopes empty ("All actions"), the key has full access to the API.
  • As soon as you select one or more scopes, the key is restricted to only those actions. Any request outside its scopes is rejected with a 403 Forbidden.

You manage scopes per key under Settings > API Keys: click a key and tick the actions it may perform.

Available scopes​

ScopeAllows
catalog:readRead products, categories, variants and feeds.
catalog:writeCreate, update and archive products and categories.
ecommerce:readRead sales-channel products and product rules.
ecommerce:writeCreate, update and delete product rules.
orders:readRead orders.
orders:writeCreate orders.
stock:readRead stock information and stock mutations.
tip

Grant the least access a key needs. A key used only to read stock levels should have just stock:read.

Basic authentication​

Instead of the two headers you can also use HTTP Basic authentication, with the API Token as the username and the API Secret as the password.

Pagination, rate limits and errors​

  • Pagination: list endpoints accept limit and page and return a pagination object with pages, page, limit, offset and totalRecords. Keep requesting pages until you reach pages.
  • Rate limits: requests are limited per project. You can send a burst of up to 120 requests, after which the allowance refills at 10 requests per minute. When it is empty the API answers 429 Too Many Requests with a Retry-After header that holds the number of seconds to wait. Use larger limit values and filters instead of many small calls.
  • Errors: an error has the same shape as a success, with "status": "failed", a message and a matching HTTP status: 400 invalid request, 401 missing or invalid key, 403 the key lacks the scope, 404 not found in your project, 409 conflict with the current state, 429 rate limit reached.

The interactive API documentation has a quick start, all endpoints grouped per area (Catalog, eCommerce, Stock, Orders and Product feeds) and a Download button for the OpenAPI file, which you can use to generate a client in your own language. It follows the same day and night setting as the portal.

Example Requests​

Using cURL​

curl -X GET "https://api.storelinkr.com/api/public/v2/catalog/products" \
-H "X-StoreLinkr-Api-Key: your_api_token_here" \
-H "X-StoreLinkr-Api-Secret: your_api_secret_here" \
-H "Accept: application/json"

Using PHP (Guzzle)​

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://api.storelinkr.com/api/public/v2/catalog/products', [
'headers' => [
'X-StoreLinkr-Api-Key' => 'your_api_token_here',
'X-StoreLinkr-Api-Secret' => 'your_api_secret_here',
'Accept' => 'application/json',
]
]);

$body = json_decode($response->getBody(), true);

Troubleshooting Authentication​

If you receive a 401 Unauthorized response:

  • Double-check that both X-StoreLinkr-Api-Key and X-StoreLinkr-Api-Secret headers are present and correctly spelled.
  • Verify that the values match exactly what is shown in the StoreLinkr dashboard.
  • Ensure the API key has not been revoked.
  • Check that you are sending the headers with the correct case (though HTTP headers are generally case-insensitive, following the standard casing is recommended).