Base path: /v1/backend/integrations/bees/promotions
Headers (all endpoints):
Authorization: Bearer <token>
x-app-stage: <stage>
x-app-uid: <application_uuid>
Middleware: company-validator, online-store-validator, bees-request-logger.
Returns active promotions cached in CouchDB (bees-cached-promotions) for the specified company, online store, and distribution center. Source: ListBeesPackPromotionsAction.
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId |
Integer | Yes | Company scope identifier |
storeId |
Integer | Yes | Online store identifier |
distributionCenterId |
Integer | Yes | Online store distribution center identifier |
id |
Integer / String | No | Filter by specific promotion code / id |
200 OKStandard ActionResult:
{
"success": true,
"message": "Promociones obtenidas correctamente ..",
"data": [
{
"code": "21123458",
"title": "3 PL + 1PL PAÑAL HAS BIGPACK - XXG",
"description": "3 PL + 1PL PAÑAL HAS BIGPACK - XXG",
"startDate": "2026-08-01",
"endDate": "2026-08-31",
"distributionCenterId": 8,
"promotionType": "FREE_GOOD",
"scope": "PRICE_LIST",
"scopeCodes": [
"12-11IC01",
"12-11NZ01",
"11-11IC02",
"11-11NZ02"
],
"purchaseProducts": [
{
"productCode": "KCP244283",
"unitMeasure": "PZA"
}
],
"minimumPurchase": 3,
"rangeTriggerType": "QUANTITY",
"itemControl": false,
"giftProducts": [
{
"productCode": "KCP247156",
"unitMeasure": "PZA"
}
],
"giftQuantity": 1,
"proportional": true,
"ranges": []
}
]
}
Executes BuildBeesPromotionsCacheBuilderAction (default builder=v2 → BuildBeesPromotionsActionV2): validates store scope, queries active GOAL Couch promotions, maps one cache row per applicable DC (code suffix {base}-{dcBranchCode}, sourcePromotionUuid on cache docs), validates against jsonc contracts, purges each (store, DC) partition, bulk-inserts.
Legacy builder=v1 invokes frozen BuildBeesPromotionsAction.
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId |
Integer | Yes | Company scope identifier |
storeId |
Integer | Yes | Online store identifier |
distributionCenterId |
Integer | No | If omitted or 0, rebuild all active DCs on the store; otherwise single partition |
builder |
String | No | v2 (default) or v1 |
promotionUuid |
String (UUID) | No | Build cache for a single GOAL promotion only (v2) |
promotion |
String (UUID) | No | Alias of promotionUuid |
200 OK{
"success": true,
"message": "Caché de promociones BEES actualizado correctamente",
"data": {
"company_id": 1,
"store_id": 1,
"distribution_center_id": null,
"total_cached": 12,
"per_distribution_center": {
"8": { "total_cached": 4, "stats": {} }
},
"builder": "v2"
}
}
Returns promotions that have been deleted, closed, or deactivated in the ERP/GOAL system that must be purged from BEES via the DELETE verb of the BEES Ingestion Relay Service. Source: ListBeesPromotionsForDeleteAction.
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId |
Integer | Yes | Company scope identifier |
storeId |
Integer | Yes | Online store identifier |
distributionCenterId |
Integer | Yes | Online store distribution center identifier |
200 OK{
"success": true,
"message": "Promociones para eliminar obtenidas con éxito",
"data": [
{
"code": "20123461",
"vendorPromotionId": "20123461",
"vendorDealId": "20123461"
}
]
}
| Code | When |
|---|---|
200 |
Successful execution |
400 |
Bad request parameters |
401 |
Unauthorized: Missing or invalid JWT Bearer token |
403 |
Forbidden: Insufficient permissions for company/store scope |
404 |
Company, online store or distribution center not found |
422 |
Scope validation failed |
500 |
Internal server or CouchDB connection error |
goal-backend/resources/bees/promotions/promotions-memo.mdgoal-backend/docs/integrations/bees/BEES_PROMOTIONS_CACHING.md