The SnowBee Public API allows you to integrate your e-commerce platform with SnowBee's inventory and order management system. This guide will help you get started with authentication and making your first API calls.
Before you begin, you'll need:
The SnowBee API uses OAuth 2.0 with the client credentials flow. To authenticate, make a POST request to the token endpoint:
POST https://api.snowbee.no/v1/tenants/TENANT_ID/oauth2/v2.0/token
Content-Type: application/json
{
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"grant_type": "client_credentials",
"scope": "ecom",
"resource": "your-ecom-store-id"
}
| Parameter | Description |
|---|---|
client_id | Your API client identifier |
client_secret | Your API client secret |
grant_type | Must be client_credentials |
scope | Either ecom or loyalty_programs |
resource | The ID of the eCom Store or Loyalty Program you want to access |
{
"expires_in": 3600,
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
The access_token is a JWT that expires in 1 hour (3600 seconds). Include it in the
Authorization header for all subsequent API calls:
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
All API requests should be made to:
https://api.snowbee.no/v1/tenants/TENANT_ID/ecom_stores/ECOM_STORE_ID/
Replace TENANT_ID and ECOM_STORE_ID with your actual values.
The API enforces rate limiting to ensure fair usage:
If you exceed the rate limit, you'll receive a 429 Too Many Requests response. Implement exponential backoff in your client.
| Endpoint | Description |
|---|---|
GET /products/:productId | Get product details with SKUs, images, and prices |
GET /skus/:skuId/inventory | Get inventory availability by location |
GET /campaigns | List active and planned campaigns with SKU pricing |
POST /products/trigger_events | Trigger ProductSaved events for initial sync |
POST /inventory/trigger_events | Trigger InventoryOnHandChanged events for initial sync |
| Endpoint | Description |
|---|---|
GET /product_schema/brands | List all brands |
GET /product_schema/product_categories | List product categories |
GET /product_schema/main_product_groups | List main product groups |
GET /product_schema/sub_product_groups | List sub product groups |
GET /product_schema/product_concepts | List product concepts |
GET /product_schema/exclusivity_levels | List exclusivity levels |
GET /product_schema/main_activities | List main activities |
GET /product_schema/product_colors | List colors with color codes |
GET /product_schema/sizes | List sizes with sort order |
GET /product_schema/dynamic_attributes | List custom attributes |
GET /product_schema/dynamic_attributes_options | List options for dynamic attributes |
GET /product_schema/unit_of_measures | List units of measure |
| Endpoint | Description |
|---|---|
POST /orders | Create a new sales order |
GET /orders/:orderId | Get order details including invoices |
| Endpoint | Description |
|---|---|
PUT /customers/:customerId | Create or update customer (idempotent) |
GET /customers/:customerId | Get customer details |
PUT /customers/:customerId/addresses | Update customer delivery and invoice addresses |
GET /customers/:customerId/orders | Get customer order history |
PUT /push-customer | Create/update customer by phone number |
| Endpoint | Description |
|---|---|
POST /click_and_collect | Create a click & collect reservation |
GET /retail_stores | List retail stores for click & collect |
curl -X POST "https://api.snowbee.no/v1/tenants/TENANT_ID/ecom_stores/ECOM_STORE_ID/orders" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customerId": "019c1234-5678-7abc-8def-123456789012",
"deliveryAddress": {
"name": "John Doe",
"street": "Main Street 1",
"postCode": "0123",
"city": "Oslo",
"countryIsoCode": "NO",
"email": "john@example.com",
"phone": "+4712345678"
},
"invoiceAddress": {
"street": "Main Street 1",
"postCode": "0123",
"city": "Oslo",
"countryIsoCode": "NO",
"email": "john@example.com"
},
"lineItems": [
{
"skuId": "019c1234-5678-7abc-8def-123456789013",
"quantity": 2,
"netUnitPrice": 199.00,
"vatRate": 25.00
}
]
}'
You can identify SKUs in line items using either skuId or skuNumber:
// Using SKU ID (UUID)
{ "skuId": "019c1234-5678-7abc-8def-123456789013", "quantity": 2, ... }
// Using SKU number (your product code)
{ "skuNumber": "PROD-BLK-M", "quantity": 2, ... }
At least one of skuId or skuNumber must be provided for each line item.
skuId or skuNumbercustomerId is optional - if omitted, the store's default customer is usedcurl -X POST "https://api.snowbee.no/v1/tenants/TENANT_ID/ecom_stores/ECOM_STORE_ID/click_and_collect" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"retailStoreId": "019c1234-5678-7abc-8def-123456789012",
"reservationName": "John Doe",
"customerId": null,
"lineItems": [
{
"skuId": "019c1234-5678-7abc-8def-123456789013",
"quantity": 1
}
]
}'
Response:
{
"parkedCartId": "019c1234-5678-7abc-8def-123456789014",
"cartId": "019c1234-5678-7abc-8def-123456789015",
"reservationName": "John Doe",
"retailStoreId": "019c1234-5678-7abc-8def-123456789012",
"retailStoreName": "Oslo Store",
"lineItems": [
{
"cartLineId": "019c1234-5678-7abc-8def-123456789016",
"skuId": "019c1234-5678-7abc-8def-123456789013",
"skuNumber": "SKU-001",
"productName": "Blue T-Shirt",
"quantity": 1,
"reservedFromWarehouse": "Oslo Store Warehouse"
}
],
"createdAt": "2025-01-20T10:30:00.000Z"
}
curl -X GET "https://api.snowbee.no/v1/tenants/TENANT_ID/ecom_stores/ECOM_STORE_ID/campaigns" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
{
"campaigns": [
{
"id": "019c1234-5678-7abc-8def-123456789012",
"code": "SUMMER24",
"name": "Summer Sale 2024",
"validFrom": "2024-06-01",
"validTo": "2024-08-31",
"currencyIsoCode": "NOK",
"status": "ACTIVE",
"skus": [
{
"skuId": "019c1234-5678-7abc-8def-123456789013",
"campaignPrice": 299.00
}
]
}
]
}
Campaign statuses:
PLANNED - Campaign is scheduled but not yet activeACTIVE - Campaign is currently runningThe API returns standard HTTP status codes:
| Status Code | Description |
|---|---|
200 | Success |
201 | Created successfully |
400 | Bad request - check your request body |
401 | Unauthorized - invalid or expired token |
403 | Forbidden - you don't have access to this resource |
404 | Not found - resource doesn't exist or SKU not in assortment |
409 | Conflict - e.g., duplicate customer phone/email |
429 | Too many requests - rate limit exceeded |
500 | Internal server error |
Error responses include a JSON body with details:
{
"error": "INVALID_REQUEST",
"message": "Order must contain at least one line item"
}
| Error Code | Description |
|---|---|
INVALID_REQUEST | Request validation failed (missing fields, invalid format) |
BAD_REQUEST | Request body could not be parsed (invalid JSON, wrong types) |
SKU_NOT_FOUND | SKU not found in store assortment. Message includes the SKU ID or number. |
CUSTOMER_NOT_FOUND | Customer with the specified ID does not exist |
UNAUTHORIZED | Missing or invalid authentication token |
FORBIDDEN | Token valid but lacks permission for this resource |
+4712345678)