API Reference
Complete REST API documentation for BareCommerce Core. All endpoints are store-scoped and require authentication.
Base URL
https://api.barecommercecore.comAuthentication
Include your API key in the request header:
Authorization: Bearer sk_live_your_key_hereOr use the X-API-Key header:
X-API-Key: sk_live_your_key_hereSee Authentication for details on creating and managing API keys.
Store-Scoped Endpoints
All resource endpoints are scoped to a store:
/stores/{storeId}/products
/stores/{storeId}/orders
/stores/{storeId}/customers
/stores/{storeId}/categories
/stores/{storeId}/media
/stores/{storeId}/webhooksResponse Format
Success Response (Single Item)
{
"item": {
"id": "prod_abc123",
"title": "Product Name",
...
}
}Success Response (List)
{
"items": [
{ "id": "prod_abc123", ... },
{ "id": "prod_def456", ... }
],
"total": 100
}Error Response
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": [
{ "field": "price", "reason": "Must be a positive number" }
]
}
}Pagination
All list endpoints support pagination:
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
| limit | integer | 50 | 200 | Results per page |
| offset | integer | 0 | — | Number of items to skip |
GET /stores/{storeId}/products?limit=20&offset=40HTTP Status Codes
| Status | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content (successful delete) |
| 400 | Bad Request / Validation Error |
| 401 | Unauthorized (missing/invalid API key) |
| 403 | Forbidden (insufficient scopes) |
| 404 | Not Found |
| 409 | Conflict (duplicate, invalid state) |
| 429 | Rate Limited |
| 500 | Internal Server Error |
API Resources
Products
Create, read, update, and delete products. Manage variants, attributes, inventory, and SEO metadata.
Orders
Create orders, manage status transitions, process refunds, and track fulfillment.
Customers
Manage customer profiles, multiple addresses, and marketing preferences.
Categories
Organize products into a hierarchical category structure with up to 2 levels.
Inventory
Track stock levels, handle overselling, and manage inventory via the Products API.
Media
Upload and manage images for products, categories, and pages. CDN delivery included.
Webhooks
Subscribe to real-time notifications for product, order, and customer events.
Rate Limits
| Plan | Requests/Minute | Burst |
|---|---|---|
| Free | 60 | 10 |
| Pro | 300 | 50 |
| Enterprise | Custom | Custom |
Full API Contract
For detailed request/response schemas and field descriptions, see the Canonical API Contract (opens in a new tab).