Loyalty Core Platform API (2.0)
Download OpenAPI specification:Download
Get all the coupon books for the current organization
Authorizations:
query Parameters
| 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 |
| search | string Filter by full text search |
| tags | string |
| status | string Enum: "draft" "published" "disabled" "archived" The status of the coupon book |
| locale | string Translation locale requested for the coupon |
| audiences | string |
| loyaltyProgramKey | string |
| externalId | string |
Responses
Request samples
- curl
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/coupon-books?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
Response samples
- 200
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}
]
}Creates a new coupon book
Authorizations:
Request Body schema: application/jsonrequired
| externalId | string |
| rankingIndex | number |
| audienceKeys | Array of strings |
| name required | string |
| description | string |
| subtitle | string |
| pictureUrl | string |
| detailPictureUrl | string |
| customAttributes | object |
| condition | object |
| type required | string |
| discountAmount | number |
| discountType | string |
| tags | Array of strings |
| publishingStatus required | string Enum: "archived" "draft" "disabled" "published" |
| validFromDate | string <date-time> |
| validToDate | string <date-time> |
| maxAssignedPerMember | number |
| maxAssignedPerCoupon | number |
| maxCouponCount | number |
| defaultLocale | string |
| assignmentRequiredPoints | number |
| usageRequiredPoints | number |
| contentSchemaId | number |
| contentSchemaVersionId | number |
| 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 |
Responses
Request samples
- Payload
- curl
{- "externalId": "string",
- "rankingIndex": 0,
- "audienceKeys": [
- "string"
], - "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "customAttributes": { },
- "condition": { },
- "type": "string",
- "discountAmount": 0,
- "discountType": "string",
- "tags": [
- "string"
], - "publishingStatus": "archived",
- "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,
- "locale": "string",
- "content": { },
- "isDefaultLocale": true,
- "requiredPointsConfig": { },
- "tiers": [
- 0
], - "loyaltyProgramKey": "string"
}Response samples
- 200
{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}
}Get an existing coupon book details
Authorizations:
path Parameters
| couponBookKey required | string |
query Parameters
| locale | string Translation locale requested for the coupon |
Responses
Request samples
- curl
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/coupon-books/{couponBookKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
Response samples
- 200
{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}
}Updates a coupon book
Authorizations:
path Parameters
| couponBookKey required | string |
Request Body schema: application/jsonrequired
| externalId | string |
| rankingIndex | number |
| audienceKeys | Array of strings |
| description | string |
| subtitle | string |
| pictureUrl | string |
| detailPictureUrl | string |
| 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 |
| locale | string Locale |
| content | object Content of the coupon book |
| isDefaultLocale | boolean Is the locale default |
| requiredPointsConfig required | object (RequiredPointsConfig) |
| publishingStatus | string The status of the coupon book |
| name | string The name of the coupon book |
| extraFields | object content extra fields |
| tiers | Array of numbers Tiers |
| loyaltyProgramKey | string |
Responses
Request samples
- Payload
- curl
{- "externalId": "string",
- "rankingIndex": 0,
- "audienceKeys": [
- "string"
], - "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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,
- "locale": "string",
- "content": { },
- "isDefaultLocale": true,
- "requiredPointsConfig": { },
- "publishingStatus": "string",
- "name": "string",
- "extraFields": { },
- "tiers": [
- 0
], - "loyaltyProgramKey": "string"
}Response samples
- 200
{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}
}Updates the status of a coupon book
Authorizations:
path Parameters
| couponBookKey required | string |
Request Body schema: application/jsonrequired
| publishingStatus required | string Enum: "draft" "published" "disabled" "archived" Status of the coupon book |
Responses
Request samples
- Payload
- curl
{- "publishingStatus": "draft"
}Response samples
- 200
{- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}
}Get all the coupon books from a member
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 |
| tags | string |
| validFromDate | string <date-time> |
| validToDate | string <date-time> |
| locale | string Translation locale requested for the coupon |
| couponBookKey | string |
| withStockOnly | boolean |
| externalId | string |
Responses
Request samples
- curl
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}'
Response samples
- 200
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}
]
}Use a coupon from the coupon-book
Authorizations:
path Parameters
| loyaltyMemberId required | string |
| couponBookKey required | string |
Request Body schema: application/jsonrequired
| systemUniqueKey | string System Unique Key by Organization ID |
| code | string Code to be used |
| pendingCaptureLedgerTransactionId | string Ledger transaction ID |
| usageData | object |
| autoAssign | boolean |
Responses
Request samples
- Payload
- curl
{- "systemUniqueKey": "string",
- "code": "string",
- "pendingCaptureLedgerTransactionId": "1234",
- "usageData": { },
- "autoAssign": true
}Response samples
- 201
{- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "customAttributes": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Assign a coupon from the coupon-book
Authorizations:
path Parameters
| loyaltyMemberId required | string |
| couponBookKey required | string |
Request Body schema: application/jsonrequired
| amount | object Default: 1 Amount to be assigned for each code |
| pendingCaptureLedgerTransactionId | string Ledger transaction ID |
| systemUniqueKey | string |
| code | string |
| couponData | object |
| usageData | object |
| expiresAt | string <date-time> |
Responses
Request samples
- Payload
- curl
{- "amount": 1,
- "pendingCaptureLedgerTransactionId": "1234",
- "systemUniqueKey": "string",
- "code": "string",
- "couponData": { },
- "usageData": { },
- "expiresAt": "2019-08-24T14:15:22Z"
}Response samples
- 201
{- "couponUsage": {
- "couponUsageKey": "string",
- "couponCode": "string",
- "couponBook": {
- "couponBookKey": "string",
- "externalId": "string",
- "rankingIndex": 0,
- "name": "string",
- "description": "string",
- "subtitle": "string",
- "pictureUrl": "string",
- "detailPictureUrl": "string",
- "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"
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "customAttributes": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Get all the coupons from a member
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 |
| couponCode | string |
| couponBookKey | string |
Responses
Request samples
- curl
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}'
Response samples
- 200
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "code": "string",
- "amountAssigned": 0,
- "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",
- "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"
}
}
]
}Get all the coupon usages from a member
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 coupon usages created from this date |
| toCreatedAt | string <date-time> Filter coupon usages created up to this date |
| couponBookKey | string |
Responses
Request samples
- curl
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}'
Response samples
- 200
{- "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",
- "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"
}, - "couponBookKey": "string",
- "systemUniqueKey": "string",
- "customAttributes": { },
- "amountUsed": 0,
- "amountAssigned": 0,
- "updatedTotalUsages": 0,
- "updatedTotalAssigned": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Get all coupons
Authorizations:
query Parameters
| 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 |
Responses
Request samples
- curl
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}'
Response samples
- 200
{- "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",
- "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"
}
}
]
}Gets organization's members details
Authorizations:
query Parameters
| 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 |
Responses
Response samples
- 200
{- "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"
}
], - "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"
}
], - "total": 100,
- "page": 1,
- "limit": 10
}Creates a new member in the current organization
Authorizations:
Request Body schema: application/jsonrequired
| 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. |
| referralCode | string An Optional Referral Code |
Responses
Request samples
- Payload
{- "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",
- "referralCode": "ref-24fAdsa"
}Response samples
- 200
{- "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"
}
], - "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"
}
}Gets organization's Loyalty Member details
Authorizations:
path Parameters
| loyaltyMemberId required | string |
Responses
Response samples
- 200
{- "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"
}
], - "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"
}
}Updates a member in the current organization
Authorizations:
path Parameters
| loyaltyMemberId required | string |
Request Body schema: application/jsonrequired
| 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. |
| updateReason | string Reason for updating the member |
Responses
Request samples
- Payload
{- "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",
- "updateReason": "Updated member profile information"
}Response samples
- 200
{- "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"
}
], - "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"
}
}Check matching audiences for a member
Authorizations:
path Parameters
| loyaltyMemberId required | string |
Request Body schema: application/jsonrequired
| audienceIds required | Array of numbers |
Responses
Request samples
- Payload
{- "audienceIds": [
- 0
]
}Response samples
- 200
{- "audienceIds": [
- [
- 0
]
]
}Check members existence
Authorizations:
Request Body schema: application/jsonrequired
| loyaltyMemberIds required | Array of strings List of loyaltyMemberId |
Responses
Request samples
- Payload
{- "loyaltyMemberIds": [
- "string"
]
}Response samples
- 200
{- "loyaltyMembers": [
- {
- "loyaltyMemberId": "11111-11111",
- "exists": true
}
]
}Gets events for a loyalty member
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 |
Responses
Response samples
- 200
{- "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"
], - "evaluationResults": { },
- "executionResults": { },
- "payload": { },
- "location": "string",
- "evaluationStatus": 0,
- "status": "pending",
- "limitDiscardedTotalAmount": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Gets transactions for a loyalty member
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 |
Responses
Response samples
- 200
{- "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"
}
]
}Track loyalty events
Track loyalty events
Authorizations:
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
- curl
{- "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
}Response samples
- 200
{- "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
}Mint loyalty points to default account
Authorizations:
path Parameters
| loyaltyMemberId required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
{- "amount": 1,
- "systemUniqueKey": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "description": "string",
- "tags": [
- "string"
]
}Response samples
- 200
{- "result": {
- "ledgerTransactionId": "string",
- "ledgerAccountKey": "string",
- "updatedBalance": 0,
- "status": 0
}
}Burn loyalty points to default account
Burn loyalty points to default account.
Authorizations:
path Parameters
| loyaltyMemberId required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
{- "amount": 1,
- "systemUniqueKey": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "description": "string",
- "tags": [
- "string"
], - "captureMethod": "auto"
}Response samples
- 200
{- "result": {
- "ledgerTransactionId": "string",
- "ledgerAccountKey": "string",
- "updatedBalance": 0,
- "status": 0
}
}Capture loyalty points from default account.
Capture loyalty points from default account. Points must have been burned with captureMethod = manual
Authorizations:
Request Body schema: application/jsonrequired
required | Array of objects (TransactionCaptureDto) The transactions to capture | ||||
Array
| |||||
Responses
Request samples
- Payload
{- "transactions": [
- {
- "captureAmount": 100,
- "ledgerTransactionId": "string"
}
]
}Response samples
- 200
{- "ok": true
}Revert loyalty points from default account.
Revert loyalty points from default account. Can only revert debit transactions and batch is processed as an atomic set.
Authorizations:
Request Body schema: application/jsonrequired
required | Array of objects (RevertLoyaltyPointsDto) The transactions to revert | ||||||||||
Array
| |||||||||||
Responses
Request samples
- Payload
{- "transactions": [
- {
- "ledgerTransactionId": "string",
- "systemUniqueKey": "string",
- "externalEventDate": "2019-08-24T14:15:22Z",
- "description": "string",
- "tags": [
- "string"
]
}
]
}Response samples
- 200
{- "results": [
- {
- "ledgerTransactionId": "string",
- "ledgerAccountKey": "string",
- "updatedBalance": 0,
- "status": 0
}
]
}List Member's Transactions
Get all member transactions
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 |
Responses
Request samples
- curl
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}'
Response samples
- 200
{- "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"
]
}
]
}Get a referral program by key
Authorizations:
path Parameters
| referralProgramKey required | string |
Responses
Response samples
- 200
{- "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
Create a new referral code for a given loyalty member
Authorizations:
path Parameters
| referralProgramKey required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
{- "codes": [
- "string"
], - "loyaltyMemberId": "string"
}Response samples
- 200
{- "codes": [
- {
- "loyaltyMemberId": "string",
- "code": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Get organization's missions
Authorizations:
query Parameters
| 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 |
Responses
Request samples
- curl
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/missions?page=0&limit=10' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
Response samples
- 200
{- "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"
}
]
}Create a new mission
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "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"
}Response samples
- 200
{- "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"
}
}Request samples
- curl
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/missions/{missionKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
Response samples
- 200
{- "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"
}
}Get member's missions
Authorizations:
path Parameters
| loyaltyMemberId required | string |
query Parameters
| 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 |
Responses
Request samples
- curl
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}'
Response samples
- 200
{- "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"
}
}
]
}Get organization's campaigns
Authorizations:
query Parameters
| 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 |
Responses
Request samples
- curl
'https://api.sandbox.qurable.io/v2/campaigns?page=0&limit=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'Response samples
- 200
{- "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"
}
]
}
]
}Create a new campaign
Authorizations:
Request Body schema: application/jsonrequired
| 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) |
Responses
Request samples
- Payload
- curl
{- "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"
}
]
}Response samples
- 200
{- "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"
}
]
}
}Request samples
- curl
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/campaigns/{campaignKey}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'Response samples
- 200
{- "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"
}
]
}
}Update an existing campaign
Authorizations:
path Parameters
| campaignKey required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "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"
}Response samples
- 200
{- "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"
}
]
}
}Get all actions for a campaign
Authorizations:
path Parameters
| campaignKey required | string |
query Parameters
| 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 |
Responses
Request samples
- curl
- javascript
curl -X GET "https://api.qurable.com/v2/campaigns/{campaignKey}/actions" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"
Response samples
- 200
{- "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"
}
]
}Create a new action
Authorizations:
path Parameters
| campaignKey required | string |
Request Body schema: application/jsonrequired
| actionIndex | number |
| abortEvaluationIfFalse | boolean |
| abortEvaluationOnError | boolean |
| name required | string |
| rules | object |
| effects required | object |
| status required | string Enum: "disabled" "running" "draft" |
Responses
Request samples
- Payload
- curl
- javascript
{- "actionIndex": 0,
- "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "name": "string",
- "rules": { },
- "effects": { },
- "status": "disabled"
}Response samples
- 200
{- "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"
}
}Get a specific action by key
Authorizations:
path Parameters
| campaignKey required | string |
| actionKey required | string |
Responses
Request samples
- curl
- javascript
curl -X GET "https://api.qurable.com/v2/campaigns/{campaignKey}/actions/{actionKey}" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"
Response samples
- 200
{- "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"
}
}Update an existing action
Authorizations:
path Parameters
| campaignKey required | string |
| actionKey required | string |
Request Body schema: application/jsonrequired
| actionIndex | number |
| abortEvaluationIfFalse | boolean |
| abortEvaluationOnError | boolean |
| name required | string |
| rules | object |
| effects required | object |
| status required | string Enum: "disabled" "running" "draft" |
Responses
Request samples
- Payload
- curl
- javascript
{- "actionIndex": 0,
- "abortEvaluationIfFalse": true,
- "abortEvaluationOnError": true,
- "name": "string",
- "rules": { },
- "effects": { },
- "status": "disabled"
}Response samples
- 200
{- "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"
}
}Get organization's action matchers
Authorizations:
query Parameters
| type | string Value: "item-matcher" |
| page | number Default: 0 |
| limit | number Default: 10 |
Responses
Request samples
- curl
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/action-matchers?page=0&limit=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'Response samples
- 200
{- "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
}Create a new action matcher
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "name": "string",
- "type": "item-matcher",
- "matcher": { }
}Response samples
- 200
{- "matcher": {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Request samples
- curl
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/action-matchers/{matcherKey}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'Response samples
- 200
{- "matcher": {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Update an existing action matcher
Authorizations:
path Parameters
| matcherKey required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "name": "string",
- "type": "item-matcher",
- "matcher": { }
}Response samples
- 200
{- "matcher": {
- "organizationKey": "string",
- "name": "string",
- "matcherKey": "string",
- "type": "item-matcher",
- "matcher": { },
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Request samples
- curl
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}'
Response samples
- 200
{- "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"
}
]
}Request samples
- curl
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}'
Response samples
- 200
{- "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
}
]
}Create a new smart campaign
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "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"
}Response samples
- 200
{- "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"
}
}Request samples
- curl
curl -X 'GET' \ 'https://api.sandbox.qurable.io/v2/smart-campaigns/{campaignKey}' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {YOUR_TOKEN}'
Response samples
- 200
{- "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"
}
}Update an existing smart campaign
Authorizations:
path Parameters
| campaignKey required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "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"
}Response samples
- 200
{- "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"
}
}Create a new segment
Creates a new segment with an automatically linked list-matcher audience. The segment defines membership refresh schedules and configuration.
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
| tags | string Tags associated with the segment |
| definition | object DSL-based audience definition for complex segmentation queries |
Responses
Request samples
- Payload
{- "name": "VIP Customers",
- "description": "High-value customers with over $1000 in purchases",
- "refreshType": "once",
- "isActive": true,
- "tags": "VIP,High-value",
- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}
}Response samples
- 201
{- "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"
}
}
}Get all segments for the organization
Retrieves a paginated list of segments with support for filtering by active status and searching by name/description.
Authorizations:
query Parameters
| 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 |
Responses
Response samples
- 200
{- "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"
}
}
]
}Get a segment by key
Authorizations:
path Parameters
| segmentKey required | string Segment key |
Responses
Response samples
- 200
{- "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"
}
}
}Update a segment
Updates segment properties. Changes to name and description are automatically synchronized to the linked audience.
Authorizations:
path Parameters
| segmentKey required | string Example: seg_01H9X8Y7Z6P5Q4R3S2T1V0W9 Unique segment identifier |
Request Body schema: application/jsonrequired
| version | number >= 1 Segment version number for optimistic locking |
Responses
Request samples
- Payload
{- "version": 2
}Response samples
- 200
{- "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"
}
}
}Get a set of members from an audience with pagination support
Authorizations:
path Parameters
| audienceKey required | string Audience key |
query Parameters
| 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) |
Responses
Response samples
- 200
{- "members": [
- {
- "loyaltyMemberId": "member_123",
- "updatedAt": "2023-12-01T10:00:00Z"
}
], - "lastEvaluatedKey": "eyJtZW1iZXJJZCI6MTIzLCJhdWRpZW5jZUtleSI6ImF1ZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9",
- "count": 100
}Add and remove multiple members to a persisted audience
Authorizations:
path Parameters
| audienceKey required | string Audience key |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
{- "addLoyaltyMemberIds": [
- "lm_123",
- "lm_456"
], - "removeLoyaltyMemberIds": [
- "lm_789"
]
}Response samples
- 200
{- "added": [
- "lm_123",
- "lm_456"
], - "removed": [
- "lm_789"
]
}Get organization's audiences
Authorizations:
query Parameters
| 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 |
Responses
Request samples
- curl
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/audiences?page=0&limit=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'Response samples
- 200
{- "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"
}
]
}Create a new audience
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "segmentKey": "string",
- "refreshedAt": "2019-08-24T14:15:22Z",
- "memberCount": 0
}Response samples
- 200
{- "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"
}
}Request samples
- curl
curl -X 'GET' \
'https://api.sandbox.qurable.io/v2/audiences/{audienceKey}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {YOUR_TOKEN}'Response samples
- 200
{- "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"
}
}Update an existing audience
Authorizations:
path Parameters
| audienceKey required | string |
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
- curl
{- "active": true,
- "name": "string",
- "description": "string",
- "matcherType": "attribute-matcher",
- "matcher": { },
- "segmentKey": "string",
- "refreshedAt": "2019-08-24T14:15:22Z",
- "memberCount": 0
}Response samples
- 200
{- "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"
}
}Get the semantic data model
Returns the semantic data model definition including available facts, dimensions, and their attributes. This model can be used to construct segment definitions.
Authorizations:
Responses
Response samples
- 200
{- "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"
}
}
}
}
}
}Estimate member count for a segment definition
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.
Authorizations:
Request Body schema: application/jsonrequired
| definition required | object DSL-based audience definition to estimate member count |
Responses
Request samples
- Payload
{- "definition": {
- "logic": {
- "op": "AND",
- "children": [
- {
- "type": "dimension",
- "dimension": "tier",
- "attribute": "name",
- "operator": "=",
- "value": "gold"
}
]
}
}
}Response samples
- 200
- 201
{- "estimation": {
- "estimatedCount": 1250,
- "totalOrgMembers": 5000,
- "percentage": 25,
- "isValid": true,
- "error": "Invalid field reference in metric condition"
}
}Get available values for a dimension
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.
Authorizations:
path Parameters
| dimensionKey required | string |
query Parameters
| 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) |
Responses
Response samples
- 200
{- "dimensionValues": {
- "values": [
- {
- "id": 1,
- "label": "Gold"
}
], - "totalCount": 150,
- "page": 1,
- "limit": 100,
- "count": 100
}
}Gets a single Ledger for the current organization.
Authorizations:
path Parameters
| ledgerKey required | string |
header Parameters
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
Responses
Response samples
- 200
{- "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"
}
}Updates a single Ledger in the current organization.
Authorizations:
path Parameters
| ledgerKey required | string |
header Parameters
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
Request Body schema: application/jsonrequired
| name required | string |
| description | string |
Responses
Request samples
- Payload
{- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger"
}Response samples
- 200
{- "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"
}
}Gets all Ledgers for the current organization.
Authorizations:
query Parameters
| 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 |
header Parameters
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
Responses
Response samples
- 200
{- "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"
}
]
}Creates a single Ledger in the current organization.
Authorizations:
header Parameters
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
Request Body schema: application/jsonrequired
| name required | string |
| description | string |
Responses
Request samples
- Payload
{- "name": "Main Loyalty Program Ledger",
- "description": "This is the main Loyalty Program Ledger"
}Response samples
- 200
{- "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"
}
}Gets all Ledger's Accounts
Authorizations:
path Parameters
| ledgerKey required | string |
query Parameters
| 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 |
header Parameters
| X-Q-Forwarded-Org | string Organization Key |
| X-Q-Forwarded-User | string User Key |
Responses
Response samples
- 200
{- "totalCount": 0,
- "page": 0,
- "limit": 0,
- "results": [
- {
- "ledgerKey": "string",
- "ledgerAccountKey": "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
}
]
}