Download OpenAPI specification:Download
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 100 ] Default: 25 Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| search | string Filter by full text search |
| tags | string Filter by all of these tags (AND logic). Comma-separated. |
| tagsAny | string Filter by any of these tags (OR logic). Comma-separated. |
| status | string Enum: "draft" "published" "disabled" "archived" The status of the coupon book |
| locale | string Translation locale requested for the coupon |
| audiences | string |
| locations | string |
| categories | string |
| productCategories | string |
| paymentMethods | string |
| channels | string |
| daysOfWeek | string |
| validFromDate | string <date-time> |
| validToDate | string <date-time> |
| loyaltyProgramKey | string |
| externalId | string |
| type | string Enum: "single" "list" "generated" "codeless" |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/coupon-books?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
]
}| externalId | string |
| rankingIndex | number |
| audienceKeys | Array of strings |
| name required | string |
| description | string |
| subtitle | string |
| pictureUrl | string |
| detailPictureUrl | string |
| images | object Named image URLs as key-value pairs (e.g., main, detail, thumbnail) |
| customAttributes | object |
| condition | object |
| type required | string Enum: "single" "list" "generated" "codeless" Type of coupon book |
| discountAmount | number |
| discountType | string |
| tags | Array of strings |
| publishingStatus required | string Enum: "draft" "published" "disabled" "archived" Publishing status of the coupon book |
| validFromDate | string <date-time> |
| validToDate | string <date-time> |
| maxAssignedPerMember | number |
| maxAssignedPerCoupon | number |
| maxCouponCount | number |
| defaultLocale | string |
| assignmentRequiredPoints | number |
| usageRequiredPoints | number |
| contentSchemaId | number |
| contentSchemaVersionId | number |
| locations | Array of strings Locations for filtering coupon books by location |
| categories | Array of strings Categories for filtering coupon books by category |
| productCategories | Array of strings Product categories for filtering coupon books by product category |
| paymentMethods | Array of strings Payment methods for filtering coupon books by location |
| channels | Array of strings Channels for filtering coupon books by category |
| maxDiscountPerPeriod | number Maximum discount amount allowed per period |
| discountPeriodType | string Enum: "daily" "weekly" "monthly" Period type for discount limit |
| timezone | string IANA timezone string for period calculations (e.g., America/Argentina/Buenos_Aires, Europe/Madrid) |
| maxUsagesPerPeriod | number Maximum number of usages allowed per period |
| usagePeriodType | string Enum: "daily" "weekly" "monthly" Period type for usage limit |
| daysOfWeek | Array of numbers Days of week when coupon book is available (1=Monday, 7=Sunday) |
| maxDiscountPerUse | number Maximum discount amount allowed per use |
| locale | string Locale |
| content | object Content of the coupon book |
| isDefaultLocale | boolean Is the locale default |
| requiredPointsConfig required | object (RequiredPointsConfig) |
| tiers | Array of numbers Tiers |
| loyaltyProgramKey | string |
{- "externalId": "string",
- "rankingIndex": 0,
- "audienceKeys": [
- "string"
], - "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": {
}, - "customAttributes": { },
- "condition": { },
- "type": "single",
- "discountAmount": 0,
- "discountType": "string",
- "tags": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "contentSchemaId": 0,
- "contentSchemaVersionId": 0,
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "maxDiscountPerUse": 1000,
- "locale": "string",
- "content": { },
- "isDefaultLocale": true,
- "requiredPointsConfig": { },
- "tiers": [
- 0
], - "loyaltyProgramKey": "string"
}{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
}| couponBookKey required | string |
| locale | string Translation locale requested for the coupon |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/coupon-books/{couponBookKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
}| couponBookKey required | string |
| externalId | string |
| rankingIndex | number |
| audienceKeys | Array of strings |
| description | string |
| subtitle | string |
| pictureUrl | string |
| detailPictureUrl | string |
| images | object Named image URLs as key-value pairs (e.g., main, detail, thumbnail) |
| customAttributes | object |
| condition | object |
| discountAmount | number |
| discountType | string |
| tags | Array of strings |
| validFromDate | string <date-time> |
| validToDate | string <date-time> |
| maxAssignedPerMember | number |
| maxAssignedPerCoupon | number |
| maxCouponCount | number |
| defaultLocale | string |
| assignmentRequiredPoints | number |
| usageRequiredPoints | number |
| contentSchemaId | number |
| contentSchemaVersionId | number |
| locations | Array of strings Locations for filtering coupon books by location |
| categories | Array of strings Categories for filtering coupon books by category |
| productCategories | Array of strings Product categories for filtering coupon books by product category |
| paymentMethods | Array of strings Payment methods for filtering coupon books by location |
| channels | Array of strings Channels for filtering coupon books by category |
| maxDiscountPerPeriod | number Maximum discount amount allowed per period |
| discountPeriodType | string Enum: "daily" "weekly" "monthly" |
| timezone | string IANA timezone string for period calculations (e.g., America/Argentina/Buenos_Aires, Europe/Madrid) |
| maxUsagesPerPeriod | number Maximum number of usages allowed per period |
| usagePeriodType | string Enum: "daily" "weekly" "monthly" |
| daysOfWeek | Array of numbers Days of week when coupon book is available (1=Monday, 7=Sunday) |
| maxDiscountPerUse | number Maximum discount amount allowed per use |
| locale | string Locale |
| content | object Content of the coupon book |
| isDefaultLocale | boolean Is the locale default |
| requiredPointsConfig required | object (RequiredPointsConfig) |
| name | string The name of the coupon book |
| extraFields | object content extra fields |
| tiers | Array of numbers Tiers |
| loyaltyProgramKey | string |
{- "externalId": "string",
- "rankingIndex": 0,
- "audienceKeys": [
- "string"
], - "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": {
}, - "customAttributes": { },
- "condition": { },
- "discountAmount": 0,
- "discountType": "string",
- "tags": [
- "string"
], - "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "contentSchemaId": 0,
- "contentSchemaVersionId": 0,
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "maxDiscountPerUse": 1000,
- "locale": "string",
- "content": { },
- "isDefaultLocale": true,
- "requiredPointsConfig": { },
- "name": "string",
- "extraFields": { },
- "tiers": [
- 0
], - "loyaltyProgramKey": "string"
}{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
}| couponBookKey required | string |
| publishingStatus required | string Enum: "draft" "published" "disabled" "archived" Status of the coupon book |
{- "publishingStatus": "draft"
}{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
}| couponBookKey required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
curl -X GET https://api.sandbox.qurable.io/v2/coupon-books/{couponBookKey}/coupons
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "code": "string",
- "totalAssigned": 0,
- "totalUsages": 0,
- "customAttributes": { },
- "expiredAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| couponBookKey required | string |
| codes required | Array of strings Codes to be added |
{- "codes": [
- "string"
]
}{- "codes": {
- "code": "string",
- "totalAssigned": 0,
- "totalUsages": 0,
- "customAttributes": { },
- "expiredAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 100 ] Default: 25 Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| tags | string Filter by all of these tags (AND logic). Comma-separated. |
| tagsAny | string Filter by any of these tags (OR logic). Comma-separated. |
| validFromDate | string <date-time> |
| validToDate | string <date-time> |
| locale | string Translation locale requested for the coupon |
| locations | string |
| categories | string |
| productCategories | string |
| paymentMethods | string |
| channels | string |
| daysOfWeek | string |
| couponBookKey | string |
| withStockOnly | boolean |
| externalId | string |
| type | string Enum: "single" "list" "generated" "codeless" |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/members/{loyaltyMemberId}/coupon-books?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
]
}| loyaltyMemberId required | string |
| couponBookKey required | string |
| systemUniqueKey | string System Unique Key by Organization ID |
| code | string Code to be used |
| pendingCaptureLedgerTransactionId | string Ledger transaction ID |
| externalId | string External ID for tracking |
| pointsOverride | number Optional points override. Positive values burn points, negative values mint points, zero skips point transaction. When absent, uses coupon book configured points. |
| amountDiscounted | number The actual discount amount applied in this usage |
| usageData | object |
| autoAssign | boolean |
{- "systemUniqueKey": "string",
- "code": "string",
- "pendingCaptureLedgerTransactionId": "1234",
- "externalId": "ext-123",
- "pointsOverride": 100,
- "amountDiscounted": 0,
- "usageData": { },
- "autoAssign": true
}{- "status": "success",
- "message": "string",
- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "usageData": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "amountDiscounted": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| loyaltyMemberId required | string |
| couponBookKey required | string |
| amount | object Default: 1 Amount to be assigned for each code |
| pendingCaptureLedgerTransactionId | string Ledger transaction ID |
| externalId | string External ID for tracking |
| pointsOverride | number Optional points override. Positive values burn points, negative values mint points, zero skips point transaction. When absent, uses coupon book configured points. |
| systemUniqueKey | string |
| code | string |
| couponData | object |
| usageData | object |
| expiresAt | string <date-time> |
{- "amount": 1,
- "pendingCaptureLedgerTransactionId": "1234",
- "externalId": "ext-456",
- "pointsOverride": 50,
- "systemUniqueKey": "string",
- "code": "string",
- "couponData": { },
- "usageData": { },
- "expiresAt": "2019-08-24T14:15:22Z"
}{- "status": "success",
- "message": "string",
- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "usageData": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "amountDiscounted": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| notUsedOnly | boolean |
| couponBookTags | string Filter by coupon books with all of these tags (AND logic). Comma-separated. |
| couponBookTagsAny | string Filter by coupon books with any of these tags (OR logic). Comma-separated. |
| couponCode | string |
| couponBookKey | string |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/members/{loyaltyMemberId}/coupons?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "code": "string",
- "amountAssigned": 0,
- "amountUsed": 0,
- "couponData": { },
- "expiredAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
}
]
}| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| codes | Array of a[ items ] Filter coupon usages by coupon codes (exact match). Maximum 100 codes allowed. |
| fromCreatedAt | string <date-time> Filter coupon usages created from this date |
| toCreatedAt | string <date-time> Filter coupon usages created up to this date |
| unusedOnly | boolean Default: false When true, returns only assignation records (amountAssigned > 0) for coupon codes where the member still has available balance |
| couponBookTags | string Filter by coupon books with all of these tags (AND logic). Comma-separated. |
| couponBookTagsAny | string Filter by coupon books with any of these tags (OR logic). Comma-separated. |
| couponBookKey | string |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/members/CL-RUT-90892932/coupon-usages?page=0&limit=10&couponBookKey={couponBookKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "usageData": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "amountDiscounted": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| loyaltyMemberId required | string |
| couponUsageKey required | string |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/members/{loyaltyMemberId}/coupon-usages/{couponUsageKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "status": "success",
- "message": "string",
- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "usageData": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "amountDiscounted": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| loyaltyMemberId required | string |
| couponUsageKey required | string |
curl -X 'POST' \ 'https://api.sandbox.qurable.io/v2/members/{loyaltyMemberId}/coupon-usages/{couponUsageKey}/revert' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "status": "success",
- "message": "string",
- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "usageData": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "amountDiscounted": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}By default reverts the most recent unreverted usage. Use revertAll=true to revert all unreverted usages for this code. WARNING: revertAll=true can revert up to 100 usages - use with caution. Partial failures in batch mode will return a warning status with details.
| loyaltyMemberId required | string |
| couponBookKey required | string |
| couponCode required | string |
| revertAll | boolean Default: false When true, revert all unreverted usages for this coupon code (max 100 usages). Default: false |
{- "status": "success",
- "message": "string",
- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "usageData": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "amountDiscounted": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| code | string |
| couponBookKey | string |
| loyaltyMemberId | string |
| expired | boolean |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/coupons?code={code}?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "code": "string",
- "amountAssigned": 0,
- "assignments": [
- {
- "loyaltyMemberId": "string"
}
], - "amountUsed": 0,
- "customAttributes": { },
- "expiredAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "images": { },
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "tiers": [
- 0
], - "audienceKeys": [
- "string"
], - "publishingStatus": "draft",
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxAssignedPerMember": 0,
- "maxAssignedPerCoupon": 0,
- "maxCouponCount": 0,
- "totalAssigned": 0,
- "totalUsages": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultLocale": "string",
- "assignmentRequiredPoints": 0,
- "usageRequiredPoints": 0,
- "requiredPointsConfig": { },
- "discountAmount": 0,
- "discountType": "string",
- "locations": [
- "string"
], - "categories": [
- "string"
], - "productCategories": [
- "string"
], - "paymentMethods": [
- "string"
], - "channels": [
- "string"
], - "maxDiscountPerPeriod": 0,
- "discountPeriodType": "daily",
- "timezone": "string",
- "periodDiscountUsed": 0,
- "periodDiscountEndTime": "2019-08-24T14:15:22Z",
- "maxUsagesPerPeriod": 0,
- "usagePeriodType": "daily",
- "periodUsageCount": 0,
- "periodUsageEndTime": "2019-08-24T14:15:22Z",
- "daysOfWeek": [
- 0
], - "maxDiscountPerUse": 0
}
}
]
}| contentType | string Example: contentType=static Filter by content type |
| tags | Array of strings Filter by tags |
| page | number Default: 0 Example: page=0 Page number |
| limit | number Default: 20 Example: limit=20 Results per page |
| sort | string Example: sort=createdAt:desc Sort field and direction |
{- "results": [
- {
- "collectionKey": "products",
- "name": "products",
- "description": "Lorem ipsum",
- "slug": "string",
- "ftsFields": [
- "title",
- "brand"
], - "facetFields": {
- "price": "number"
}, - "jsonschema": { },
- "tags": [
- "promotion",
- "seasonal"
], - "contentType": "static",
- "createdAt": "2022-01-01T00:00:00.000Z",
- "updatedAt": "2022-01-01T00:00:00.000Z"
}
], - "totalCount": 0,
- "page": 0,
- "limit": 0
}| name required | string Collection name |
| description required | string Collection description |
| slug | string Slug (auto-generated from name if omitted) |
| ftsFields required | Array of strings FTS fields |
| facetFields | object Facet fields map |
| jsonschema | object JSON Schema for documents |
| tags | Array of strings Tags for categorization |
| contentType | string Enum: "static" "coupon" Content type |
{- "name": "products",
- "description": "Lorem ipsum",
- "slug": "string",
- "ftsFields": [
- "title",
- "brand"
], - "facetFields": {
- "price": "number"
}, - "jsonschema": { },
- "tags": [
- "promotion",
- "seasonal"
], - "contentType": "static"
}{- "collection": {
- "collectionKey": "products",
- "name": "products",
- "description": "Lorem ipsum",
- "slug": "string",
- "ftsFields": [
- "title",
- "brand"
], - "facetFields": {
- "price": "number"
}, - "jsonschema": { },
- "tags": [
- "promotion",
- "seasonal"
], - "contentType": "static",
- "createdAt": "2022-01-01T00:00:00.000Z",
- "updatedAt": "2022-01-01T00:00:00.000Z"
}
}| collectionKeyOrSlug required | string |
{- "collectionKey": "products",
- "name": "products",
- "description": "Lorem ipsum",
- "slug": "string",
- "ftsFields": [
- "title",
- "brand"
], - "facetFields": {
- "price": "number"
}, - "jsonschema": { },
- "tags": [
- "promotion",
- "seasonal"
], - "contentType": "static",
- "createdAt": "2022-01-01T00:00:00.000Z",
- "updatedAt": "2022-01-01T00:00:00.000Z"
}| collectionKeyOrSlug required | string |
| name | string Collection name |
| description | string Collection description |
| slug | string Slug (auto-generated from name if omitted) |
| ftsFields | Array of strings FTS fields |
| facetFields | object Facet fields map |
| jsonschema | object JSON Schema for documents |
| tags | Array of strings Tags for categorization |
| contentType | string Enum: "static" "coupon" Content type |
{- "name": "products",
- "description": "Lorem ipsum",
- "slug": "string",
- "ftsFields": [
- "title",
- "brand"
], - "facetFields": {
- "price": "number"
}, - "jsonschema": { },
- "tags": [
- "promotion",
- "seasonal"
], - "contentType": "static"
}{- "collection": {
- "collectionKey": "products",
- "name": "products",
- "description": "Lorem ipsum",
- "slug": "string",
- "ftsFields": [
- "title",
- "brand"
], - "facetFields": {
- "price": "number"
}, - "jsonschema": { },
- "tags": [
- "promotion",
- "seasonal"
], - "contentType": "static",
- "createdAt": "2022-01-01T00:00:00.000Z",
- "updatedAt": "2022-01-01T00:00:00.000Z"
}
}| collectionKeyOrSlug required | string |
| q | string Example: q=auriculares Free text for full-text search |
| range | string Example: range=range.price.min=10&range.price.max=100 Range filters (numeric or date). Use dot notation in query string: range.{field}.min=value&range.{field}.max=value |
| facet | string Example: facet=facet.audienceKeys=['aud_00000'] Facet filters for exact matches. Use dot notation: facets.{field}=value or facets.{field}=['val1','val2'] |
| locale | string Default: "" Locale filter (empty string for default) |
| status | string Enum: "draft" "published" Example: status=published Document status filter (default: published) |
| sort | string Example: sort=price:asc,createdAt:desc Sort field and direction (e.g. "price:asc", "createdAt:desc") |
| page | number Example: page=0 Page number (starting at 0) |
| limit | number Example: limit=20 Result limit (1–200) |
{- "collection": {
- "collectionKey": "123e4567-e89b-12d3-a456-426614174000",
- "name": "products"
}, - "query": {
- "q": "auriculares",
- "sort": "price:asc",
- "page": 0,
- "limit": 20
}, - "totalCount": 10,
- "items": [
- {
- "documentKey": "123e4567-e89b-12d3-a456-426614174000",
- "attrs": {
- "name": "Product 1",
- "price": 100
}, - "createdAt": "2022-01-01T00:00:00.000Z",
- "updatedAt": "2022-01-01T00:00:00.000Z",
- "score": 1
}
], - "facets": {
- "brand": [
- {
- "value": "Sony",
- "count": 5
}
]
}
}Creates or updates multiple documents in a collection. Each document must include a documentKey. Existing documents will be updated, new documents will be created.
| collectionKeyOrSlug required | string |
required | Array of objects (CmsBatchUpsertDocumentItemDto) Documents to create or update | ||||||||||||||||
Array
| |||||||||||||||||
{- "documents": [
- {
- "documentKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
]
}
]
}{- "upserted": [
- {
- "documentKey": "string",
- "collectionKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "publishedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "failed": [
- {
- "documentKey": "string",
- "locale": "string",
- "reason": "schema_validation_error",
- "message": "string"
}
], - "total": 0,
- "successCount": 0,
- "failureCount": 0
}Get document for a specific locale using either documentKey (UUID) or slug. Use empty string or omit locale query param for default locale.
| collectionKeyOrSlug required | string |
| documentKeyOrSlug required | string |
| locale required | string |
{- "document": {
- "documentKey": "string",
- "collectionKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "publishedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Update document for a specific locale. Use empty string or omit locale query param for default locale.
| collectionKeyOrSlug required | string |
| documentKeyOrSlug required | string |
| locale required | string |
| slug | string Slug (optional, duplicates allowed) |
| attrs | object Document attributes |
| status | string Enum: "draft" "published" |
| fromDate | string or null <date-time> Start date for content visibility |
| toDate | string <date-time> End date for content visibility |
| audienceKeys | Array of strings Audience segment keys |
| locale | string Default: "" Locale code (empty string for default) |
{- "slug": "string",
- "attrs": { },
- "status": "draft",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "locale": ""
}{- "document": {
- "documentKey": "string",
- "collectionKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "publishedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Deletes a single document by documentKey or slug. Returns the deleted document details.
| collectionKeyOrSlug required | string |
| documentKeyOrSlug required | string |
| locale required | string |
{- "document": {
- "documentKey": "string",
- "collectionKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "publishedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Returns all translations (locales) for a given documentKey or slug.
| collectionKeyOrSlug required | string |
| documentKeyOrSlug required | string |
{- "documentKeyOrSlug": "string",
- "locales": [
- {
- "documentKey": "string",
- "collectionKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "publishedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Upsert a translation for a specific locale. The documentKey groups all translations together.
| collectionKeyOrSlug required | string |
| documentKeyOrSlug required | string |
| locale required | string |
| slug | string Slug (optional, duplicates allowed) |
| attrs required | object Document attributes |
| status required | string Enum: "draft" "published" |
| fromDate | string or null <date-time> Start date for content visibility |
| toDate | string <date-time> End date for content visibility |
| audienceKeys | Array of strings Audience segment keys |
{- "slug": "string",
- "attrs": { },
- "status": "draft",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
]
}{- "document": {
- "documentKey": "string",
- "collectionKey": "string",
- "slug": "string",
- "attrs": { },
- "status": "draft",
- "publishedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "locale": "",
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z",
- "audienceKeys": [
- "vip",
- "premium"
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
string Filter by email | |
| loyaltyMemberId | string Filter by loyalty member id |
| fromCreatedAt | string <date-time> Filter members created from this date |
| toCreatedAt | string <date-time> Filter members created up to this date |
{- "results": [
- {
- "loyaltyMemberId": "11111-11111",
- "publicLoyaltyMemberId": "11111-11111",
- "profile": {
- "name": "string",
- "lastName": "string",
- "email": "string",
- "govId": {
- "id": "string",
- "type": "string",
- "issuingCountry": "string"
}, - "birthdate": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "pictureUrl": "string",
- "nickname": "string",
- "emails": [
- "string"
], - "locations": [
- "string"
], - "gender": "string",
- "country": "string",
- "state": "string",
- "city": "string",
- "address": {
- "addressLine": "string",
- "floor": "string",
- "apartment": "string",
- "zipCode": "string"
}, - "tags": [
- "string"
]
}, - "active": true,
- "tiers": [
- {
- "loyaltyTierKey": "string",
- "expiresAt": "2024-02-26T02:18:13.117Z",
- "loyaltyProgramKey": "string",
- "loyaltyTierName": "string",
- "details": {
- "loyaltyManualTierId": 0,
- "loyaltySystemTierId": 0
}
}
], - "ledgerWalletKey": "wal_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "customAttributes": {
- "address1": "Some address and street number",
- "phone": "+1-1234-56789"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "ledgerBalances": [
- {
- "ledgerKey": "ldg_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "ledgerAccountKey": "acc_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "balance": 13400,
- "isDefaultAccount": true,
- "lastTransactionDate": "2019-08-24T14:15:22Z"
}
], - "memberType": "organization",
- "channelAcquisition": "mobile_app",
- "notifications": {
- "email": true,
- "phone": false,
- "push": true
}
}
], - "total": 100,
- "page": 1,
- "limit": 10
}| loyaltyMemberId required | string Loyalty Member Id within Organization and Loyalty Program |
| publicLoyaltyMemberId | string Optional Public Loyalty Member Id within Organization and Loyalty Program |
object Member's Profile Info. | |
| active | boolean Member's Active Status. |
| customAttributes | object Custom dynamic attributes for organization member. |
| memberType | string Type of the member. |
| channelAcquisition | string Channel through which the member was acquired. |
| notifications | object Notification preferences |
| referralCode | string An Optional Referral Code |
{- "loyaltyMemberId": "11111-11111",
- "publicLoyaltyMemberId": "11111-11111",
- "profile": {
- "name": "string",
- "lastName": "string",
- "email": "string",
- "govId": {
- "id": "string",
- "type": "string",
- "issuingCountry": "string"
}, - "birthdate": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "pictureUrl": "string",
- "nickname": "string",
- "emails": [
- "string"
], - "locations": [
- "string"
], - "gender": "string",
- "country": "string",
- "state": "string",
- "city": "string",
- "address": {
- "addressLine": "string",
- "floor": "string",
- "apartment": "string",
- "zipCode": "string"
}, - "tags": [
- "string"
]
}, - "active": true,
- "customAttributes": {
- "address1": "Some address and street number",
- "phone": "+1-1234-56789"
}, - "memberType": "organization",
- "channelAcquisition": "mobile_app",
- "notifications": {
- "email": true,
- "phone": false,
- "push": true
}, - "referralCode": "ref-24fAdsa"
}{- "loyaltyMember": {
- "loyaltyMemberId": "11111-11111",
- "publicLoyaltyMemberId": "11111-11111",
- "profile": {
- "name": "string",
- "lastName": "string",
- "email": "string",
- "govId": {
- "id": "string",
- "type": "string",
- "issuingCountry": "string"
}, - "birthdate": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "pictureUrl": "string",
- "nickname": "string",
- "emails": [
- "string"
], - "locations": [
- "string"
], - "gender": "string",
- "country": "string",
- "state": "string",
- "city": "string",
- "address": {
- "addressLine": "string",
- "floor": "string",
- "apartment": "string",
- "zipCode": "string"
}, - "tags": [
- "string"
]
}, - "active": true,
- "tiers": [
- {
- "loyaltyTierKey": "string",
- "expiresAt": "2024-02-26T02:18:13.117Z",
- "loyaltyProgramKey": "string",
- "loyaltyTierName": "string",
- "details": {
- "loyaltyManualTierId": 0,
- "loyaltySystemTierId": 0
}
}
], - "ledgerWalletKey": "wal_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "customAttributes": {
- "address1": "Some address and street number",
- "phone": "+1-1234-56789"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "ledgerBalances": [
- {
- "ledgerKey": "ldg_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "ledgerAccountKey": "acc_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "balance": 13400,
- "isDefaultAccount": true,
- "lastTransactionDate": "2019-08-24T14:15:22Z"
}
], - "memberType": "organization",
- "channelAcquisition": "mobile_app",
- "notifications": {
- "email": true,
- "phone": false,
- "push": true
}
}
}| loyaltyMemberId required | string |
{- "loyaltyMember": {
- "loyaltyMemberId": "11111-11111",
- "publicLoyaltyMemberId": "11111-11111",
- "profile": {
- "name": "string",
- "lastName": "string",
- "email": "string",
- "govId": {
- "id": "string",
- "type": "string",
- "issuingCountry": "string"
}, - "birthdate": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "pictureUrl": "string",
- "nickname": "string",
- "emails": [
- "string"
], - "locations": [
- "string"
], - "gender": "string",
- "country": "string",
- "state": "string",
- "city": "string",
- "address": {
- "addressLine": "string",
- "floor": "string",
- "apartment": "string",
- "zipCode": "string"
}, - "tags": [
- "string"
]
}, - "active": true,
- "tiers": [
- {
- "loyaltyTierKey": "string",
- "expiresAt": "2024-02-26T02:18:13.117Z",
- "loyaltyProgramKey": "string",
- "loyaltyTierName": "string",
- "details": {
- "loyaltyManualTierId": 0,
- "loyaltySystemTierId": 0
}
}
], - "ledgerWalletKey": "wal_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "customAttributes": {
- "address1": "Some address and street number",
- "phone": "+1-1234-56789"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "ledgerBalances": [
- {
- "ledgerKey": "ldg_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "ledgerAccountKey": "acc_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "balance": 13400,
- "isDefaultAccount": true,
- "lastTransactionDate": "2019-08-24T14:15:22Z"
}
], - "memberType": "organization",
- "channelAcquisition": "mobile_app",
- "notifications": {
- "email": true,
- "phone": false,
- "push": true
}
}
}| loyaltyMemberId required | string |
| loyaltyMemberId | string Loyalty Member Id within Organization and Loyalty Program |
| publicLoyaltyMemberId | string Optional Public Loyalty Member Id within Organization and Loyalty Program |
object Member's Profile Info. | |
| active | boolean Member's Active Status. |
| customAttributes | object Custom dynamic attributes for organization member. |
| memberType | string Type of the member. |
| notifications | object Notification preferences |
| updateReason | string Reason for updating the member |
{- "loyaltyMemberId": "11111-11111",
- "publicLoyaltyMemberId": "11111-11111",
- "profile": {
- "name": "string",
- "lastName": "string",
- "email": "string",
- "govId": {
- "id": "string",
- "type": "string",
- "issuingCountry": "string"
}, - "birthdate": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "pictureUrl": "string",
- "nickname": "string",
- "emails": [
- "string"
], - "locations": [
- "string"
], - "gender": "string",
- "country": "string",
- "state": "string",
- "city": "string",
- "address": {
- "addressLine": "string",
- "floor": "string",
- "apartment": "string",
- "zipCode": "string"
}, - "tags": [
- "string"
]
}, - "active": true,
- "customAttributes": {
- "address1": "Some address and street number",
- "phone": "+1-1234-56789"
}, - "memberType": "organization",
- "notifications": {
- "email": true,
- "phone": false,
- "push": true
}, - "updateReason": "Updated member profile information"
}{- "loyaltyMember": {
- "loyaltyMemberId": "11111-11111",
- "publicLoyaltyMemberId": "11111-11111",
- "profile": {
- "name": "string",
- "lastName": "string",
- "email": "string",
- "govId": {
- "id": "string",
- "type": "string",
- "issuingCountry": "string"
}, - "birthdate": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "pictureUrl": "string",
- "nickname": "string",
- "emails": [
- "string"
], - "locations": [
- "string"
], - "gender": "string",
- "country": "string",
- "state": "string",
- "city": "string",
- "address": {
- "addressLine": "string",
- "floor": "string",
- "apartment": "string",
- "zipCode": "string"
}, - "tags": [
- "string"
]
}, - "active": true,
- "tiers": [
- {
- "loyaltyTierKey": "string",
- "expiresAt": "2024-02-26T02:18:13.117Z",
- "loyaltyProgramKey": "string",
- "loyaltyTierName": "string",
- "details": {
- "loyaltyManualTierId": 0,
- "loyaltySystemTierId": 0
}
}
], - "ledgerWalletKey": "wal_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "customAttributes": {
- "address1": "Some address and street number",
- "phone": "+1-1234-56789"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "ledgerBalances": [
- {
- "ledgerKey": "ldg_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "ledgerAccountKey": "acc_2iNSGK6kGqEsZ2tPGgIu1a1nRaO",
- "balance": 13400,
- "isDefaultAccount": true,
- "lastTransactionDate": "2019-08-24T14:15:22Z"
}
], - "memberType": "organization",
- "channelAcquisition": "mobile_app",
- "notifications": {
- "email": true,
- "phone": false,
- "push": true
}
}
}| loyaltyMemberId required | string |
| audienceIds required | Array of numbers |
{- "audienceIds": [
- 0
]
}{- "audienceIds": [
- [
- 0
]
]
}| loyaltyMemberIds required | Array of strings List of loyaltyMemberId |
{- "loyaltyMemberIds": [
- "string"
]
}{- "loyaltyMembers": [
- {
- "loyaltyMemberId": "11111-11111",
- "exists": true
}
]
}| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| fromCreatedAt | string <date-time> Filter events created from this date |
| toCreatedAt | string <date-time> Filter events created up to this date |
| eventType | string Enum: "member-purchase-order-created" "member-purchase-order-confirmed" "member-purchase-order-cancelled" "member-purchase-order-returned" "member-purchase-order-partially-returned" "member-created" "member-updated" "member-tier-set" "member-tier-removed" "member-profile-deactivated" "member-generic-event" "benefit-used" "coupon-code-assigned" "coupon-code-used" "badge-minted" "mission-status-updated" "ledger-transaction-created" Filter events by type |
| status | string Enum: "pending" "running" "failed" "success" Filter events by status |
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "loyaltyEventKey": "string",
- "externalId": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "eventType": "string",
- "lastError": "string",
- "description": "string",
- "systemUniqueKey": "string",
- "tags": [
- "string"
], - "location": "string",
- "e2eTrackingId": "string",
- "evaluationStatus": 0,
- "status": "pending",
- "limitDiscardedTotalAmount": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "payload": { },
- "evaluationResults": { },
- "executionResults": { }
}
]
}| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| fromExternalEventDate | string <date-time> Optional Reference From Event Date |
| toExternalEventDate | string <date-time> Optional Reference To Event Date |
| ledgerAccountKey | string Optional Ledger Account Key |
| systemUniqueKey | string Optional System Unique Key for tracking |
| tags | string |
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "ledgerTransactionId": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "systemUniqueKey": "string",
- "transactionType": [
- "0",
- "1",
- "2",
- "3",
- "transfer",
- "mint",
- "burn",
- "revert"
], - "status": [
- 0,
- 1,
- 2
], - "externalId": "string",
- "description": "string",
- "ledgerAccountKey": "string",
- "ledgerAccountName": "string",
- "amount": 0,
- "updatedBalance": 0,
- "tags": [
- [
- "tag1",
- "tag2"
]
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| loyaltyMemberId required | string |
| collectionKeyOrSlug required | string |
| page | number >= 0 Default: 0 Example: page=0 Page number (0-indexed) |
| limit | number [ 1 .. 200 ] Default: 20 Example: limit=20 Number of results per page |
| sort | string Example: sort=createdAt:desc Sort field and direction (e.g., 'createdAt:desc', 'name:asc') |
{- "collection": {
- "collectionKey": "123e4567-e89b-12d3-a456-426614174000",
- "name": "products"
}, - "query": {
- "q": "auriculares",
- "sort": "price:asc",
- "page": 0,
- "limit": 20
}, - "totalCount": 10,
- "items": [
- {
- "documentKey": "123e4567-e89b-12d3-a456-426614174000",
- "attrs": {
- "name": "Product 1",
- "price": 100
}, - "createdAt": "2022-01-01T00:00:00.000Z",
- "updatedAt": "2022-01-01T00:00:00.000Z",
- "score": 1
}
], - "facets": {
- "brand": [
- {
- "value": "Sony",
- "count": 5
}
]
}
}Track loyalty events
required | Array of objects (TrackOrganizationLoyaltyEventDto) Array of loyalty events to track |
| campaignKeys | Array of strings Array of campaign keys to filter campaigns for evaluation |
| dryRun | boolean If true, the events will be processed but no actual changes will be made |
{- "events": [
- {
- "loyaltyMemberId": "string",
- "sponsorLoyaltyMemberId": "string",
- "systemUniqueKey": "string",
- "externalId": "string",
- "eventType": "member-purchase-order-confirmed",
- "description": "string",
- "payload": {
- "items": [
- {
- "productCode": "PROD123",
- "description": "Premium Coffee Beans",
- "total": 200000,
- "amount": 2,
- "subTotal": 100000,
- "customAttributes": {
- "origin": "Colombia",
- "roastLevel": "medium"
}, - "discountedTotal": 180000
}, - {
- "productCode": "PROD456",
- "description": "Coffee Grinder",
- "total": 500000,
- "amount": 1,
- "subTotal": 500000,
- "discountedTotal": 450000
}
], - "customAttributes": {
- "orderSource": "mobile_app",
- "promoApplied": "SUMMER2023"
}, - "discountedTotal": 630000,
- "description": "Coffee equipment purchase",
- "total": 700000,
- "type": "retail_purchase",
- "referralCode": "REF1234567890",
- "coupons": [
- "CODE-1",
- "CODE-2",
- "CODE-3"
], - "location": "store-001"
}, - "externalEventDate": "2019-08-24T14:15:22Z",
- "tags": [
- "coffee",
- "equipment",
- "premium"
]
}
], - "campaignKeys": [
- "cpg_01JGH08G0CT5WRTRQN4HYD2WZW",
- "cpg_01JGH08G0CT5WRTRQN4HYD2XX"
], - "dryRun": false
}{- "results": [
- {
- "loyaltyEventKey": "ev_01JG29AJQAQ3NB706GFCHS91H5",
- "systemUniqueKey": "67b2394f-0d24-417e-aeba-ec47b3ecc2e7",
- "error": "string",
- "effects": [
- {
- "actionKey": "act_01JGH0352DFYC56XC16NGAC3T9",
- "actionIndex": 0,
- "actionName": "Mission Update test name",
- "campaignCode": "POINTS-ACCRUAL-WEEKENDS",
- "campaignKey": "cpg_01JGH08G0CT5WRTRQN4HYD2WZW",
- "effectId": "add-loyalty-points",
- "effectIndex": 0,
- "status": "success",
- "error": "Error message",
- "results": {
- "amount": 1250,
- "beneficiaryMemberType": "member",
- "systemUniqueKey": "f93d8b2c-25ae-47f9-ae12-d94b23ec8a71_103_189_add-loyalty-points_0",
- "ledgerWalletKey": "wal_01KJ9C8G6U0VSRC6RHDMRH4K70",
- "ledgerKey": "ldg_01KJ43CLSCS5ND928IHEJU03J7",
- "ledgerAccountKey": "acc_01KJ43CLTMGRHNX8A5BXHAS4UM",
- "ledgerAccountName": "Standard Rewards Account",
- "tags": [
- "campaign-code:SUMMER-BONUS"
], - "description": "Warning: this is only an example and can be different for each effect",
- "ledgerTransactionId": "937445"
}
}
], - "state": {
- "ledgerBalances": [
- {
- "currentBalance": 13321000,
- "endingBalance": 14021000,
- "isDefaultAccount": false,
- "ledgerAccountName": "Spend Account",
- "ledgerKey": "string",
- "ledgerAccountKey": "string",
- "ledgerWalletKey": "string"
}
]
}, - "organizationKey": "org_01JG29AJQAQ3NB706GFCHS91H5",
- "status": "ok"
}
], - "dryRun": false
}| loyaltyMemberId required | string |
| amount required | number >= 1 The amount of points to mint |
| systemUniqueKey | string <= 255 characters The system unique key for the loyalty program |
| externalEventDate | string <date-time> The date of the external event |
| description | string <= 255 characters The description of the external event |
| tags | Array of strings Optional tags for the event |
{- "amount": 1,
- "systemUniqueKey": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "description": "string",
- "tags": [
- "string"
]
}{- "result": {
- "ledgerTransactionId": "string",
- "ledgerAccountKey": "string",
- "updatedBalance": 0,
- "status": 0
}
}Burn loyalty points to default account.
| loyaltyMemberId required | string |
| amount required | number >= 1 The amount of points to mint |
| systemUniqueKey | string <= 255 characters The system unique key for the loyalty program |
| externalEventDate | string <date-time> The date of the external event |
| description | string <= 255 characters The description of the external event |
| tags | Array of strings Optional tags for the event |
| captureMethod | string Enum: "manual" "auto" The capture method: manual or auto. Default is auto |
{- "amount": 1,
- "systemUniqueKey": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "description": "string",
- "tags": [
- "string"
], - "captureMethod": "auto"
}{- "result": {
- "ledgerTransactionId": "string",
- "ledgerAccountKey": "string",
- "updatedBalance": 0,
- "status": 0
}
}Capture loyalty points from default account. Points must have been burned with captureMethod = manual
required | Array of objects (TransactionCaptureDto) The transactions to capture | ||||
Array
| |||||
{- "transactions": [
- {
- "captureAmount": 100,
- "ledgerTransactionId": "string"
}
]
}{- "ok": true
}Revert loyalty points from default account. Can only revert debit transactions and batch is processed as an atomic set.
required | Array of objects (RevertLoyaltyPointsDto) The transactions to revert | ||||||||||
Array
| |||||||||||
{- "transactions": [
- {
- "ledgerTransactionId": "string",
- "systemUniqueKey": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "description": "string",
- "tags": [
- "string"
]
}
]
}{- "results": [
- {
- "ledgerTransactionId": "string",
- "ledgerAccountKey": "string",
- "updatedBalance": 0,
- "status": 0
}
]
}Get all member transactions
| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| fromDate | string <date-time> Optional Reference From Event Date |
| toDate | string <date-time> Optional Reference To Event Date |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/members/{loyaltyMemberId}/points/txs?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "ledgerTransactionId": 1,
- "revertedLedgerTransactionId": 1,
- "ledgerAccountKey": "string",
- "transactionType": 2,
- "status": 0,
- "amount": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "systemUniqueKey": "string",
- "externalId": "string",
- "description": "string",
- "walletKey": "string",
- "fromWalletKey": "string",
- "toWalletKey": "string",
- "updatedBalance": 0,
- "tags": [
- "string"
]
}
]
}| referralProgramKey required | string |
{- "referralProgram": {
- "referralProgramKey": "string",
- "name": "string",
- "description": "string",
- "maxReferralsPerMember": 1,
- "pictureUrl": "string",
- "customAttributes": { },
- "active": true,
- "tags": [
- "string"
], - "code": "string",
- "eventType": "string",
- "referrerPointsAccrual": 0,
- "referredPointsAccrual": 0,
- "validFromDate": "2019-08-24T14:15:22Z",
- "validToDate": "2019-08-24T14:15:22Z",
- "maxPerCode": 1,
- "maxRedeemsPerReferredMemberPerCode": 1,
- "totalCodes": 0,
- "totalLogs": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Create a new referral code for a given loyalty member
| referralProgramKey required | string |
| codes required | Array of strings[ items <= 255 characters ] The codes to be created |
| loyaltyMemberId required | string <= 255 characters The loyalty member to be associated with the code |
{- "codes": [
- "string"
], - "loyaltyMemberId": "string"
}{- "codes": [
- {
- "loyaltyMemberId": "string",
- "code": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| type | string |
| codes | string |
| tags | string |
| loyaltyProgramKey | string |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/missions?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "missionKey": "string",
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "code": "string",
- "eventType": "string",
- "active": true,
- "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "maxRepetitions": 0,
- "goalCount": 0,
- "pointsAccrual": 0,
- "ledgerKey": "string",
- "ledgerAccountKey": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| name required | string |
| shortDescription | string |
| description | string |
| pictureUrl | string |
| customAttributes | object |
| type | string |
| tags | Array of strings |
| code required | string |
| active | boolean |
| validFrom | string <date-time> |
| validTo | string <date-time> |
| repetitionPeriod | string |
| periodLimit | number |
| pointsAccrual | number |
| eventType required | string Enum: "member-purchase-order-created" "member-purchase-order-confirmed" "member-purchase-order-cancelled" "member-purchase-order-returned" "member-purchase-order-partially-returned" "member-created" "member-updated" "member-tier-set" "member-tier-removed" "member-profile-deactivated" "member-generic-event" "benefit-used" "coupon-code-assigned" "coupon-code-used" "badge-minted" "mission-status-updated" "ledger-transaction-created" Event Type to match |
| maxRepetitions required | number >= 1 Max number of repetitions |
| goalCount required | number >= 1 Goal count |
| loyaltyProgramKey required | string |
| ledgerKey | string |
| ledgerAccountKey | string |
{- "name": "string",
- "shortDescription": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "code": "string",
- "active": true,
- "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "repetitionPeriod": "string",
- "periodLimit": 0,
- "pointsAccrual": 0,
- "eventType": "member-purchase-order-confirmed",
- "maxRepetitions": 10,
- "goalCount": 3,
- "loyaltyProgramKey": "string",
- "ledgerKey": "string",
- "ledgerAccountKey": "string"
}{- "mission": {
- "missionKey": "string",
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "code": "string",
- "eventType": "string",
- "active": true,
- "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "maxRepetitions": 0,
- "goalCount": 0,
- "pointsAccrual": 0,
- "ledgerKey": "string",
- "ledgerAccountKey": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/missions/{missionKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "mission": {
- "missionKey": "string",
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "code": "string",
- "eventType": "string",
- "active": true,
- "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "maxRepetitions": 0,
- "goalCount": 0,
- "pointsAccrual": 0,
- "ledgerKey": "string",
- "ledgerAccountKey": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| loyaltyMemberId required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| type | string |
| codes | string |
| tags | string |
| minTimesAchieved | number >= 0 Min number of times it has been achieved |
| minCounterCount | number >= 0 Min number of times the event has been triggered |
| available | boolean Filter available missions |
| inProgress | boolean If member started the mission but has not achieved it yet (even if she completed it in the past) |
| active | boolean Filter missions with active status |
| validFrom | string <date-time> Filter missions with valid from date |
| validTo | string <date-time> Filter missions with valid to date |
| missionKey | string |
| loyaltyProgramKey | string |
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/members/{loyaltyMemberId}/missions?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "missionKey": "string",
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "code": "string",
- "eventType": "string",
- "active": true,
- "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "maxRepetitions": 0,
- "goalCount": 0,
- "pointsAccrual": 0,
- "ledgerKey": "string",
- "ledgerAccountKey": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "balance": {
- "timesAchieved": 0,
- "lastCounterCountWhenAchieved": 0,
- "currentCounterCount": 0,
- "lastAchievedAt": "2019-08-24T14:15:22Z"
}
}
]
}| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| type | string |
| codes | string |
| tags | string |
| loyaltyProgramKey | string |
'https://api.sandbox.qurable.io/v2/campaigns?page=0&limit=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- 0
], - "locationCodes": [
- "string"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "actions": [
- {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
]
}| name required | string |
| description | string |
| pictureUrl | string |
| customAttributes | object |
| smartRewards | object |
| type | string |
| tags | Array of strings |
| enabledTopics | Array of strings |
| code required | string |
| active | boolean |
| audienceKeys | Array of strings |
| pointsMonthlyLimitPerMember | number |
| allowPartialApplicationOnLimit | boolean |
| daysOfWeek | Array of strings |
| locationCodes | Array of strings |
| eventType | string |
| minSpendValue | number |
| loyaltyTierKeys | Array of strings |
| validFrom | string <date-time> |
| validTo | string <date-time> |
| loyaltyProgramKey | string |
Array of objects (CreateActionDto) |
{- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "smartRewards": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- "string"
], - "locationCodes": [
- "string"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "loyaltyProgramKey": "string",
- "actions": [
- {
- "actionIndex": 0,
- "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "name": "string",
- "rules": { },
- "effects": { },
- "status": "disabled"
}
]
}{- "campaign": {
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- 0
], - "locationCodes": [
- "string"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "actions": [
- {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
}
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/campaigns/{campaignKey}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'{- "campaign": {
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- 0
], - "locationCodes": [
- "string"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "actions": [
- {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
}| campaignKey required | string |
| name required | string |
| description | string |
| pictureUrl | string |
| customAttributes | object |
| smartRewards | object |
| type | string |
| tags | Array of strings |
| enabledTopics | Array of strings |
| code required | string |
| active | boolean |
| audienceKeys | Array of strings |
| pointsMonthlyLimitPerMember | number |
| allowPartialApplicationOnLimit | boolean |
| daysOfWeek | Array of strings |
| locationCodes | Array of strings |
| eventType | string |
| minSpendValue | number |
| loyaltyTierKeys | Array of strings |
| validFrom | string <date-time> |
| validTo | string <date-time> |
Array of objects (UpdateActionWithKeyDtoV2) | |
| loyaltyProgramKey | string |
{- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "smartRewards": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- "string"
], - "locationCodes": [
- "string"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "actions": [
- {
- "actionIndex": 0,
- "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "name": "string",
- "rules": { },
- "effects": { },
- "status": "disabled",
- "actionKey": "string"
}
], - "loyaltyProgramKey": "string"
}{- "campaign": {
- "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- 0
], - "locationCodes": [
- "string"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "actions": [
- {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
}| campaignKey required | string |
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| status | string Enum: "disabled" "running" "draft" The status of the action |
| campaignKey | string |
curl -X GET "https://api.qurable.com/v2/campaigns/{campaignKey}/actions" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| campaignKey required | string |
| actionIndex | number |
| abortEvaluationIfFalse | boolean |
| abortEvaluationOnError | boolean |
| name required | string |
| rules | object |
| effects required | object |
| status required | string Enum: "disabled" "running" "draft" |
{- "actionIndex": 0,
- "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "name": "string",
- "rules": { },
- "effects": { },
- "status": "disabled"
}{- "action": {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| campaignKey required | string |
| actionKey required | string |
curl -X GET "https://api.qurable.com/v2/campaigns/{campaignKey}/actions/{actionKey}" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"
{- "action": {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| campaignKey required | string |
| actionKey required | string |
| actionIndex | number |
| abortEvaluationIfFalse | boolean |
| abortEvaluationOnError | boolean |
| name required | string |
| rules | object |
| effects required | object |
| status required | string Enum: "disabled" "running" "draft" |
{- "actionIndex": 0,
- "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "name": "string",
- "rules": { },
- "effects": { },
- "status": "disabled"
}{- "action": {
- "actionKey": "string",
- "organizationKey": "string",
- "campaignKey": "string",
- "actionIndex": 0,
- "name": "string",
- "rules": { },
- "effects": [
- { }
], - "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "status": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| type | string Value: "item-matcher" |
| page | number Default: 0 |
| limit | number Default: 10 |
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/action-matchers?page=0&limit=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'{- "matchers": [
- {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "totalCount": 0,
- "page": 0,
- "limit": 0
}| name required | string <= 255 characters The name of the action matcher |
| type required | string Value: "item-matcher" The type of the action matcher |
| matcher required | object The matcher configuration |
{- "name": "string",
- "type": "item-matcher",
- "matcher": { }
}{- "matcher": {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/action-matchers/{matcherKey}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'{- "matcher": {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| matcherKey required | string |
| name | string <= 255 characters The name of the action matcher |
| type | string Value: "item-matcher" The type of the action matcher |
| matcher | object The matcher configuration |
{- "name": "string",
- "type": "item-matcher",
- "matcher": { }
}{- "matcher": {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/smart-campaigns/conditions?page=1&limit=10&category=Member&search=tier' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "results": [
- {
- "smartConditionKey": "member-tier-check",
- "ruleFunctionId": "memberTier",
- "inputType": "tier",
- "label": "Member Tier",
- "description": "Check if member belongs to specific tier(s)",
- "category": "member",
- "isCurrency": true,
- "isMultiple": true,
- "decimals": 2,
- "values": [
- {
- "value": "credit",
- "label": "Credit"
}
], - "loyaltyProgramKey": "main-program",
- "ledgerKey": "main-ledger",
- "ledgerAccountKey": "earn-points",
- "ledgerAccountName": "points",
- "attributePath": "customAttributes.cardType"
}
]
}curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/smart-campaigns/effects?page=1&limit=10&category=Rewards&search=points' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "results": [
- {
- "smartEffectKey": "add-earn-points",
- "effectId": "add-loyalty-points",
- "inputType": "numberWithType",
- "label": "Add Earn Points",
- "description": "Add points to member's earn points account",
- "category": "member",
- "ledgerKey": "main-ledger",
- "ledgerAccountKey": "earn-points",
- "loyaltyProgramKey": "main-program",
- "decimals": 2
}
]
}| name required | string |
| description | string |
| pictureUrl | string |
| customAttributes | object |
| smartRewards | object |
| type | string |
| tags | Array of strings |
| enabledTopics | Array of strings |
| code required | string |
| active | boolean |
| audienceKeys | Array of strings |
| pointsMonthlyLimitPerMember | number |
| allowPartialApplicationOnLimit | boolean |
| daysOfWeek | Array of strings[ items [ 1 .. 7 ] ] Days of week when campaign is active (1=Monday, 7=Sunday) |
| locationCodes | Array of strings Location codes where campaign is active |
| eventType | string |
| minSpendValue | number |
| loyaltyTierKeys | Array of strings |
| validFrom | string <date-time> |
| validTo | string <date-time> |
required | Array of objects (RewardConfigurationDto) Array of reward configurations |
| loyaltyProgramKey | string |
{- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "smartRewards": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "locationCodes": [
- "main-store",
- "downtown-branch"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "rewards": [
- {
- "conditions": [
- {
- "smartConditionKey": "member-tier-check",
- "loyaltyTierKeys": [
- "bronze",
- "silver",
- "gold"
], - "minNumberValue": 100,
- "maxNumberValue": 1000,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "categoriesKeys": [
- "category-electronics",
- "product-123"
], - "values": [
- "value1",
- "value2"
]
}
], - "effects": [
- {
- "smartEffectKey": "add-earn-points",
- "loyaltyTierKey": "gold",
- "couponBookKey": "coupon-book-123",
- "numberValue": {
- "rate": 10,
- "accrualType": "percentage"
}, - "categoryValues": [
- {
- "rate": 10,
- "accrualType": "percentage",
- "categoryCode": "electronics"
}, - {
- "rate": 5,
- "accrualType": "percentage"
}
]
}
]
}
], - "loyaltyProgramKey": "string"
}{- "campaign": {
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "locationCodes": [
- "main-store",
- "downtown-branch"
], - "rewards": [
- {
- "conditions": [
- {
- "smartConditionKey": "member-tier-check",
- "loyaltyTierKeys": [
- "bronze",
- "silver",
- "gold"
], - "minNumberValue": 100,
- "maxNumberValue": 1000,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "categoriesKeys": [
- "category-electronics",
- "product-123"
], - "values": [
- "value1",
- "value2"
]
}
], - "effects": [
- {
- "smartEffectKey": "add-earn-points",
- "loyaltyTierKey": "gold",
- "couponBookKey": "coupon-book-123",
- "numberValue": {
- "rate": 10,
- "accrualType": "percentage"
}, - "categoryValues": [
- {
- "rate": 10,
- "accrualType": "percentage",
- "categoryCode": "electronics"
}, - {
- "rate": 5,
- "accrualType": "percentage"
}
]
}
]
}
], - "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/smart-campaigns/{campaignKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
{- "campaign": {
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "locationCodes": [
- "main-store",
- "downtown-branch"
], - "rewards": [
- {
- "conditions": [
- {
- "smartConditionKey": "member-tier-check",
- "loyaltyTierKeys": [
- "bronze",
- "silver",
- "gold"
], - "minNumberValue": 100,
- "maxNumberValue": 1000,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "categoriesKeys": [
- "category-electronics",
- "product-123"
], - "values": [
- "value1",
- "value2"
]
}
], - "effects": [
- {
- "smartEffectKey": "add-earn-points",
- "loyaltyTierKey": "gold",
- "couponBookKey": "coupon-book-123",
- "numberValue": {
- "rate": 10,
- "accrualType": "percentage"
}, - "categoryValues": [
- {
- "rate": 10,
- "accrualType": "percentage",
- "categoryCode": "electronics"
}, - {
- "rate": 5,
- "accrualType": "percentage"
}
]
}
]
}
], - "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| campaignKey required | string |
| name required | string |
| description | string |
| pictureUrl | string |
| customAttributes | object |
| smartRewards | object |
| type | string |
| tags | Array of strings |
| enabledTopics | Array of strings |
| code required | string |
| active | boolean |
| audienceKeys | Array of strings |
| pointsMonthlyLimitPerMember | number |
| allowPartialApplicationOnLimit | boolean |
| daysOfWeek | Array of strings[ items [ 1 .. 7 ] ] Days of week when campaign is active (1=Monday, 7=Sunday) |
| locationCodes | Array of strings Location codes where campaign is active |
| eventType | string |
| minSpendValue | number |
| loyaltyTierKeys | Array of strings |
| validFrom | string <date-time> |
| validTo | string <date-time> |
required | Array of objects (RewardConfigurationDto) Array of reward configurations |
| loyaltyProgramKey | string |
{- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "smartRewards": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "locationCodes": [
- "main-store",
- "downtown-branch"
], - "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "rewards": [
- {
- "conditions": [
- {
- "smartConditionKey": "member-tier-check",
- "loyaltyTierKeys": [
- "bronze",
- "silver",
- "gold"
], - "minNumberValue": 100,
- "maxNumberValue": 1000,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "categoriesKeys": [
- "category-electronics",
- "product-123"
], - "values": [
- "value1",
- "value2"
]
}
], - "effects": [
- {
- "smartEffectKey": "add-earn-points",
- "loyaltyTierKey": "gold",
- "couponBookKey": "coupon-book-123",
- "numberValue": {
- "rate": 10,
- "accrualType": "percentage"
}, - "categoryValues": [
- {
- "rate": 10,
- "accrualType": "percentage",
- "categoryCode": "electronics"
}, - {
- "rate": 5,
- "accrualType": "percentage"
}
]
}
]
}
], - "loyaltyProgramKey": "string"
}{- "campaign": {
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "locationCodes": [
- "main-store",
- "downtown-branch"
], - "rewards": [
- {
- "conditions": [
- {
- "smartConditionKey": "member-tier-check",
- "loyaltyTierKeys": [
- "bronze",
- "silver",
- "gold"
], - "minNumberValue": 100,
- "maxNumberValue": 1000,
- "daysOfWeek": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "categoriesKeys": [
- "category-electronics",
- "product-123"
], - "values": [
- "value1",
- "value2"
]
}
], - "effects": [
- {
- "smartEffectKey": "add-earn-points",
- "loyaltyTierKey": "gold",
- "couponBookKey": "coupon-book-123",
- "numberValue": {
- "rate": 10,
- "accrualType": "percentage"
}, - "categoryValues": [
- {
- "rate": 10,
- "accrualType": "percentage",
- "categoryCode": "electronics"
}, - {
- "rate": 5,
- "accrualType": "percentage"
}
]
}
]
}
], - "campaignKey": "string",
- "organizationKey": "string",
- "loyaltyProgramKey": "string",
- "name": "string",
- "description": "string",
- "pictureUrl": "string",
- "customAttributes": { },
- "type": "string",
- "tags": [
- "string"
], - "enabledTopics": [
- "string"
], - "code": "string",
- "active": true,
- "audienceKeys": [
- "string"
], - "validFrom": "2019-08-24T14:15:22Z",
- "validTo": "2019-08-24T14:15:22Z",
- "pointsMonthlyLimitPerMember": 0,
- "allowPartialApplicationOnLimit": true,
- "eventType": "string",
- "minSpendValue": 0,
- "loyaltyTierKeys": [
- "string"
], - "smartRewards": [
- { }
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Creates a new segment with an automatically linked list-matcher audience. The segment defines membership refresh schedules and configuration.
| name required | string [ 1 .. 255 ] characters Name of the segment |
| description | string <= 1000 characters Description of the segment |
| refreshType | string (SegmentRefreshType) Default: "once" Enum: "once" "daily" "weekly" "monthly" The refresh type determines membership TTL. ONCE: never expires, DAILY: 24h, WEEKLY: 7d, MONTHLY: 30d |
| isActive | boolean Default: true Indicates if the segment is active and can be used for targeting |
| disableList | boolean Default: false Controls the audience active status. When true, sets the audience to inactive (active=false), preventing sync jobs and member operations. When false or undefined, the audience remains active. The segment definition can still be used for estimation/preview queries regardless of this setting. |
| tags | string Tags associated with the segment |
| definition | object DSL-based audience definition for complex segmentation queries |
{- "name": "VIP Customers",
- "description": "High-value customers with over $1000 in purchases",
- "refreshType": "once",
- "isActive": true,
- "disableList": false,
- "tags": "VIP,High-value",
- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}
}{- "segment": {
- "segmentKey": "seg_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "name": "VIP Customers",
- "description": "High-value customers with over $1000 in purchases",
- "refreshType": "monthly",
- "isActive": true,
- "audienceKey": "audience_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "tags": "VIP,High-value",
- "createdAt": "2023-12-01T10:00:00Z",
- "updatedAt": "2023-12-01T12:00:00Z",
- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}, - "audience": {
- "audienceKey": "aud_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "memberCount": 150,
- "refreshedAt": "2023-12-01T15:00:00Z"
}
}
}Retrieves a paginated list of segments with support for filtering by active status and searching by name/description.
| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| isActive | boolean Example: isActive=true Filter by segment active status |
| search | string Example: search=VIP Search segments by name or description |
| tags | string Example: tags=VIP,High-value Filter segments that contain any of the provided tags |
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "segmentKey": "seg_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "name": "VIP Customers",
- "description": "High-value customers with over $1000 in purchases",
- "refreshType": "monthly",
- "isActive": true,
- "audienceKey": "audience_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "tags": "VIP,High-value",
- "createdAt": "2023-12-01T10:00:00Z",
- "updatedAt": "2023-12-01T12:00:00Z",
- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}, - "audience": {
- "audienceKey": "aud_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "memberCount": 150,
- "refreshedAt": "2023-12-01T15:00:00Z"
}
}
]
}| segmentKey required | string Segment key |
{- "segment": {
- "segmentKey": "seg_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "name": "VIP Customers",
- "description": "High-value customers with over $1000 in purchases",
- "refreshType": "monthly",
- "isActive": true,
- "audienceKey": "audience_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "tags": "VIP,High-value",
- "createdAt": "2023-12-01T10:00:00Z",
- "updatedAt": "2023-12-01T12:00:00Z",
- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}, - "audience": {
- "audienceKey": "aud_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "memberCount": 150,
- "refreshedAt": "2023-12-01T15:00:00Z"
}
}
}Updates segment properties. Changes to name and description are automatically synchronized to the linked audience.
| segmentKey required | string Example: seg_01H9X8Y7Z6P5Q4R3S2T1V0W9 Unique segment identifier |
| version | number >= 1 Segment version number for optimistic locking |
{- "version": 2
}{- "segment": {
- "segmentKey": "seg_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "name": "VIP Customers",
- "description": "High-value customers with over $1000 in purchases",
- "refreshType": "monthly",
- "isActive": true,
- "audienceKey": "audience_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "tags": "VIP,High-value",
- "createdAt": "2023-12-01T10:00:00Z",
- "updatedAt": "2023-12-01T12:00:00Z",
- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}, - "audience": {
- "audienceKey": "aud_01ARZ3NDEKTSV4RRFFQ69G5FAV",
- "memberCount": 150,
- "refreshedAt": "2023-12-01T15:00:00Z"
}
}
}| audienceKey required | string Audience key |
| limit | number [ 1 .. 1000 ] Default: 100 Example: limit=100 Maximum number of members to return (1-1000) |
| lastEvaluatedKey | string Example: lastEvaluatedKey=eyJtZW1iZXJJZCI6MTIzLCJhdWRpZW5jZUtleSI6ImF1ZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9 Pagination token from previous response to get next page of results (base64 encoded) |
{- "members": [
- {
- "loyaltyMemberId": "member_123",
- "updatedAt": "2023-12-01T10:00:00Z"
}
], - "lastEvaluatedKey": "eyJtZW1iZXJJZCI6MTIzLCJhdWRpZW5jZUtleSI6ImF1ZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9",
- "count": 100
}| audienceKey required | string Audience key |
| addLoyaltyMemberIds | Array of strings <= 1000 items Array of loyalty member IDs to add to the audience |
| removeLoyaltyMemberIds | Array of strings <= 1000 items Array of loyalty member IDs to remove from the audience |
{- "addLoyaltyMemberIds": [
- "lm_123",
- "lm_456"
], - "removeLoyaltyMemberIds": [
- "lm_789"
]
}{- "added": [
- "lm_123",
- "lm_456"
], - "removed": [
- "lm_789"
]
}| page | number >= 0 Example: page=0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| matcherType | string Enum: "attribute-matcher" "list-matcher" "null-matcher" Filter by matcher type |
| search | string Example: search=VIP customers Search audiences by name or description |
| audienceKeys | string Example: audienceKeys=aud_123,aud_456,aud_789 Filter audiences by specific audience keys (comma-separated) |
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/audiences?page=0&limit=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "audienceKey": "string",
- "organizationKey": "string",
- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}| active required | boolean |
| name required | string |
| description | string |
| matcherType required | string Enum: "attribute-matcher" "list-matcher" "null-matcher" |
| matcher | object |
| segmentKey | string |
| refreshedAt | string <date-time> |
| memberCount | number |
{- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "segmentKey": "string",
- "refreshedAt": "2019-08-24T14:15:22Z",
- "memberCount": 0
}{- "audience": {
- "audienceKey": "string",
- "organizationKey": "string",
- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/audiences/{audienceKey}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'{- "audience": {
- "audienceKey": "string",
- "organizationKey": "string",
- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| audienceKey required | string |
| active | boolean |
| name | string |
| description | string |
| matcherType | string Enum: "attribute-matcher" "list-matcher" "null-matcher" |
| matcher | object |
| segmentKey | string |
| refreshedAt | string <date-time> |
| memberCount | number |
{- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "segmentKey": "string",
- "refreshedAt": "2019-08-24T14:15:22Z",
- "memberCount": 0
}{- "audience": {
- "audienceKey": "string",
- "organizationKey": "string",
- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Returns the semantic data model definition including available facts, dimensions, and their attributes. This model can be used to construct segment definitions. The model may be customized per organization based on custom semantic model configuration.
{- "model": {
- "facts": {
- "purchase": {
- "label": "Purchase",
- "timeColumns": {
- "ts": {
- "kind": "timestamp"
}, - "month_year": {
- "kind": "month_year"
}
}, - "fields": {
- "total": {
- "type": "number",
- "label": "Total Amount"
}, - "count": {
- "type": "number",
- "label": "Purchase Count"
}
}, - "connectsTo": [
- "member",
- "purchaseLocation"
]
}
}, - "dimensions": {
- "member": {
- "label": "Member",
- "attributes": {
- "name": {
- "type": "string",
- "label": "Name"
}, - "email": {
- "type": "string",
- "label": "Email"
}
}, - "isEntity": true
}, - "tier": {
- "label": "Member Tier",
- "attributes": {
- "name": {
- "type": "string",
- "label": "Tier Name"
}
}
}
}
}
}Estimates the number of members that would match the given segment definition. Also returns the total organization member count and the percentage of members that match.
| definition required | object DSL-based audience definition to estimate member count |
{- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}
}{- "estimation": {
- "estimatedCount": 1250,
- "totalOrgMembers": 5000,
- "percentage": 25,
- "isValid": true,
- "error": "Invalid field reference in metric condition"
}
}Returns paginated and searchable values for a specific dimension within the organization context. Supported dimensions: memberGender, memberType, memberTag, tier, purchaseLocation, purchaseTag. Supports pagination (page, limit) and case-insensitive search by name.
| dimensionKey required | string |
| page | number >= 1 Default: 1 Example: page=1 Page number (1-indexed) |
| limit | number [ 1 .. 1000 ] Default: 100 Example: limit=100 Items per page |
| search | string Example: search=gold Search term for dimension value names (case-insensitive) |
{- "dimensionValues": {
- "values": [
- {
- "id": 1,
- "label": "Gold"
}
], - "totalCount": 150,
- "page": 1,
- "limit": 100,
- "count": 100
}
}| ledgerKey required | string |
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
{- "ledger": {
- "ledgerKey": "string",
- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultAccountId": 0,
- "organizationKey": "string"
}
}| ledgerKey required | string |
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
| name required | string |
| description | string |
{- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger"
}{- "ledger": {
- "ledgerKey": "string",
- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultAccountId": 0,
- "organizationKey": "string"
}
}| page | number >= 0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "ledgerKey": "string",
- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultAccountId": 0,
- "organizationKey": "string"
}
]
}| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
| name required | string |
| description | string |
{- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger"
}{- "ledger": {
- "ledgerKey": "string",
- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "defaultAccountId": 0,
- "organizationKey": "string"
}
}| ledgerKey required | string |
| page | number >= 0 The page number for pagination |
| limit | number [ 1 .. 25 ] Example: limit=10 The limit of items to return per page |
| order | string Order of columns in result in the format 'column,asc|desc?'. Samples: ?order=col1 or ?order=col1,asc |
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "ledgerKey": "string",
- "ledgerAccountKey": "string",
- "alias": "string",
- "name": "Main Ledger Account",
- "active": true,
- "isCurrency": true,
- "decimals": 0,
- "formatString": "string",
- "algorandAssetId": "string",
- "maxSupply": 0,
- "isRevolving": true,
- "pointTrackingEnabled": true,
- "syncAlgorand": true,
- "expiresInMonths": 0,
- "issued": 0,
- "isDefaultAccount": true
}
]
}