Skip to content

API Overview

The Storelayer API is a RESTful API that uses JSON for request and response bodies. All endpoints are served from https://api.storelayer.io.

https://api.storelayer.io/v1

All API requests require authentication. See Authentication for details.

  • Use Content-Type: application/json for all requests with a body
  • All request bodies must be valid JSON
  • Dates use ISO 8601 format (2025-01-15T10:30:00Z)
  • Monetary values are in cents (e.g., 4999 = $49.99)

All responses follow a consistent envelope:

// Success
{
"success": true,
"data": { ... }
}
// Success with pagination
{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 142
}
}
// Error
{
"success": false,
"error": {
"code": 400,
"message": "Validation error: email is required"
}
}
CodeMeaning
200Success
201Created
400Bad request / validation error
401Unauthorized — invalid or missing credentials
403Forbidden — insufficient permissions
404Resource not found
409Conflict — resource already exists
429Rate limit exceeded
500Internal server error

List endpoints support pagination with query parameters:

GET /v1/customers?page=2&limit=50
ParameterDefaultMaxDescription
page1Page number
limit20100Items per page

For POST requests, include an Idempotency-Key header to safely retry requests:

Terminal window
curl -X POST https://api.storelayer.io/v1/wallets/{id}/credit \
-H "Idempotency-Key: unique-request-id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"amount": 100}'
ResourceEndpointDescription
Customers/v1/customersManage customers
Wallets/v1/walletsPoints & ledger
Promotions/v1/promotionsOffers & coupons
Events/ingest/eventsEvent tracking
Referrals/v1/referralsReferral programs
Catalog/v1/catalogProducts
Stores/v1/storesLocations