API Reference

Complete REST API documentation for BareCommerce Core. All endpoints are store-scoped and require authentication.

Base URL

https://api.barecommercecore.com

Authentication

Include your API key in the request header:

Authorization: Bearer sk_live_your_key_here

Or use the X-API-Key header:

X-API-Key: sk_live_your_key_here

See 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}/webhooks

Response 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:

ParameterTypeDefaultMaxDescription
limitinteger50200Results per page
offsetinteger0Number of items to skip
GET /stores/{storeId}/products?limit=20&offset=40

HTTP Status Codes

StatusDescription
200Success
201Created
204No Content (successful delete)
400Bad Request / Validation Error
401Unauthorized (missing/invalid API key)
403Forbidden (insufficient scopes)
404Not Found
409Conflict (duplicate, invalid state)
429Rate Limited
500Internal 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

PlanRequests/MinuteBurst
Free6010
Pro30050
EnterpriseCustomCustom

Full API Contract

For detailed request/response schemas and field descriptions, see the Canonical API Contract (opens in a new tab).