Download OpenAPI specification:Download
Retrieve the Actions for a specific User.
This path is versioned via the x-api-version header, which should be '9' or higher.
| userId required | string The unique ID of the User to retrieve the Actions for. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| when.timestamp[.gt | .lte | .eq | .neq] | string <date-time> Filter the response using action |
| type[.in | .nin] | string Filter the response using action 'type' in comparison this list of comma separated types. Valid values of comparison are 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided |
| paymentType[.in | .nin] | string Example: paymentType[.in | .nin]=CARDHOLDER_PRESENT,APPLEPAY Filter transactions by payment type. Accepts comma-separated list of OrderPaymentType enum values. Valid values: CASH_AT_POS, CARD_AT_POS, GIFT_CARD_AT_POS, OTHER_AT_POS, APPLEPAY, GOOGLEPAY, CARD_ON_FILE, CARD_TENDERED, GIFT_CARD, CARDHOLDER_PRESENT, CASH, CARD, OTHER, APP, PAY_BY_BANK. Use 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided. |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "actions": [
- {
- "type": "XXX_XXX",
- "tenantId": "111111111111111111111111",
- "when": {
- "timestamp": "YYYY-MM-DDTHH:mm:ss.SSSZ",
- "monthofyear": 1,
- "weekofyear": 1,
- "dayofmonth": 1,
- "dayofweek": 1,
- "daypart": "XXX"
}, - "metadata": {
- "/* ... */": null
}, - "context": {
- "tenant": {
- "_id": "111111111111111111111111",
- "title": "Hooli"
}, - "user": {
- "_id": "111111111111111111111111",
- "name": "Gavin Belson",
- "primaryPlatform": "IOS"
}, - "location": {
- "_id": "111111111111111111111111",
- "title": "Hooli Restaurant",
- "geo": [
- 0,
- 0
], - "regions": [ ],
- "tags": [ ]
}, - "tags": [ ]
}, - "environment": "PRODUCTION"
}
]
}Retrieves the Actions for a specific Location
This path is versioned via the x-api-version header, which should be '9' or higher.
| locationId required | string The unique ID of the Location to retrieve the Actions for. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| when.timestamp[.gt | .lte | .eq | .neq] | string <date-time> Filter the response using action |
| type[.in | .nin] | string Filter the response using action 'type' in comparison this list of comma separated types. Valid values of comparison are 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided |
| paymentType[.in | .nin] | string Example: paymentType[.in | .nin]=CARDHOLDER_PRESENT,APPLEPAY Filter transactions by payment type. Accepts comma-separated list of OrderPaymentType enum values. Valid values: CASH_AT_POS, CARD_AT_POS, GIFT_CARD_AT_POS, OTHER_AT_POS, APPLEPAY, GOOGLEPAY, CARD_ON_FILE, CARD_TENDERED, GIFT_CARD, CARDHOLDER_PRESENT, CASH, CARD, OTHER, APP, PAY_BY_BANK. Use 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided. |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "actions": [
- {
- "type": "XXX_XXX",
- "tenantId": "111111111111111111111111",
- "when": {
- "timestamp": "YYYY-MM-DDTHH:mm:ss.SSSZ",
- "monthofyear": 1,
- "weekofyear": 1,
- "dayofmonth": 1,
- "dayofweek": 1,
- "daypart": "XXX"
}, - "metadata": {
- "/* ... */": null
}, - "context": {
- "tenant": {
- "_id": "111111111111111111111111",
- "title": "Hooli"
}, - "user": {
- "_id": "111111111111111111111111",
- "name": "Gavin Belson",
- "primaryPlatform": "IOS"
}, - "location": {
- "_id": "111111111111111111111111",
- "title": "Hooli Restaurant",
- "geo": [
- 0,
- 0
], - "regions": [ ],
- "tags": [ ]
}, - "tags": [ ]
}, - "environment": "PRODUCTION"
}
]
}Retrieve the Actions for the Tenant.
Get all of the Actions for the Tenant, sorted in reverse chronological order.
For an overview of the Action construct, please see the Overview of Actions guide. This includes a link to the JSON Schema the defines the structure of an Action in detail.
This path is versioned via the x-api-version header, which should be '9' or higher.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| when.timestamp[.gt | .lte | .eq | .neq] | string <date-time> Filter the response using action |
| type[.in | .nin] | string Filter the response using action 'type' in comparison this list of comma separated types. Valid values of comparison are 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided |
| locationId | string Filter the response using action 'locationId'. This is a list of comma separated locationIds. |
| credentialId | string Filter the response using a user's full credential (email or phone number) |
| paymentType[.in | .nin] | string Example: paymentType[.in | .nin]=CARDHOLDER_PRESENT,APPLEPAY Filter transactions by payment type. Accepts comma-separated list of OrderPaymentType enum values. Valid values: CASH_AT_POS, CARD_AT_POS, GIFT_CARD_AT_POS, OTHER_AT_POS, APPLEPAY, GOOGLEPAY, CARD_ON_FILE, CARD_TENDERED, GIFT_CARD, CARDHOLDER_PRESENT, CASH, CARD, OTHER, APP, PAY_BY_BANK. Use 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided. |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "actions": [
- {
- "type": "XXX_XXX",
- "tenantId": "111111111111111111111111",
- "when": {
- "timestamp": "YYYY-MM-DDTHH:mm:ss.SSSZ",
- "monthofyear": 1,
- "weekofyear": 1,
- "dayofmonth": 1,
- "dayofweek": 1,
- "daypart": "XXX"
}, - "metadata": {
- "/* ... */": null
}, - "context": {
- "tenant": {
- "_id": "111111111111111111111111",
- "title": "Hooli"
}, - "user": {
- "_id": "111111111111111111111111",
- "name": "Gavin Belson",
- "primaryPlatform": "IOS"
}, - "location": {
- "_id": "111111111111111111111111",
- "title": "Hooli Restaurant",
- "geo": [
- 0,
- 0
], - "regions": [ ],
- "tags": [ ]
}, - "tags": [ ]
}, - "environment": "PRODUCTION"
}
]
}Generate a csv export of actions
| limit | number The maximum number of actions to be exported |
| from required | string Only export actions from this date |
| to required | string Only export actions up to this date |
| maxFileSizeMB | number Maximum size of a single csv file |
| locationIds | Array of strings Only export actions at these locations |
| types required | Array of strings Only export actions matching these types |
{- "limit": 0,
- "from": "string",
- "to": "string",
- "maxFileSizeMB": 0,
- "locationIds": [
- "string"
], - "types": [
- "string"
]
}{- "code": "string",
- "message": "string"
}Download a csv export of actions.
The full path including fileId is retrieved from the import operation's href.
{- "code": "string",
- "message": "string"
}Create one address for a specific user.
| userId required | string The unique ID of the user to create the address for. |
| name | string |
required | object |
| coordinates required | Array of numbers[ items = 2 items ] [Longitude, Latitude] |
| note | string |
{- "name": "string",
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postalCode": "string",
- "country": "string"
}, - "coordinates": [
- 0
], - "note": "string"
}[- {
- "name": "testName",
- "address": {
- "line1": "testLine1",
- "line2": "testLine2",
- "city": "testCity",
- "region": "testRegions",
- "postalCode": "AB1 1AB",
- "country": "GB"
}, - "coordinates": [
- 1,
- 1
], - "note": "testNote",
- "_id": "XXXXXXXXXXXXXXXXXXXXXXXX"
}
]Update one address for a specific user.
| userId required | string The unique ID of the user to create the address for. |
| addressId required | string The unique ID of the address to update. |
| name | string |
required | object |
| coordinates required | Array of numbers[ items = 2 items ] [Longitude, Latitude] |
| note | string |
{- "name": "string",
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postalCode": "string",
- "country": "string"
}, - "coordinates": [
- 0
], - "note": "string"
}[- {
- "name": "testName",
- "address": {
- "line1": "testLine1",
- "line2": "testLine2",
- "city": "testCity",
- "region": "testRegions",
- "postalCode": "AB1 1AB",
- "country": "GB"
}, - "coordinates": [
- 1,
- 1
], - "note": "testNote",
- "_id": "XXXXXXXXXXXXXXXXXXXXXXXX"
}
]Delete one address for a specific user.
| userId required | string The unique ID of the user to delete the address from. |
| addressId required | string The unique ID of the address to delete. |
[- {
- "name": "remainingAddressName",
- "address": {
- "line1": "remainingTestLine1",
- "line2": "remainingTestLine2",
- "city": "remainingTestCity",
- "region": "remainingTestRegions",
- "postalCode": "AB1 1AB",
- "country": "GB"
}, - "coordinates": [
- 1,
- 1
], - "note": "remainingTestNote",
- "_id": "XXXXXXXXXXXXXXXXXXXXXXXX"
}
]Suggest addresses based on a text query or a set of coordinates.
| address required | string |
| position | Array of numbers[ items = 2 items ] [Longitude, Latitude] |
{- "address": "string",
- "position": [
- 0
]
}{- "items": [
- {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postalCode": "string",
- "country": "string"
}
]
}Get an addresses' coordinates based on a partial or full address.
| line1 required | string |
| line2 | string |
| city required | string |
| region | string |
| postalCode | string |
| country required | string |
{- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postalCode": "string",
- "country": "string"
}{- "position": [
- 0
]
}An 'award' records whether or not a user has accrued loyalty points for a particular 'perk'. A perk is the definition of an award type and defines how the award is earnt and redeemed.
When a user has sufficient points in the award points.available field, the award can be redeemed
in exchange for something of value, such as a discount on an order.
In the past, Pepper had two loyalty schemas: Perks and 'PointPerk'. All perks are now stored as 'PointPerks', and we are now in the process of refactoring the endpoints to remove the distinctions between the two schemes.
Gets all Awards for the merchant or user.
The response is paged. Use limit and startKey to control the page returned.
When called by a normal User, this returns all the user's awards.
When called by authenticated Admin user, this returns all the merchant's awards. An admin user can specify a userId query parameter to
return that user's awards only.
Note: when the merchant is connected to an external loyalty system rather than the PEPPER loyalty system,
getting all merchant's awards is not supported.
A caller can select specific fields to be returned by setting the fields query parameter.
This path is versioned via the x-api-version header, which should be '9' or higher.
When x-api-version header is not present, the legacy resource is returned.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| userId | string Retrieve awards for this user. Admin only. |
| includeUnvisualisedAwards | string if true, it will include awards that have not been visualised in the response. |
| includeDisabled | string if true, it will include awards linked to disabled perks in the response. |
| locationId | string if supported by merchant's setup, it will only return the list of awards valid for the location ID provided. |
| fields | string Limit the response to specific fields. Valid fields are:
|
| updatedAt[.gt | .lte | .eq | .neq] | string <date-time> Filter the response using award Filtering using |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "updatedAt": "string",
- "locationIds": [
- "string"
], - "points": {
- "available": 0
}
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Upload and process file to grant awards perks and award points to users. The response is an operation resource.
Use the response's operation _id to poll GET /operations/:operationId in order to monitor progress.
When complete, the operation will contain a result.href field providing a link to download a file
of results.
Use the dryRun=true to test processing your file and validating userIds before running the award granting for real.
Use the dryRun=false to process the file and grant awards.
Warning: If you repeat the import, extra award points will be granted. The import is NOT idempotent.
The import file format should be a plain text file with comma separated values, and the first row as column headings. The possible column formats are:
With perk_id column:
user_id, perk_id
60f7e53e944a60af2caa9977, 60f7e54b3438386d4b09719a
60f7e55550f30ab39776b834, 60f7e55d04d203c77d7f54d9
With perk_id and points column:
user_id, perk_id, points
60f7e53e944a60af2caa9977, 60f7e54b3438386d4b09719a, 5
60f7e55550f30ab39776b834, 60f7e55d04d203c77d7f54d9, 3
With one or more perk_XXXXX and columns, where XXXX is the perk id to award, and the
column contains the points to award
user_id, perk_60f7e54b3438386d4b09719a, perk_60f7e55d04d203c77d7f54d9
60f7e53e944a60af2caa9977, 5, 0
60f7e55550f30ab39776b834, 3, 1
| dryRun | string Set |
| suppressEvents | string Set |
| x-pepper-req-nonce | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| file | string <binary> |
{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "result": {
- "message": "string",
- "etaMs": 0,
- "total": 0,
- "skipped": 0,
- "imported": 0,
- "errors": 0,
- "href": "string"
}, - "error": {
- "code": "string",
- "message": "string"
}, - "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Download a file of award grant import results.
The full path including fileId is retrieved from the import operation's href.
Example Result File:
user_id,perk_id,points,result,perk_awarded_1,award_awarded_1,points_available_1,error
5bc074a3bd07b10d8684773e,60f02ff1cbe10f0ecca644a9,1,ok,60f02ff1cbe10f0ecca644a9,63a099fe6f0b6d0eca2fbcaa,1,
5bd09db25fe1810d99862192,60f02ff1cbe10f0ecca644a9,1,fail,,,,user not found
| fileId required | string The ID of the file to download. |
{- "code": "string",
- "message": "string"
}Update an award for a user.
Use this method to change the points fields associated with an
award.
Unlike grant, redeem or refund award, no actions are emitted on this call.
| awardId required | string The Id of the award to update. |
object | |||
| |||
{- "points": {
- "available": 0
}
}{- "code": "string",
- "message": "string"
}Grant an award based on the specified perk to a user or segment.
Note: this endpoint returns the old Perks schema and will be changed in a future version.
Use the endpoint POST /pointperks/:perkId/awards in the meantime.
| perkId required | string The Id of the perk to award. |
| userId required | string |
{- "userId": "string"
}{- "code": "string",
- "message": "string"
}Grant an award based on the specified perk to a user.
Note: this endpoint will be deprecated in an upcoming release and be replaced by the endpoint POST /perks/:perkId/awards.
| perkId required | string The Id of the perk to award. |
| userId required | string |
| points | number The value to award the user. If not specified, the default value of the perk will be used. |
| locationId | string The id of the location associated with this grant, if any |
{- "userId": "string",
- "points": 0,
- "locationId": "string"
}{- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "updatedAt": "string",
- "locationIds": [
- "string"
], - "points": {
- "available": 0
}
}Get all Awards for a specific User
Note: this endpoint returns the old Perks schema and will be changed in a future version.
Use the endpoint GET /users/:userId/pointawards in the meantime.
| userId required | string The unique ID of the User to retrieve the Awards for. |
| includeUnvisualisedAwards | string if true, it will include awards that have not been visualised in the response. |
| includeDisabled | string if true, it will include awards linked to disabled perks in the response. |
| locationId | string if supported by merchant's setup, it will only return the list of awards valid for the location ID provided. |
{- "code": "string",
- "message": "string"
}Get all awards for a specific user
This endpoint will be deprecated in an upcoming release and be replaced by GET /user/:userId/awards
| userId required | string The unique ID of the User to retrieve the Awards for. |
| includeUnvisualisedAwards | string if true, it will include awards that have not been visualised in the response. |
| includeDisabled | string if true, it will include awards linked to disabled perks in the response. |
| locationId | string if supported by merchant's setup, it will only return the list of awards valid for the location ID provided. |
{- "awards": [
- {
- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "updatedAt": "string",
- "locationIds": [
- "string"
], - "points": {
- "available": 0
}
}
]
}Redeem a specific award for a specific user.
Note: this endpoint affects the old Perks schema and will be changed in a future version.
Use the endpoint GET /users/:userId/pointawards/:awardId in the meantime.
| userId required | string The Id of the user |
| awardId required | string The Id of the award. |
| valueToRedeem required | number The number of points to deduct from award |
{- "valueToRedeem": 0
}{- "code": "string",
- "message": "string"
}Redeem a specific award for a specific user.
This endpoint will be deprecated in an upcoming release and be replaced by PUT users/:userId/awards/:awardId (TBD)
| userId required | string The Id of the user |
| awardId required | string The Id of the award. |
| valueToRedeem required | number The number of points to deduct from award |
| locationId | string The id of the location where the award was redeemed |
{- "valueToRedeem": 0,
- "locationId": "string"
}{- "code": "string",
- "message": "string"
}Refund a redeemption of a specific award for a specific user.
This endpoint will be deprecated in an upcoming release and be replaced by PUT users/:userId/awards/:awardId (TBD)
| userId required | string The Id of the user |
| awardId required | string The Id of the award. |
| value required | number The number of points to refund to award |
{- "value": 0
}{- "code": "string",
- "message": "string"
}A 'checkin' records when a user has arrived at a particular location.
It is used by the platform to
If a Checkin is created for a User that does not already have a profile photo associated with their account, a status of 422 will be returned and the Checkin will not be created.
If the User for which a Checkin is being created is already checked in at another Location, the other Checkins will be deleted automatically for them. A User may only be checked in at a single Location at a time.
If the User is already checked in at the Location, an HTTP status code of 409 (Conflict) will be returned by the API.
Checkins will be automatically deleted after 30 minutes.
If the POS associated with the Merchant supports it, a notification will be delivered to the Location’s POS when a new Checkin is created.
| userId required | string The Id of the User to create the Checkin for. |
| locationId | string Location where the user checked in |
| type | string Enum: "AUTO" "MANUAL" "CFD" "OFFLINE" "UNKNOWN" |
| trigger | string Enum: "GEO" "BEACON" "CODE" "POS" "UNKNOWN" What triggered the checkin to occur |
{- "locationId": "string",
- "type": "AUTO",
- "trigger": "GEO"
}{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string",
- "locationId": "string",
- "trigger": "GEO"
}Retrieves the Checkins for a specific User.
| userId required | string The unique ID of the User to retrieve the Checkins for. |
| per_page | string Default: 20 Set the response to be paged by this number of results per page. |
| page | string Default: 1 Request a specific page of results in the response. The first page is page 1 |
{- "checkins": [
- {
- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string",
- "locationId": "string",
- "trigger": "GEO"
}
], - "summary": {
- "total": 0,
- "count": 0,
- "pages": 0,
- "page": 0
}
}Credentials gives access to users' login details as well as secondary email and phone details.
Get credentials, filtering by matching arguments such as id
| id | string Find credentials matching a specified email or mobile number. |
| provider | string Find credentials matching the provider (email, mobile) |
| sort | string The names of the fields to sort the results by, in decreasing order of precendence. Allowed values are |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "_id": "string",
- "id": "string",
- "provider": "EMAIL",
- "isVerified": "string",
- "isPrimary": "string"
}Create a secondary unverified passwordless (user will not be able to log in with) credential for a user. Triggers a verification code to be sent to the user.
| id required | string username of the new credential |
| provider required | string Enum: "EMAIL" "MOBILE" type of credential |
| skipVerification | boolean Indicates whether verification should be skipped for this credential |
{- "id": "user@pepperhq.com",
- "provider": "EMAIL"
}{- "_id": "5d3098a0ee2cb3561b704de3",
- "id": "user@pepperhq.com",
- "provider": "EMAIL",
- "isVerified": false,
- "isPrimary": false
}| credentialId required | string The unique ID of the Credential to verify. |
| verificationCode required | string verification code associated with the credential |
{- "verificationCode": "1234"
}{- "_id": "5d3098a0ee2cb3561b704de3",
- "id": "user@pepperhq.com",
- "provider": "EMAIL",
- "isVerified": true,
- "isPrimary": false
}Guests endpoint provides temporary user accounts, credentials and sessions for guest actions like ordering.
Guest users, credentials and sessions are automatically removed after 1 hour, unless they have been converted into a full USER acount
Create a guest user, credential and session for allowing guest actions like ordering.
| x-client-platform | string Enum: "ANDROID" "IOS" Identifies the platform type of the caller. |
| firstName | string |
| lastName | string |
| fullName | string |
Array of objects | |
| hasAgreedToShareData | boolean The user has accepted sharing his/her data for the purposes of using the Tenant's application (GDPR). |
| hasAgreedToReceiveMarketing | boolean The user has accepted receiving marketing messages from or on behalf of the Tenant (GDPR). |
| birthdate | string Birthdate in ISO format - eg 1997-12-25 |
| gender | string Enum: "FEMALE" "MALE" |
{- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "token": "string"
}
], - "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "birthdate": "string",
- "gender": "FEMALE"
}{- "_id": "string",
- "userId": "string",
- "tenantId": "string",
- "tenantTitle": "string",
- "permanent": true,
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "isPrimary": true,
- "roles": [
- "USER"
], - "user": {
- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
]
}
}Locations gives access to a merchant's locations for defining location specific details such as:
Gets locations for a Tenant filtering based on query parameters
This path is versioned via the x-api-version header. The current version is '9' or higher.
| state | string A comma separated list of location states to filter by. Possible states are 'PENDING', 'ACTIVE', 'RETIRED' |
| lat | number <double> The latitude of the search centre |
| long | number <double> The longitude of the search centre |
| search | string Filter to those locations whose title includes the search term, in a comma separated list. The match may be a substring. |
| title | string Title of the location to search for |
| favourites | boolean Filter to the user's favourite locations |
| tags | string Filter locations by tags, in a comma separated list. |
| services | boolean Filter to the locations which have all the listed services, in a comma separated list. |
| include | Array of strings Items Enum: "created" "updated" "state" "mainImageUrl" "alternativeOpeningHoursText" "buttons" "links" "description" "ordering" "VATnumber" "regions" "address" "tags" "zones" Specify which optional fields to return in the response. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Create a Location
This path is versioned via the x-api-version header. The current version is '9' or higher.
| x-api-version | number The behaviour of this path is versioned via the
|
| title required | string Name of the location |
| description | string Description of the location |
| state | any Enum: "PENDING" "ACTIVE" "RETIRED" |
| mainImageUrl | string URL to an image resource |
| listingImageUrl | string URL to an image resource |
object | |
| alternativeOpeningHoursText | string An HTML snippet that overrides how opening hours are displayed in the app. However, the standard opening hours will still be used to determine when the location is open for ordering. This will replace your standard defined opening hours. |
| facilities | Array of strings |
object Enable or disable different ordering services for the location | |
Array of objects | |
object Enable or disable different social media and third party services for the location | |
| VATnumber | string VAT / sales tax number |
object | |
object Contact details for the location | |
Array of objects | |
object | |
| geo required | Array of numbers = 2 items An array of 2 numbers for longitude, latitude |
| regions | Array of strings |
| tags | Array of strings |
| mapPinImageUrl | string Optional image url of pin to display to users on map |
| timezone | string Timezone of the location eg Europe/London |
object List of zones (keyed by the zone name) in the location that describes a set of tables e.g Garden, Indoors. |
{- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}Upload a CSV file of locations to create or update.
The response is an operation resource that can be polled to monitor progress.
When complete, the operation will contain a result.href field providing a link to download a file
of results.
Required columns:
title, geo_longitude (-180 to 180), geo_latitude (-90 to 90)Optional columns:
_id - MongoDB ObjectId for updatesstate, description, timezone, VATnumber, mainImageUrl, listingImageUrl, mapPinImageUrl, alternativeOpeningHoursTextfacilities, regions, tags - Pipe-delimited lists (e.g., "wifi|parking")Nested fields using dot notation:
address.* - line1, line2, city, region, postalCode, countrycontacts.* - phone, emailservices.* - checkins, pre_order, book_table, book_room, delivery, dine_in, tab, order_to_table, pay_at_table (boolean)openingHours.* - monday, tuesday, etc. (e.g., "9am-5pm")zones.N.* - Indexed array notation: zones.0.name, zones.0.tables, zones.1.name, etc.links.PROVIDER.* - facebook, twitter, instagram, etc.: enabled (boolean), parameters (e.g., "@handle")Advanced fields (JSON strings for rare use):
ordering_json, buttons_json, extended_json, beacons_json, deliveryBoundaries_jsonUpsert behavior: Matches by _id → title (deterministic) → creates new location
Example CSV:
title,geo_longitude,geo_latitude,address.line1,address.city,openingHours.monday,zones.0.name,zones.0.tables
Test Cafe,-0.1276,51.5074,123 Main St,London,9am-5pm,Ground Floor,[[1,10]]
| dryRun | string Set |
| suppressEvents | string Set |
| x-pepper-req-nonce | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| file | string <binary> |
{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "result": {
- "message": "string",
- "etaMs": 0,
- "total": 0,
- "skipped": 0,
- "imported": 0,
- "errors": 0,
- "href": "string"
}, - "error": {
- "code": "string",
- "message": "string"
}, - "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Download a CSV file of location import results.
The full path including fileId is retrieved from the operation's result.href field.
Result file contains all input columns plus: locationId (MongoDB ObjectId), action (created|updated), error (pipe-delimited messages if any).
Example:
title,geo_longitude,geo_latitude,locationId,action,error
Test Cafe,-0.1276,51.5074,507f1f77bcf86cd799439011,created,
Bad Location,invalid,-100,,,geo_longitude invalid or missing | geo_latitude must be between -90 and 90
| fileId required | string The ID of the file to download (from operation result.href) |
{- "code": "string",
- "message": "string"
}Generate a CSV export of locations in the same format as the import endpoint.
The response is an operation resource that can be polled to monitor progress.
When complete, the operation will contain a result.href field providing a link to download the CSV file.
The exported CSV uses dot notation for nested fields (address.city, services.checkins, etc.) and indexed array notation for zones (zones.0.name, zones.1.name), ensuring compatibility with the import endpoint.
| x-pepper-req-nonce | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| limit | number Maximum number of locations to export |
object Optional filters to apply |
{- "limit": 0,
- "filters": {
- "state": "string",
- "tags": [
- "string"
], - "regions": [
- "string"
]
}
}{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "metadata": null,
- "result": null,
- "error": null,
- "isRetryable": true,
- "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Download a CSV export of locations.
The full path including fileId is retrieved from the export operation's result.href field.
| fileId required | string The ID of the file to download (from operation result.href) |
{- "code": "string",
- "message": "string"
}Retrieve a specific Location by Id
| locationId required | string The unique ID of the Location to retrieve. |
{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}Updates a specific Location with new values.
Any unspecified fields will be left unchanged.
When updating an array or map field, the whole field should be replaced even if just updating one part of it.
| locationId required | string The unique ID of the Location to update. |
| title | string Name of the location |
| description | string Description of the location |
| state | any Enum: "PENDING" "ACTIVE" "RETIRED" |
| mainImageUrl | string URL to an image resource |
| listingImageUrl | string URL to an image resource |
object | |
| alternativeOpeningHoursText | string An HTML snippet that overrides how opening hours are displayed in the app. However, the standard opening hours will still be used to determine when the location is open for ordering. This will replace your standard defined opening hours. |
| facilities | Array of strings |
object Enable or disable different ordering services for the location | |
Array of objects | |
object Enable or disable different social media and third party services for the location | |
| VATnumber | string VAT / sales tax number |
object | |
object Contact details for the location | |
Array of objects | |
object | |
| geo | Array of numbers = 2 items An array of 2 numbers for longitude, latitude |
| regions | Array of strings |
| tags | Array of strings |
| mapPinImageUrl | string Optional image url of pin to display to users on map |
| timezone | string Timezone of the location eg Europe/London |
object List of zones (keyed by the zone name) in the location that describes a set of tables e.g Garden, Indoors. |
{- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}Retrieve the Checkins for a specific Location
| locationId required | string The unique ID of the Location to retrieve the Checkins for. |
| per_page | string Default: "20" How many results to return. |
| page | string Default: "1" Which page of results to return. |
Retrieves the Actions for a specific Location
This path is versioned via the x-api-version header, which should be '9' or higher.
| locationId required | string The unique ID of the Location to retrieve the Actions for. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| when.timestamp[.gt | .lte | .eq | .neq] | string <date-time> Filter the response using action |
| type[.in | .nin] | string Filter the response using action 'type' in comparison this list of comma separated types. Valid values of comparison are 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided |
| paymentType[.in | .nin] | string Example: paymentType[.in | .nin]=CARDHOLDER_PRESENT,APPLEPAY Filter transactions by payment type. Accepts comma-separated list of OrderPaymentType enum values. Valid values: CASH_AT_POS, CARD_AT_POS, GIFT_CARD_AT_POS, OTHER_AT_POS, APPLEPAY, GOOGLEPAY, CARD_ON_FILE, CARD_TENDERED, GIFT_CARD, CARDHOLDER_PRESENT, CASH, CARD, OTHER, APP, PAY_BY_BANK. Use 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided. |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "actions": [
- {
- "type": "XXX_XXX",
- "tenantId": "111111111111111111111111",
- "when": {
- "timestamp": "YYYY-MM-DDTHH:mm:ss.SSSZ",
- "monthofyear": 1,
- "weekofyear": 1,
- "dayofmonth": 1,
- "dayofweek": 1,
- "daypart": "XXX"
}, - "metadata": {
- "/* ... */": null
}, - "context": {
- "tenant": {
- "_id": "111111111111111111111111",
- "title": "Hooli"
}, - "user": {
- "_id": "111111111111111111111111",
- "name": "Gavin Belson",
- "primaryPlatform": "IOS"
}, - "location": {
- "_id": "111111111111111111111111",
- "title": "Hooli Restaurant",
- "geo": [
- 0,
- 0
], - "regions": [ ],
- "tags": [ ]
}, - "tags": [ ]
}, - "environment": "PRODUCTION"
}
]
}Get location tag groups
{- "items": [
- {
- "id": "string",
- "title": "string",
- "sort": 0,
- "matchAll": true,
- "tags": {
- "property1": {
- "id": "string",
- "title": "string",
- "sort": 0
}, - "property2": {
- "id": "string",
- "title": "string",
- "sort": 0
}
}
}
]
}Upsert a location tag group
| id required | string The unique id of the tag group |
| title required | string The title of the tag group to be displayed to users |
| sort | number |
| matchAll required | boolean Set to true if filtering locations by multiple tags in this group should require all relevant tags to be present on the location. As opposed to requiring at least one tag to be present on the location |
required | object |
{- "id": "string",
- "title": "string",
- "sort": 0,
- "matchAll": true,
- "tags": {
- "property1": {
- "id": "string",
- "title": "string",
- "sort": 0
}, - "property2": {
- "id": "string",
- "title": "string",
- "sort": 0
}
}
}{- "id": "string",
- "title": "string",
- "sort": 0,
- "matchAll": true,
- "tags": {
- "property1": {
- "id": "string",
- "title": "string",
- "sort": 0
}, - "property2": {
- "id": "string",
- "title": "string",
- "sort": 0
}
}
}Remove a location tag group
| locationTagGroupId required | string The unique ID of the location tag group to remove. |
{- "code": "string",
- "message": "string"
}Create one delivery boundary for a specific location.
| locationId required | string The unique ID of the location to create the delivery boundary for. |
required | Polygon Boundary (object) or Circle Boundary (object) (Delivery Boundary) Fields for creating and updating a Delivery Boundary |
| filter required | string Enum: "include" "exclude" Location will only be available if delivery coordinates are within an include boundary AND outside of any exclude boundaries. |
{- "deliveryBoundary": {
- "shape": "polygon",
- "vertices": [
- [
- 0
]
], - "allowOverlap": true
}, - "filter": "include"
}{- "include": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "circle",
- "center": [
- 37.785834,
- -122.406417
], - "radius": 10,
- "allowOverlap": false
}
], - "exlude": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "polygon",
- "coordinates": [
- [
- 37,
- -122
], - [
- 38,
- -122
], - [
- 38,
- -123
], - [
- 37,
- -123
], - [
- 37,
- -122
]
]
}
]
}Update one delivery boundary for a specific location.
| locationId required | string The unique ID of the location to update the delivery boundary for. |
required | Polygon Boundary (object) or Circle Boundary (object) (Delivery Boundary) Fields for creating and updating a Delivery Boundary |
| filter required | string Enum: "include" "exclude" Location will only be available if delivery coordinates are within an include boundary AND outside of any exclude boundaries. |
{- "deliveryBoundary": {
- "shape": "polygon",
- "vertices": [
- [
- 0
]
], - "allowOverlap": true
}, - "filter": "include"
}{- "include": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "circle",
- "center": [
- 37.785834,
- -122.406417
], - "radius": 10,
- "allowOverlap": false
}
], - "exlude": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "polygon",
- "coordinates": [
- [
- 37,
- -122
], - [
- 38,
- -122
], - [
- 38,
- -123
], - [
- 37,
- -123
], - [
- 37,
- -122
]
]
}
]
}Delete one delivery boundary for a specific location.
| locationId required | string The unique ID of the location to delete the delivery boundary from. |
| deliveryBoundaryId required | string The unique ID of the deliveryBoundary to delete. |
{- "include": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "circle",
- "center": [
- 37.785834,
- -122.406417
], - "radius": 10,
- "allowOverlap": false
}
], - "exlude": [ ]
}Retrieve the locations that are available for delivery for a given pair of co-ordinates.
| lat required | number Latitude of the delivery location. |
| long required | number Longitude of the delivery location. |
| include | Array of strings Items Enum: "created" "updated" "state" "mainImageUrl" "alternativeOpeningHoursText" "buttons" "links" "description" "ordering" "VATnumber" "regions" "address" "tags" "zones" Specify which optional fields to return in the response. |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}
]
}Gets the loyalty balance of the user
The loyalty provider used is the loyalty provider from the merchant settings, if a provider does not exist, or the user does not have a loyalty account Id, then this endpoint will throw an error.
| balanceId | string A specific balance to get, if the loyalty provider supports multiple balances at once, this is not required if the provider only supports a single balance |
{- "balance": 0,
- "type": "POINTS"
}Gets a paged list of push notification messages.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true,
- "createdAt": "string",
- "completedAt": "string",
- "status": "PENDING",
- "sent": 0,
- "failures": 0,
- "skipped": 0,
- "errorMessage": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Creates a push Notification Message, and schedules it for immediate delivery.
The destination can be specified as
Only one of the destination options can be set at a time; currently they cannot be combined.
The request will return immediately with a notification message _id.
Poll the GET /notifications/:notificationId endpoint using the Id to track the result of the delivery.
This path is versioned via the x-api-version header, which should be '9' or higher.
| x-api-version | number The behaviour of this path is versioned via the
If missing, the default value is '1' which is no longer support by this endpoint. You must set the header to '2' or higher. |
| title | string The title of the notification message |
| message required | string The text of the notification message |
| imageUrl | string |
object | |
| buttonText | string The text of the button |
| type required | string Value: "alert" Reserved for future use. |
| value required | string Reserved for future use. |
| isProcessingMessage required | boolean Set this to false if the message is a marketing message, or true if it is a message that should be sent even if the user has opted out of receiving marketing. Misusing this flag could cause penalties under the GDPR regulations. |
| userIds | Array of strings List of Ids of users to send the message to. |
| locationIds | Array of strings List of Ids of locations. All users with those locations as a favourite will be sent the message. |
| segmentIds | Array of strings List of Ids of segments. All the segment user members will be sent the message. |
| global | boolean Set this to true to send the message to every user of the App. |
{- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true
}{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true,
- "createdAt": "string",
- "completedAt": "string",
- "status": "PENDING",
- "sent": 0,
- "failures": 0,
- "skipped": 0,
- "errorMessage": "string"
}Gets a push notification message by Id
| notificationMessageId required | string The specific ID of the Notification Message to retrieve. |
{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true,
- "createdAt": "string",
- "completedAt": "string",
- "status": "PENDING",
- "sent": 0,
- "failures": 0,
- "skipped": 0,
- "errorMessage": "string"
}Gets a paged list of the user receipts for notifications.
User receipts are only retained for 45 days
| notificationMessageId required | string The specific ID of the Notification Message to retrieve. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "notificationMessageId": "string",
- "userId": "string",
- "sentAt": "string",
- "method": "APNS",
- "pushMessageId": "string",
- "skipMessage": "string",
- "errorMessage": "string",
- "createdAt": 0
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Creates a push Notification Message for a specific user, and schedules it for immediate delivery.
| userId required | string The unique ID of the User to create the Notifications for. |
| x-api-version | number The behaviour of this path is versioned via the
If missing, the default value is '1' which is no longer support by this endpoint. You must set the header to '2' or higher. |
| title | string The title of the notification message |
| message required | string The text of the notification message |
| imageUrl | string |
object | |
| buttonText | string The text of the button |
| type required | string Value: "alert" Reserved for future use. |
| value required | string Reserved for future use. |
| isProcessingMessage required | boolean Set this to false if the message is a marketing message, or true if it is a message that should be sent even if the user has opted out of receiving marketing. Misusing this flag could cause penalties under the GDPR regulations. |
{- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true,
- "createdAt": "string",
- "completedAt": "string",
- "status": "PENDING",
- "sent": 0,
- "failures": 0,
- "skipped": 0,
- "errorMessage": "string"
}Gets a paged list of the receipts for Notification Message for a specific User.
User receipts are only retained for 45 days
| userId required | string The User ID to use for retrieving the Notification Message Receipts. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| x-api-version | number The behaviour of this path is versioned via the
If missing, the default value is '1' which is no longer support by this endpoint. You must set the header to '2' or higher. |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "notificationMessageId": "string",
- "userId": "string",
- "sentAt": "string",
- "method": "APNS",
- "pushMessageId": "string",
- "skipMessage": "string",
- "errorMessage": "string",
- "createdAt": 0
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Creates a push Notification Message for all the users with this Location set as a favourite
| userId required | string The unique ID of the Location to create the Notifications for. |
| x-api-version | number The behaviour of this path is versioned via the
If missing, the default value is '1' which is no longer support by this endpoint. You must set the header to '2' or higher. |
| title | string The title of the notification message |
| message required | string The text of the notification message |
| imageUrl | string |
object | |
| buttonText | string The text of the button |
| type required | string Value: "alert" Reserved for future use. |
| value required | string Reserved for future use. |
| isProcessingMessage required | boolean Set this to false if the message is a marketing message, or true if it is a message that should be sent even if the user has opted out of receiving marketing. Misusing this flag could cause penalties under the GDPR regulations. |
{- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true,
- "createdAt": "string",
- "completedAt": "string",
- "status": "PENDING",
- "sent": 0,
- "failures": 0,
- "skipped": 0,
- "errorMessage": "string"
}Creates a push Notification Message for all the users who are members of this segment.
| userId required | string The unique ID of the Segment to create the Notifications for. |
| x-api-version | number The behaviour of this path is versioned via the
If missing, the default value is '1' which is no longer support by this endpoint. You must set the header to '2' or higher. |
| title | string The title of the notification message |
| message required | string The text of the notification message |
| imageUrl | string |
object | |
| buttonText | string The text of the button |
| type required | string Value: "alert" Reserved for future use. |
| value required | string Reserved for future use. |
| isProcessingMessage required | boolean Set this to false if the message is a marketing message, or true if it is a message that should be sent even if the user has opted out of receiving marketing. Misusing this flag could cause penalties under the GDPR regulations. |
{- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true,
- "userIds": [
- "string"
], - "locationIds": [
- "string"
], - "segmentIds": [
- "string"
], - "global": true,
- "createdAt": "string",
- "completedAt": "string",
- "status": "PENDING",
- "sent": 0,
- "failures": 0,
- "skipped": 0,
- "errorMessage": "string"
}Gets a paged list of operations.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "metadata": null,
- "result": null,
- "error": null,
- "isRetryable": true,
- "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}, - "links": {
- "self": "string",
- "next": "string"
}
}Retrieves a specific operation
| operationId required | string The ID of the Operation to retrieve. |
{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "metadata": null,
- "result": null,
- "error": null,
- "isRetryable": true,
- "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Gets a paged list of sub operations associated with an operation id.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "metadata": "string",
- "result": null,
- "error": null,
- "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}, - "links": {
- "self": "string",
- "next": "string"
}
}If the user is an admin user, this call gets all the payment cards for the tenant. CAUTION this call is not currently paged and so could give a huge result.
If the user is not an admin user, this call gets all the cards for the current user.
{- "cards": [
- {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}
]
}Add a tokenized payment card for the authenticated user. Or, add a card via a one use token. Or, request a token to add a card for BRAINTREE.
| cardType | string Enum: "STRIPE" "JUDOPAY" "BRAINTREE" "SQUARE" Payment gateway type |
| methodType | string Default: "CARD" Enum: "CARD" "PAYPAL" |
| consumerId | string Consumer Id (for JUDOPAY) |
| consumerReference | string consumerReference (for JUDOPAY) |
| gatewayId | string The tokenized card id generated by the payment gateway. If this is omitted, the call will attempt to retrieve a token and return it |
| last4 | string The last 4 digits of the payment card. |
| expires | string The month and year the card expires, format MMYY |
| token | string An optional client-generated token encapsulating 3DS information. |
{- "cardType": "STRIPE",
- "methodType": "CARD",
- "consumerId": "string",
- "consumerReference": "string",
- "gatewayId": "string",
- "last4": "string",
- "expires": "string",
- "token": "string"
}{- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}Perform the precreation setup with the payment provider to support adding a new payment card to the user.
This is required for the following PaymentProviders: Stripe: To create a SetupIntent, returning the data required to Create a Card in Stripe.
{- "stripe": {
- "setupIntentCustomerId": "string",
- "setupIntentClientSecret": "string"
}
}Retrieve a specific card for the authenticated user
| cardId required | string The unique Id of the payment card to retrieve |
{- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}Updates an existing payment ../schemas/card.json
Only the deprecated auto topup fields can be changed.
| cardId required | string The unique Id of the payment card to update |
object User's auto balance topup settings. These fields are deprecated | |||||||
| |||||||
{- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}{- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}Removes a payment card specifid by Id from the database and the payment gateway
| cardId required | string The unique Id of the card to remove |
{- "code": "string",
- "message": "string"
}Retrieves the payment cards for a specific user. Only admin users can retrieve cards for other users.
| userId required | string The unique ID of the User to retrieve the Cards for. |
{- "cards": [
- {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}
]
}Retrieves the payment cards for a specific user. Only admin users can retrieve cards for other users.
| userId required | string The unique ID of the User to retrieve the active payment card |
{- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}Use the Perk endpoints to create, retrieve and edit perks.
Perks and awards, while closely related, are not one and the same thing. A perk describes the parameters of the overall Rewards Programme (e.g. ‘Stamp Card Loyalty’), whereas an award is a user’s instance of a perk (e.g. ‘Andrew’s Stamp Cards’). An award is derived from a perk and captures a single user’s relationship with that perk.
An award is created for a user by ‘granting’ a perk to them. A perk can be granted in any one of the following three ways:
isGlobal property is true.If a user already has an award when a perk is granted to them, the appropriate properties of the
award are updated accordingly (eg by updating points.available).
There are several types of perk:
STAMP_CARD perks reward a user with a free item when they have earned enough 'stamps' via qualifying purchases.
PSEUDO_CURRENCY perks are a points based perk. They can be redeemed for money off an order using a fixed point to money ratio: for example: 1 penny off per point redeemed.
AD_HOC perks are rewards that can be granted to users on an ad hoc basis for promotional purposes - for example, a free Gin and Tonic on the user's birthday.
CLUB and LEVEL perks reward a User whilst they are members of a specific Audience. The act of being added to, or removed from, an Audience will grant or revoke the Perk as appropriate. Examples of Membership based Perks include:
Additionally, a ‘Level Based Loyalty’ programme (e.g. Bronze, Silver, Gold) can be modelled using the Membership scheme.
If the isTier property of a Perk is set to true, then it will be assumed to be a tier in a Level Based
Loyalty programme (in conjunction with other Perks with the value set). The priority of the Perk determines
which should be presented if the User is in multiple tiers. e.g. if the User has each of the Bronze, Silver and
Gold Perks then the Gold Perk will be the only one viable (assuming of course it has the highest priority).
Creates a perk for a tenant.
A Perk defines an award that can be granted to or earned by a user.
| template required | string Enum: "STAMP_CARD" "LEVEL" "AD_HOC" "PSEUDO_CURRENCY" "CLUB" The discount model used by the perk |
| title required | string The name of the perk |
| internalTitle | string A more convenient, business-friendly title for easy reference in the console. Use this to distinguish between many perks with similar names. |
| terms required | string The terms and conditions of an award of this perk type |
| priority required | number For LEVEL type perk awards, controls which award is active (the highest priority) and suppresses any others. Also used to order the awards in the app awards carousel. |
| redemptionMethod | any Enum: "AUTO" "CODE_PDF417" "CODE_QR" "VOUCHER" How an award of this perk is communicated to the POS.
|
| auto required | boolean If true, the pos automatically redeems the awards of this perk for qualifying baskets |
| token | string The code that the POS uses to match to a discount or adjustment known by the POS, and apply to a basket if appropriate. This will be the value that is displayed according to |
| maximumPointCashValue | number The maximum absolute discount that can be applied as the result of redeeming an award of this perk |
| locationIds | Array of strings |
required | object Defines how points are earned and redeemed against an award |
object Used to describe rules around how a perk discount is calculated | |
object Controls when a perk is redeemable based on the time and date | |
object What conditions must be met in the basket for an award to be redeemable | |
required | object Used by apps to display the award in an award carousel |
| isDonatable | boolean |
| isGlobal required | boolean If true, all users will be granted an award of this perk |
| isTier | boolean |
| enabled | boolean If true, the perk is active and can be earned and redeemed |
| physicalStampsEnabled | boolean If true, this perk supports physical stamp functionality |
{- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}{- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}Retrieves all the perks for a tenant.
A Perk defines an award that can be granted to or earned by a User.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Retrieves a perk for a tenant by Id
| perkId required | string The Id of the perk to retrieve. |
| include | string Specify which additional optional fields to return in the response. Optional fields are: |
{- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}Removes a specific perk for a tenant
Note: this endpoint affects the old Perks schema and will be changed in a future version.
Use the endpoint DELETE /pointperks/:perkId in the meantime
| perkId required | string The unique Id of the perk to remove. |
{- "code": "string",
- "message": "string"
}Update a perk for a tenant.
Note: this endpoint affects the old Perks schema and will be changed in a future version.
Use the endpoint PUT /pointperks/:perkId in the meantime.
| perkId required | string The Id of the perk to update. |
| template | string Enum: "STAMP_CARD" "LEVEL" "AD_HOC" "PSEUDO_CURRENCY" "CLUB" The discount model used by the perk |
| title | string The name of the perk |
| internalTitle | string A more convenient, business-friendly title for easy reference in the console. Use this to distinguish between many perks with similar names. |
| terms | string The terms and conditions of an award of this perk type |
| priority | number For LEVEL type perk awards, controls which award is active (the highest priority) and suppresses any others. Also used to order the awards in the app awards carousel. |
| redemptionMethod | any Enum: "AUTO" "CODE_PDF417" "CODE_QR" "VOUCHER" How an award of this perk is communicated to the POS.
|
| auto | boolean If true, the pos automatically redeems the awards of this perk for qualifying baskets |
| token | string The code that the POS uses to match to a discount or adjustment known by the POS, and apply to a basket if appropriate. This will be the value that is displayed according to |
| maximumPointCashValue | number The maximum absolute discount that can be applied as the result of redeeming an award of this perk |
| locationIds | Array of strings |
object Defines how points are earned and redeemed against an award | |
object Used to describe rules around how a perk discount is calculated | |
object Controls when a perk is redeemable based on the time and date | |
object What conditions must be met in the basket for an award to be redeemable | |
object Used by apps to display the award in an award carousel | |
| isDonatable | boolean |
| isGlobal | boolean If true, all users will be granted an award of this perk |
| isTier | boolean |
| enabled | boolean If true, the perk is active and can be earned and redeemed |
| physicalStampsEnabled | boolean If true, this perk supports physical stamp functionality |
{- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}{- "code": "string",
- "message": "string"
}Removes a specific perk for a tenant.
This endpoint will be deprecated in an upcoming release and be replaced by DELETE /perks/:perkId
| perkId required | string The unique Id of the perk to remove. |
{- "code": "string",
- "message": "string"
}Update an existing perk for a tenant.
This endpoint will be deprecated in an upcoming release and be replaced by PUT /perks/:perkId
| perkId required | string The Id of the perk to update. |
| template | string Enum: "STAMP_CARD" "LEVEL" "AD_HOC" "PSEUDO_CURRENCY" "CLUB" The discount model used by the perk |
| title | string The name of the perk |
| internalTitle | string A more convenient, business-friendly title for easy reference in the console. Use this to distinguish between many perks with similar names. |
| terms | string The terms and conditions of an award of this perk type |
| priority | number For LEVEL type perk awards, controls which award is active (the highest priority) and suppresses any others. Also used to order the awards in the app awards carousel. |
| redemptionMethod | any Enum: "AUTO" "CODE_PDF417" "CODE_QR" "VOUCHER" How an award of this perk is communicated to the POS.
|
| auto | boolean If true, the pos automatically redeems the awards of this perk for qualifying baskets |
| token | string The code that the POS uses to match to a discount or adjustment known by the POS, and apply to a basket if appropriate. This will be the value that is displayed according to |
| maximumPointCashValue | number The maximum absolute discount that can be applied as the result of redeeming an award of this perk |
| locationIds | Array of strings |
object Defines how points are earned and redeemed against an award | |
object Used to describe rules around how a perk discount is calculated | |
object Controls when a perk is redeemable based on the time and date | |
object What conditions must be met in the basket for an award to be redeemable | |
object Used by apps to display the award in an award carousel | |
| isDonatable | boolean |
| isGlobal | boolean If true, all users will be granted an award of this perk |
| isTier | boolean |
| enabled | boolean If true, the perk is active and can be earned and redeemed |
| physicalStampsEnabled | boolean If true, this perk supports physical stamp functionality |
{- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}{- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "internalTitle": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "locationIds": [
- "string"
], - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "enabled": true,
- "physicalStampsEnabled": true
}Grant an award based on the specified perk to a user or segment.
Note: this endpoint returns the old Perks schema and will be changed in a future version.
Use the endpoint POST /pointperks/:perkId/awards in the meantime.
| perkId required | string The Id of the perk to award. |
| userId required | string |
{- "userId": "string"
}{- "code": "string",
- "message": "string"
}Grant an award based on the specified perk to a user.
Note: this endpoint will be deprecated in an upcoming release and be replaced by the endpoint POST /perks/:perkId/awards.
| perkId required | string The Id of the perk to award. |
| userId required | string |
| points | number The value to award the user. If not specified, the default value of the perk will be used. |
| locationId | string The id of the location associated with this grant, if any |
{- "userId": "string",
- "points": 0,
- "locationId": "string"
}{- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "updatedAt": "string",
- "locationIds": [
- "string"
], - "points": {
- "available": 0
}
}A user sends a referral to a introduce a new user to the App. When the new user signs up, they can claim the code and both they and the referrer will receive a configurable award
Creates a Referral with a unique code for the authenticated User.
{- "_id": "string",
- "tenantId": "string",
- "code": 0,
- "refererId": "string",
- "refereeId": "string",
- "expires": "string",
- "created": "string",
- "state": "CREATED"
}Claims a Referral code for the authenticated User.
| code required | string The referral code to claim. |
{- "_id": "string",
- "tenantId": "string",
- "code": 0,
- "refererId": "string",
- "refereeId": "string",
- "expires": "string",
- "created": "string",
- "state": "CREATED"
}A rule describes
Rules are used for example to add users to segments (audiences) or automatically grant awards
Create a rule for a tenant.
object | |
| matchType required | string Enum: "TYPE" "TIME" |
required | Array of strings subjects (object) or numbers subjects (object) or booleans subjects (object) or basket subjects (object) or payments subjects (object) or extended tests (object) non-empty unique |
required | segment (object) or pointPerk (object) or pointAward (object) or credential (object) or scheduledTask (object) (Impact) |
| active | boolean |
{- "occurrences": {
- "period": "MONTH",
- "count": 0
}, - "matchType": "TYPE",
- "conditions": [
- {
- "subject": "type",
- "predicate": "EQUAL",
- "object": "string"
}
], - "effect": {
- "controller": "segment",
- "method": "addMemberToSegment",
- "impact": {
- "evaluatorName": "calculatePseudoCurrency",
- "parameters": {
- "perkId": "string",
- "blockSize": 0,
- "earningsPerBlock": 0,
- "field": "string"
}
}
}, - "active": true
}{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "occurrences": {
- "period": "MONTH",
- "count": 0
}, - "matchType": "TYPE",
- "conditions": [
- {
- "subject": "type",
- "predicate": "EQUAL",
- "object": "string"
}
], - "effect": {
- "controller": "segment",
- "method": "addMemberToSegment",
- "impact": {
- "evaluatorName": "calculatePseudoCurrency",
- "parameters": {
- "perkId": "string",
- "blockSize": 0,
- "earningsPerBlock": 0,
- "field": "string"
}
}
}, - "active": true
}Retrieve all the rules for a tenant
[- {
- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "occurrences": {
- "period": "MONTH",
- "count": 0
}, - "matchType": "TYPE",
- "conditions": [
- {
- "subject": "type",
- "predicate": "EQUAL",
- "object": "string"
}
], - "effect": {
- "controller": "segment",
- "method": "addMemberToSegment",
- "impact": {
- "evaluatorName": "calculatePseudoCurrency",
- "parameters": {
- "perkId": "string",
- "blockSize": 0,
- "earningsPerBlock": 0,
- "field": "string"
}
}
}, - "active": true
}
]Checks all rules for a tenant and reports any issues
{- "validation": {
- "okCount": 0,
- "errorCount": 0,
- "hasImpactIdCount": 0,
- "rules with errors": {
- "invalid matchType": [
- "string"
], - "invalid conditions": [
- "string"
], - "invalid effect": [
- "string"
], - "TIME not supported": [
- "string"
], - "no type condition": [
- "string"
], - "condition object wrong type": [
- "string"
], - "perkId not found": [
- "string"
], - "segmentId not found": [
- "string"
], - "locationId not found": [
- "string"
]
}, - "unusedImpacts": [
- "string"
]
}, - "logic": [
- "string"
]
}Retrieves a rule for a tenant by Id
| ruleId required | string The Id of the rule to retrieve. |
{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "occurrences": {
- "period": "MONTH",
- "count": 0
}, - "matchType": "TYPE",
- "conditions": [
- {
- "subject": "type",
- "predicate": "EQUAL",
- "object": "string"
}
], - "effect": {
- "controller": "segment",
- "method": "addMemberToSegment",
- "impact": {
- "evaluatorName": "calculatePseudoCurrency",
- "parameters": {
- "perkId": "string",
- "blockSize": 0,
- "earningsPerBlock": 0,
- "field": "string"
}
}
}, - "active": true
}Removes a specific rule for a tenant
| perkId required | string The unique Id of the rule to remove. |
| includeEffect | boolean Default: false If true, the deletion will include effects related to the rule, such as removing pending ScheduledTasks. |
{- "code": "string",
- "message": "string"
}Update a rule for a tenant.
| ruleId required | string The Id of the rule to update. |
| includeEffect | boolean Default: false If true, the update will include effects related to the rule, such as removing pending ScheduledTasks. |
object | |
| matchType required | string Enum: "TYPE" "TIME" |
required | Array of strings subjects (object) or numbers subjects (object) or booleans subjects (object) or basket subjects (object) or payments subjects (object) or extended tests (object) non-empty unique |
required | segment (object) or pointPerk (object) or pointAward (object) or credential (object) or scheduledTask (object) (Impact) |
| active | boolean |
{- "occurrences": {
- "period": "MONTH",
- "count": 0
}, - "matchType": "TYPE",
- "conditions": [
- {
- "subject": "type",
- "predicate": "EQUAL",
- "object": "string"
}
], - "effect": {
- "controller": "segment",
- "method": "addMemberToSegment",
- "impact": {
- "evaluatorName": "calculatePseudoCurrency",
- "parameters": {
- "perkId": "string",
- "blockSize": 0,
- "earningsPerBlock": 0,
- "field": "string"
}
}
}, - "active": true
}{- "code": "string",
- "message": "string"
}Create a scheduled task for a tenant.
| type | string Value: "CREATE_PUSH_NOTIFICATION" |
object |
{- "type": "CREATE_PUSH_NOTIFICATION",
- "parameters": {
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}
}{- "type": "CREATE_PUSH_NOTIFICATION",
- "parameters": {
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}, - "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "status": "DRAFT",
- "createdAt": "string",
- "updatedAt": "string",
- "attempts": 0,
- "queuedAt": "string",
- "idempotencyKey": "string",
- "error": "string",
- "source": {
- "source": "API"
}
}Retrieve all the scheduled tasks for a tenant
[- {
- "type": "CREATE_PUSH_NOTIFICATION",
- "parameters": {
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}, - "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "status": "DRAFT",
- "createdAt": "string",
- "updatedAt": "string",
- "attempts": 0,
- "queuedAt": "string",
- "idempotencyKey": "string",
- "error": "string",
- "source": {
- "source": "API"
}
}
]Retrieves a specific scheduled task for a tenant
| taskId required | string The ID of the Scheduled Task to retrieve. |
{- "type": "CREATE_PUSH_NOTIFICATION",
- "parameters": {
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}, - "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "status": "DRAFT",
- "createdAt": "string",
- "updatedAt": "string",
- "attempts": 0,
- "queuedAt": "string",
- "idempotencyKey": "string",
- "error": "string",
- "source": {
- "source": "API"
}
}Delete a specific Scheduled Task for a Tenant.
| taskId required | string The unique ID of the Scheduled Task to delete |
{- "code": "string",
- "message": "string"
}Update an existing Scheduled Task for a Tenant.
| taskId required | string The ID of the Scheduled Task to update. |
| type | string Value: "CREATE_PUSH_NOTIFICATION" |
object |
{- "type": "CREATE_PUSH_NOTIFICATION",
- "parameters": {
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}
}{- "type": "CREATE_PUSH_NOTIFICATION",
- "parameters": {
- "title": "string",
- "message": "string",
- "imageUrl": "string",
- "deepLink": {
- "moduleId": "string",
- "moduleItemId": "string",
- "voucher": "string"
}, - "buttonText": "string",
- "type": "alert",
- "value": "string",
- "isProcessingMessage": true
}, - "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "status": "DRAFT",
- "createdAt": "string",
- "updatedAt": "string",
- "attempts": 0,
- "queuedAt": "string",
- "idempotencyKey": "string",
- "error": "string",
- "source": {
- "source": "API"
}
}A segment is a group of users that can be used to drive different activities around marketing campaigns. A segment is also known as an audience.
The merchant can define rules for adding and removing users to a segment, send notifications to a segment, define different content to display to a segment, and give different loyalty awards to a segment.
Segment members are managed via explicit requests to add and remove users, or automatically via rules.
Users are also automatically removed (expired) according to the segment type and the expiryHorizon:
expiryHorizon time has elapsed since they were added.expiryHorizon time has elapsed since they were added; if any action fires during the period that would add the user to the segment, then reset the expiry time.Expiry checks run once a day, so using expiry values less than 1 day will only be executed the day after.
Creates a Segment for a Tenant.
This path is versioned via the x-api-version header, which should be '9' or higher.
| x-api-version | number The behaviour of this path is versioned via the
|
| title required | string Name of the segment |
| description | string Segment description |
| type required | any Enum: "PERSISTENT" "ROLLING" "SCHEDULED" Scheme for managing expiring user segment membership |
| expiryHorizon | number Depends on type value - sets the duration in seconds that users should remain as a segment member |
{- "title": "string",
- "description": "string",
- "type": "PERSISTENT",
- "expiryHorizon": 0
}{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "type": "PERSISTENT",
- "expiryHorizon": 0
}Retrieves all the Segments for a Tenant. Extra fields can be specified by using the include parameter.
This path is versioned via the x-api-version header, which should be '12' or higher.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| include | string A comma separated list of extra fields to return. Possible fields are: |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "type": "PERSISTENT",
- "expiryHorizon": 0,
- "count": 0,
- "metrics": [
- {
- "definitionId": "string",
- "metricId": "string",
- "value": 0,
- "updatedAt": "string"
}
]
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Retrieves a specific Segment for a Tenant
| segmentId required | string The ID of the Segment to retrieve. |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "type": "PERSISTENT",
- "expiryHorizon": 0
}Delete a specific Segment for a Tenant.
| segmentId required | string The unique ID of the Segment to Delete |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "code": "string",
- "message": "string"
}Update an existing Segment for a Tenant.
| segmentId required | string The ID of the Segment to update. |
| x-api-version | number The behaviour of this path is versioned via the
|
| title | string Name of the segment |
| description | string Segment description |
| type | any Enum: "PERSISTENT" "ROLLING" "SCHEDULED" Scheme for managing expiring user segment membership |
| expiryHorizon | number Depends on type value - sets the duration in seconds that users should remain as a segment member |
{- "title": "string",
- "description": "string",
- "type": "PERSISTENT",
- "expiryHorizon": 0
}{- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "type": "PERSISTENT",
- "expiryHorizon": 0
}Add a list of user Ids to the Segment.
The maximum users you can add at a time is 100.
It is safe to add users who are already a member, but note it will reset their expiry time for ROLLING segments.
| segmentId required | string The ID of the Segment to add users to |
| x-api-version | number The behaviour of this path is versioned via the
|
user Id
[- "string"
]{- "added": 0
}Fetch a paged list of users in the segment. The request can be optionaly expanded with extra user fields.
| segmentId required | string The Id of the Segment |
| expand | string Optional list of extra user fields to be returned in addition to the User Id. Eg |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "userId": "string",
- "expires": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Remove a list of user Ids from the Segment.
The maximum users you can remove at a time is 100.
It is safe to try and remove users who are not in the segment.
| segmentId required | string The ID of the Segment to add users to |
| x-api-version | number The behaviour of this path is versioned via the
|
user Id
[- "string"
]{- "removed": 0
}Upload a file of users and add them to a segment if not already in the segment.
If they are already in the segment, then reset their expiry according to the segment
type and expiryDate parameter.
The response is an operation resource that can be polled in order to monitor progress.
When complete, the operation will contain a result.href field providing a link to download a file
of results.
Note: no events are emitted as part of this bulk import action.
Supported import file formats:
user_id
60f7e53e944a60af2caa9977
60f7e55550f30ab39776b834
| segmentId required | string The ID of the segment to add the users to. |
| expiryDate | string An ISO 8061 date string. Added users will have this expiryDate set for SCHEDULED or ROLLING segment types. Existing users will have their expiryDate reset (ROLLING segment only). |
| dryRun | string Set |
| x-pepper-req-nonce | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| file | string <binary> |
{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "result": {
- "message": "string",
- "etaMs": 0,
- "total": 0,
- "skipped": 0,
- "imported": 0,
- "errors": 0,
- "href": "string"
}, - "error": {
- "code": "string",
- "message": "string"
}, - "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Download a file of segment user import results.
The full path including fileId is retrieved from the import operation's href.
Example Result File:
user_id,result,error
60f7e53e944a60af2caa9977,ok,
60f7e55550f30ab39776b834,exists,
60f7ef021a12d8ddf3ed8a24,fail,user not found
| fileId required | string The ID of the file to download. |
{- "code": "string",
- "message": "string"
}Grants a perk to all users in a segment who don't already have it.
| segmentId required | string The ID of the Segment used to grant the perk |
| x-pepper-req-nonce | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| perkId | string Id of the perk to award |
| points | string Amount of points to award |
{- "perkId": "string",
- "points": "string"
}{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "result": {
- "total": "string",
- "skipped": "string",
- "successes": "string",
- "errors": "string"
}, - "error": {
- "code": "string",
- "message": "string"
}, - "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}This endpoint is deprecated. Use GET /users/:userId?include=segmentIds or GET /users/:userId?include=segmentsinstead
Retrieve the Segments that the user is in.
| userId required | string The Id of the User |
[- {
- "_id": "string",
- "title": "string",
- "included": true
}
]{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "stampId": "string",
- "effects": {
- "REWARD": true,
- "REDEEM": true
}
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}| locationId required | string^[0-9a-fA-F]{24}$ The id of the Location that the stamp belongs to |
| stampId required | string The Snowshoe ID of the stamp |
required | object The effects enabled for this stamp |
| imprints | Array of numbers[ items[ items = 2 items ] ] Array of imprints for this stamp |
[- {
- "locationId": "string",
- "stampId": "string",
- "effects": {
- "REWARD": true,
- "REDEEM": true
}, - "imprints": [
- [
- [
- 0,
- 0
]
]
]
}
]null| id required | string Pepper id of the stamp to retrieve |
{- "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "stampId": "string",
- "effects": {
- "REWARD": true,
- "REDEEM": true
}
}| id required | string Pepper id of the stamp to update |
{- "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "stampId": "string",
- "effects": {
- "REWARD": true,
- "REDEEM": true
}
}| id required | string Pepper id of the stamp to delete |
{- "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "stampId": "string",
- "effects": {
- "REWARD": true,
- "REDEEM": true
}
}Creates a new nonce that expires after 120 seconds as well as the public key to encrypt a stamp impression and the nonce with.
{- "nonce": "string",
- "key": "string"
}Validates a stamp impression encrypted with the nonce and public key and processes the effect of the stamp
| impression | string Encrypted JSON string containing co-ordinates of the impression of the stamp on phone as well as the one time nonce retrieved by hitting the create nonce endpoint |
object The intended effect of imprinting the stamp |
{- "impression": "string",
- "effect": {
- "type": "REWARD",
- "awardId": "string",
- "points": 0
}
}{- "result": {
- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "updatedAt": "string",
- "locationIds": [
- "string"
], - "points": {
- "available": 0
}
}
}| id required | string Pepper id of the stamp to update imprint for |
| imprints | Array of numbers[ items[ items = 2 items ] ] Array of imprints for this stamp |
{- "imprints": [
- [
- [
- 0,
- 0
]
]
]
}{- "_id": "string",
- "tenantId": "string",
- "locationId": "string",
- "stampId": "string",
- "effects": {
- "REWARD": true,
- "REDEEM": true
}
}Gets the users specified in the request body. Useful for retrieving a large batch of users.
The response is paged. Use limit and startKey to control the page returned.
Optional User fields favouriteLocations, favouriteProducts, extended, points
are omitted from the response by default. Specify them in the include parameter to have them included.
Extra fields segmentIds, credentials and checkin are also optional. Specify them in include to have them included.
| sort | string The names of the fields to sort the results by, in decreasing order of precendence. Allowed values are |
| include | string Specify which optional fields to return in the response. Optional fields are:
|
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| userIds required | Array of strings The ids of the users to retrieve |
{- "userIds": [
- "string"
]
}{- "items": [
- {
- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
], - "checkin": {
- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string"
}, - "segments": [
- {
- "_id": "string",
- "title": "string",
- "included": true
}
], - "segmentIds": [
- "string"
]
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Gets all the users in the system for a Tenant.
The response is paged. Use limit and startKey to control the page returned.
Search terms supported are name and updatedAfter.
Optional User fields favouriteLocations, favouriteProducts, extended, points
are omitted from the response by default. Specify them in the include parameter to have them included.
Extra fields segmentIds, credentials and checkin are also optional. Specify them in include to have them included.
This path is versioned via the x-api-version header, which should be '9' or higher.
When x-api-version header is not present, the legacy resource is returned.
| name | string Filter the request by user full names matching this value (minimum 3 characters, case insensitive). |
| updatedAfter | string Filter the request by for users changed or added after this value. Use ISO date format. |
| createdAfter | string Filter the request by for users created after this value. Use ISO date format. |
| credentialId | string Filter the request by a user's credential i.e email address or phone number |
| role | string Filter the request by for users with the specified role. Valid values are 'GUEST' and 'USER'. |
| sort | string The names of the fields to sort the results by, in decreasing order of precendence. Allowed values are |
| include | string Specify which optional fields to return in the response. Optional fields are:
|
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
], - "checkin": {
- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string"
}, - "segments": [
- {
- "_id": "string",
- "title": "string",
- "included": true
}
], - "segmentIds": [
- "string"
]
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Creates an end User for a Tenant.
The User’s roles property will be populated automatically on the platform based on the context of the request. If the request is anonymous, a User with a role of USER will be created. If the request is authenticated as an admin User, a User with a role of ADMIN can be created if specified.
If a credentials.provider value of FACEBOOK is specified, the passed id and token will be validated against the Facebook API and a failure will result in 422 being returned.
When a User account is created, the initial value of loyaltyPoints will be determined by the Merchant settings.
If the User being created has a role of USER and is being created using a MOBILE credential type, their account state will be set to PENDING. This means they will not be able to login until their account has been activated.
If the User being created has a role of USER and is being created using a FACEBOOK credential type, their account state will immediately be set to ACTIVE on successful validation with Facebook.
If a User is created using credentials that already exist in either the ACTIVE or PENDING state, a 422 will be returned.
If a non-Admin User is created with a MOBILE credential type, a 4 digit activation code will be sent via SMS to the supplied number. This activation code should be used to activate the account.
The platform will enforce single user accounts for a mobile device (by a tenant) if this is enabled in the tenant settings.
The x-client-platform header must be sent to identify the platform type.
| autoActivate | string Set |
| awaitExternalAccountSync | string Set |
| uniqueDeviceIdAndroid | string Supports Single Accounts per device. The token that identifies an Android device. |
| uniqueDeviceIdIOS | string Supports Single Accounts per device. The token that identifies an iOS device. |
| firstName required | string |
| lastName required | string |
| fullName | string |
required | Array of objects non-empty |
| hasAgreedToShareData | boolean The user has accepted sharing his/her data for the purposes of using the Tenant's application (GDPR). |
| hasAgreedToReceiveMarketing | boolean The user has accepted receiving marketing messages from or on behalf of the Tenant (GDPR). |
| birthdate | string |
| gender | string Enum: "FEMALE" "MALE" |
{- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "token": "string"
}
], - "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "birthdate": "string",
- "gender": "FEMALE"
}{- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true
}Logs a User into the system via a 3rd party SSO provider and retrieves a session for use in subsequent calls to the API.
If the user does not exist in the system, a new user will be created from the details supplied in the request body.
firstName and lastName are both required to create a new user if one does not exist already.
When a User account is created, the initial value of loyaltyPoints will be determined by the Merchant settings.
The platform will enforce single user accounts for a mobile device (by a tenant) if this is enabled in the tenant settings.
The x-client-platform header must be sent to identify the platform type.
| ssoProvider required | string Enum: "google" "apple" The SSO provider to verify the incoming JWT with |
| idToken required | string The JWT obtained from the 3rd party SSO provider to authenticate and identify the user |
| firstName | string |
| lastName | string |
| fullName | string |
| hasAgreedToShareData | boolean The user has accepted sharing his/her data for the purposes of using the Tenant's application (GDPR). |
| hasAgreedToReceiveMarketing | boolean The user has accepted receiving marketing messages from or on behalf of the Tenant (GDPR). |
| birthdate | string |
| gender | string Enum: "FEMALE" "MALE" |
{- "idToken": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "birthdate": "string",
- "gender": "FEMALE"
}{- "_id": "string",
- "userId": "string",
- "tenantId": "string",
- "tenantTitle": "string",
- "permanent": true,
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "isPrimary": true,
- "roles": [
- "USER"
], - "user": {
- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
]
}
}Activates a specific User.
The response is a compound of a Session resource, with the User included under user.
If an attempt is made to activate a User that is already active, a 422 will be returned.
If token is omitted from the POST body, the Platform assumes that the User is re-attempting activation and the SMS will be delivered again.
If an invalid token is provided, the Platform will return a 422.
On successful activation, the User’s state property will be changed to ACTIVE.
| id required | string User's credential id, such as an email or mobile number. |
| token | string The activation token. If this omitted, this request is treated as a request to resend the SMS. |
{- "id": "string",
- "token": "string"
}{- "_id": "string",
- "userId": "string",
- "tenantId": "string",
- "tenantTitle": "string",
- "permanent": true,
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "isPrimary": true,
- "roles": [
- "USER"
], - "user": {
- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
]
}
}Logs a User into the system and retrieves a session for use in subsequent calls to the API.
The request should use Basic authentication.
If an AuthProvider header of FACEBOOK is used, then the 'Basic' auth token is comprised of the Facebook user id as the username, and the session token as the password.
If the User has a state of PENDING, the login will always fail, even if the correct credentials were provided.
| AuthProvider | string Default: MOBILE Which authentication provider should fulfil the request |
{- "_id": "string",
- "userId": "string",
- "tenantId": "string",
- "tenantTitle": "string",
- "permanent": true,
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "isPrimary": true,
- "roles": [
- "USER"
], - "user": {
- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
]
}
}To reset a user password, two requests need to be made:
POST /users/reset
{
"id": "07811555123"
}
POST /users/reset
{
"token": "3375",
"username": "07811555123",
"password": "password"
}
A User who is in the PENDING state cannot request a reset and a 422 will be returned if they attempt to do so.
| id required | string User's credential id, such as an email or mobile number. |
{- "id": "string"
}{- "code": "string",
- "message": "string"
}Retrieves a User given a user Id
Optional User fields favouriteLocations, favouriteProducts, extended, points
are omitted from the response by default. Specify them in the include parameter to have them included.
Extra fields segmentids, segments, credentials and checkin are also optional. Specify them in include to have them included.
This path is versioned via the x-api-version header, which should be '9' or higher.
When x-api-version header is not present, the legacy resource is returned.
| userId required | string The specific ID of the User to retrieve. |
| include | string Specify which optional fields to return in the response. Optional fields are:
|
| x-api-version | number The behaviour of this path is versioned via the
|
{- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true,
- "credentials": [
- {
- "provider": "MOBILE",
- "id": "+447770444999",
- "isVerified": true,
- "isPrimary": true
}
], - "checkin": {
- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string"
}, - "segments": [
- {
- "_id": "string",
- "title": "string",
- "included": true
}
], - "segmentIds": [
- "string"
]
}Updates a specific User with new information. One or more of the User record's fields can be updated in one call.
The User’s loyalty points cannot be updated via the API. A 422 will result.
A PUT call that includes a property of apnDeviceToken or gcmDeviceToken will cause a new Apple Push Notification
or Google Cloud Messaging end-point respectively to be registered for the user on the Amazon Web Services SNS service
and will allow Users to receive push notifications.
| userId required | string The unique ID of the User to update. |
| firstName | string |
| lastName | string |
| fullName | string |
Array of objects | |
| birthdate | string |
| gender | string Enum: "FEMALE" "MALE" |
object The defaults for tipping | |
| favouriteLocations | Array of strings List of the user's favourite location ids |
| primaryPlatform | string Enum: "UNKNOWN" "IOS" "ANDROID" |
| contacts | object TODO |
| extended | object Tenant specific extensions. For example, login data for extra services such as Secret DJ |
| hasAgreedToShareData | boolean The user has accepted sharing his/her data for the purposes of using the Tenant's application (GDPR). |
| hasAgreedToReceiveMarketing | boolean The user has accepted receiving marketing messages from or on behalf of the Tenant (GDPR). |
| apnDeviceToken | string Cause a new Apple Push Notification end-point to be registered for the user |
| gcmDeviceToken | string Cause a new Google Cloud Messaging end-point to be registered for the user |
| photo | string User image, base 64 encoded |
{- "firstName": "Wilbert"
}{- "id": "string",
- "tenantId": "string",
- "firstName": "string",
- "lastName": "string",
- "fullName": "string",
- "state": "ACTIVE",
- "isGuest": true,
- "roles": [
- "USER"
], - "subscribed": true,
- "birthdate": "string",
- "tokens": {
- "activation": "string",
- "reset": "string"
}, - "defaultTip": {
- "scheme": "ABSOLUTE",
- "amount": 0
}, - "favouriteLocations": [
- "string"
], - "primaryPlatform": "UNKNOWN",
- "contacts": { },
- "additionalInformation": [
- {
- "name": "birthdate",
- "value": "string"
}
], - "extended": { },
- "card": {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}, - "hasPaymentCard": true,
- "hasProfilePhoto": true,
- "isRegisteredForPushNotifications": true,
- "hasAgreedToShareData": true,
- "hasAgreedToReceiveMarketing": true,
- "externalPosId": "string",
- "externalLoyaltyId": "string",
- "updatedAt": "string",
- "created": "string",
- "deleted": true
}Remove a User and all their associated records from the system. Note - internally, the user is marked as deleted, and all user information is redacted so that is no longer identifiable.
Requires
ADMINrole to delete arbitrary user.USERrole may delete their own accounts using this endpoint.
| userId required | string The unique ID of the User to remove. |
| deleteLoyaltyAccount | any "Defaults to true. If true, the request will attempt to delete the user from the merchant's external loyalty service, if supported and configured." |
| deletePosAccount | any "Defaults to true. If true, the request will attempt to delete the user from the merchant's pos account, if supported and configured." |
{- "code": "string",
- "message": "string"
}If a Checkin is created for a User that does not already have a profile photo associated with their account, a status of 422 will be returned and the Checkin will not be created.
If the User for which a Checkin is being created is already checked in at another Location, the other Checkins will be deleted automatically for them. A User may only be checked in at a single Location at a time.
If the User is already checked in at the Location, an HTTP status code of 409 (Conflict) will be returned by the API.
Checkins will be automatically deleted after 30 minutes.
If the POS associated with the Merchant supports it, a notification will be delivered to the Location’s POS when a new Checkin is created.
| userId required | string The Id of the User to create the Checkin for. |
| locationId | string Location where the user checked in |
| type | string Enum: "AUTO" "MANUAL" "CFD" "OFFLINE" "UNKNOWN" |
| trigger | string Enum: "GEO" "BEACON" "CODE" "POS" "UNKNOWN" What triggered the checkin to occur |
{- "locationId": "string",
- "type": "AUTO",
- "trigger": "GEO"
}{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string",
- "locationId": "string",
- "trigger": "GEO"
}Retrieves the Checkins for a specific User.
| userId required | string The unique ID of the User to retrieve the Checkins for. |
| per_page | string Default: 20 Set the response to be paged by this number of results per page. |
| page | string Default: 1 Request a specific page of results in the response. The first page is page 1 |
{- "checkins": [
- {
- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "locationTitle": "string",
- "userFullName": "string",
- "type": "AUTO",
- "updated": "string",
- "created": "string",
- "locationId": "string",
- "trigger": "GEO"
}
], - "summary": {
- "total": 0,
- "count": 0,
- "pages": 0,
- "page": 0
}
}Creates a Credit for a specific User
| userId required | string The unique ID of the User to create the Credit for. |
| scheme required | string |
| number | number |
| description required | string |
| awardId required | string The ID of the Award to be credited |
{- "scheme": "string",
- "number": 0,
- "description": "string",
- "awardId": "string"
}Retrieve the Actions for a specific User.
This path is versioned via the x-api-version header, which should be '9' or higher.
| userId required | string The unique ID of the User to retrieve the Actions for. |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| when.timestamp[.gt | .lte | .eq | .neq] | string <date-time> Filter the response using action |
| type[.in | .nin] | string Filter the response using action 'type' in comparison this list of comma separated types. Valid values of comparison are 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided |
| paymentType[.in | .nin] | string Example: paymentType[.in | .nin]=CARDHOLDER_PRESENT,APPLEPAY Filter transactions by payment type. Accepts comma-separated list of OrderPaymentType enum values. Valid values: CASH_AT_POS, CARD_AT_POS, GIFT_CARD_AT_POS, OTHER_AT_POS, APPLEPAY, GOOGLEPAY, CARD_ON_FILE, CARD_TENDERED, GIFT_CARD, CARDHOLDER_PRESENT, CASH, CARD, OTHER, APP, PAY_BY_BANK. Use 'in' (for matching any), 'nin' (for not matching any). The comparison defaults to 'in' when not provided. |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "actions": [
- {
- "type": "XXX_XXX",
- "tenantId": "111111111111111111111111",
- "when": {
- "timestamp": "YYYY-MM-DDTHH:mm:ss.SSSZ",
- "monthofyear": 1,
- "weekofyear": 1,
- "dayofmonth": 1,
- "dayofweek": 1,
- "daypart": "XXX"
}, - "metadata": {
- "/* ... */": null
}, - "context": {
- "tenant": {
- "_id": "111111111111111111111111",
- "title": "Hooli"
}, - "user": {
- "_id": "111111111111111111111111",
- "name": "Gavin Belson",
- "primaryPlatform": "IOS"
}, - "location": {
- "_id": "111111111111111111111111",
- "title": "Hooli Restaurant",
- "geo": [
- 0,
- 0
], - "regions": [ ],
- "tags": [ ]
}, - "tags": [ ]
}, - "environment": "PRODUCTION"
}
]
}Create one address for a specific user.
| userId required | string The unique ID of the user to create the address for. |
| name | string |
required | object |
| coordinates required | Array of numbers[ items = 2 items ] [Longitude, Latitude] |
| note | string |
{- "name": "string",
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postalCode": "string",
- "country": "string"
}, - "coordinates": [
- 0
], - "note": "string"
}[- {
- "name": "testName",
- "address": {
- "line1": "testLine1",
- "line2": "testLine2",
- "city": "testCity",
- "region": "testRegions",
- "postalCode": "AB1 1AB",
- "country": "GB"
}, - "coordinates": [
- 1,
- 1
], - "note": "testNote",
- "_id": "XXXXXXXXXXXXXXXXXXXXXXXX"
}
]Update one address for a specific user.
| userId required | string The unique ID of the user to create the address for. |
| addressId required | string The unique ID of the address to update. |
| name | string |
required | object |
| coordinates required | Array of numbers[ items = 2 items ] [Longitude, Latitude] |
| note | string |
{- "name": "string",
- "address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postalCode": "string",
- "country": "string"
}, - "coordinates": [
- 0
], - "note": "string"
}[- {
- "name": "testName",
- "address": {
- "line1": "testLine1",
- "line2": "testLine2",
- "city": "testCity",
- "region": "testRegions",
- "postalCode": "AB1 1AB",
- "country": "GB"
}, - "coordinates": [
- 1,
- 1
], - "note": "testNote",
- "_id": "XXXXXXXXXXXXXXXXXXXXXXXX"
}
]Delete one address for a specific user.
| userId required | string The unique ID of the user to delete the address from. |
| addressId required | string The unique ID of the address to delete. |
[- {
- "name": "remainingAddressName",
- "address": {
- "line1": "remainingTestLine1",
- "line2": "remainingTestLine2",
- "city": "remainingTestCity",
- "region": "remainingTestRegions",
- "postalCode": "AB1 1AB",
- "country": "GB"
}, - "coordinates": [
- 1,
- 1
], - "note": "remainingTestNote",
- "_id": "XXXXXXXXXXXXXXXXXXXXXXXX"
}
]Upload a file of users to create, along with and perks and points to award and segments to join.
The response is an operation resource that can be polled in order to monitor progress.
When complete, the operation will contain a result.href field providing a link to download a file
of results.
Required columns:
Credential columns: 1 or both of these must be provided
Optional columns:
dob - in format YYYY-MM-DD
perk - one or more columns containing perk Ids to award to the imported user
audience - one or more columns containing audience Ids to add the imported user to
points_perk_XXXX - one or more columns. The perk award Id is parsed from the column suffix XXXX, and the column contains the points to award to the imported user
phoneNumberLastUsedToOrder - in E.164 format
Address fields - Note: line1, city, postalCode, country are all required column values if an address is being provided
any other columns - these are echoed to the output results. eg external user ids, etc
Example file:
user_first_name,user_last_name,dob,email,mobile,opt_in_marketing,points_perk_601689c37e7ef80ebefe4121,perk,perk,audience,audience
Fred,Pitt,1997-01-15,fred@gmail.com,447498886666,FALSE,1,605efeade9965c0ecc921311,603938b47a7e830f22cd524a,605c9d6466a2ac0ea3bc6a85,60393894ab83830f3eaae79b
Jane,Arnold,1999-01-01,jane@gmail.com,447398886666,TRUE,4,605efeade9965c0ecc921311,603938b47a7e830f22cd524a,605c9d6466a2ac0ea3bc6a85,60393894ab83830f3eaae79b
| dryRun | string Set |
| suppressEvents | string Set |
| x-pepper-req-nonce | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| file | string <binary> |
{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "result": {
- "message": "string",
- "etaMs": 0,
- "total": 0,
- "skipped": 0,
- "imported": 0,
- "errors": 0,
- "href": "string"
}, - "error": {
- "code": "string",
- "message": "string"
}, - "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Download a file of user import results.
The full path including fileId is retrieved from the import operation's href.
Example Result File:
user_first_name,user_last_name,dob,email,mobile,opt_in_marketing,perk,audience,points_perk_601689c37e7ef80ebefe4121,pepper_id,mobile_e164,award_ids,audiences_added,error
Fred,Pitt,1997-01-15,fred@gmail.com,447498886666,FALSE,605efeade9965c0ecc921311; 603938b47a7e830f22cd524a,605c9d6466a2ac0ea3bc6a85; 60393894ab83830f3eaae79b,1,6064b01ff0c1267d8984cc46,+447498886666,601689c37e7ef80ebefe4121.6064b01ff0c1267d8984cc49=1; 605efeade9965c0ecc921311.6064b01ff0c1267d8984cc4a=1; 603938b47a7e830f22cd524a.6064b01ff0c1267d8984cc4b=1,2,
Jane,Arnold,1999-01-01,jane@gmail.com,447398886666,TRUE,605efeade9965c0ecc921311; 603938b47a7e830f22cd524a,605c9d6466a2ac0ea3bc6a85; 60393894ab83830f3eaae79b,4,6064b01ff0c1267d8984cc4e,+447398886666,601689c37e7ef80ebefe4121.6064b020f0c1267d8984cc51=4; 605efeade9965c0ecc921311.6064b020f0c1267d8984cc52=1; 603938b47a7e830f22cd524a.6064b020f0c1267d8984cc53=1,2,
Column description:
| fileId required | string The ID of the file to download. |
{- "code": "string",
- "message": "string"
}This endpoint is deprecated. Use GET /users/:userId?include=segmentIds or GET /users/:userId?include=segmentsinstead
Retrieve the Segments that the user is in.
| userId required | string The Id of the User |
[- {
- "_id": "string",
- "title": "string",
- "included": true
}
]Get all Awards for a specific User
Note: this endpoint returns the old Perks schema and will be changed in a future version.
Use the endpoint GET /users/:userId/pointawards in the meantime.
| userId required | string The unique ID of the User to retrieve the Awards for. |
| includeUnvisualisedAwards | string if true, it will include awards that have not been visualised in the response. |
| includeDisabled | string if true, it will include awards linked to disabled perks in the response. |
| locationId | string if supported by merchant's setup, it will only return the list of awards valid for the location ID provided. |
{- "code": "string",
- "message": "string"
}Get all awards for a specific user
This endpoint will be deprecated in an upcoming release and be replaced by GET /user/:userId/awards
| userId required | string The unique ID of the User to retrieve the Awards for. |
| includeUnvisualisedAwards | string if true, it will include awards that have not been visualised in the response. |
| includeDisabled | string if true, it will include awards linked to disabled perks in the response. |
| locationId | string if supported by merchant's setup, it will only return the list of awards valid for the location ID provided. |
{- "awards": [
- {
- "_id": "string",
- "tenantId": "string",
- "template": "STAMP_CARD",
- "title": "string",
- "terms": "string",
- "priority": 0,
- "redemptionMethod": "AUTO",
- "auto": true,
- "token": "string",
- "maximumPointCashValue": 0,
- "discount": {
- "value": 0,
- "type": "VALUE",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "subtitleTwoText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "verticalAlignment": "TOP",
- "wallet": {
- "enabled": true,
- "title": "string",
- "description": "string",
- "terms": "string",
- "link": "string",
- "priority": 0,
- "imageUrls": [
- {
- "name": "string",
- "value": "string"
}
], - "displayPoints": true,
- "hidden": true
}
}, - "isDonatable": true,
- "isGlobal": true,
- "isTier": true,
- "updatedAt": "string",
- "locationIds": [
- "string"
], - "points": {
- "available": 0
}
}
]
}Retrieves the payment cards for a specific user. Only admin users can retrieve cards for other users.
| userId required | string The unique ID of the User to retrieve the Cards for. |
{- "cards": [
- {
- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}
]
}Retrieves the payment cards for a specific user. Only admin users can retrieve cards for other users.
| userId required | string The unique ID of the User to retrieve the active payment card |
{- "_id": "string",
- "created": "string",
- "updated": "string",
- "userId": "string",
- "cardType": "STRIPE",
- "gatewayId": "string",
- "cardId": "string",
- "methodType": "CARD",
- "type": "string",
- "email": "string",
- "last4": "string",
- "expires": "string",
- "autoTopUp": {
- "enabled": true,
- "amount": 10,
- "trigger": 10
}
}Use the Award Enrichment endpoints to create, updated, delete and get Award Enrichments.
Award Enrichments are used to enrich PointAwards, and external Loyalty Awards with data such as visualisations. Award Enrichments are loyalty provider agnostic.
Creates an Award Enrichment for a Loyalty Award or Reward.
| loyaltyRewardId required | string A Reward ID representing Pepper PerkID or External Loyalty Reward ID |
| loyaltyProvider required | string Enum: "PEPPER" "SQUARE" "POWERCARD" "ATREEMO" "REVEL" "PAYTRONIX" The provider of the Loyalty Reward this Enrichment is for |
string or null | |
string or null | |
string or null | |
object or null | |
object or null | |
object or null | |
object or null | |
object or null | |
Array of strings or null |
{- "loyaltyRewardId": "string",
- "loyaltyProvider": "PEPPER",
- "title": "string",
- "token": "string",
- "template": "PSEUDO_CURRENCY",
- "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "string",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "subtitleTwoText": "string",
- "verticalAlignment": "TOP",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "terms": "string",
- "priority": 0
}, - "excludeDiscountIds": [
- "string"
]
}{- "loyaltyRewardId": "string",
- "loyaltyProvider": "PEPPER",
- "title": "string",
- "token": "string",
- "template": "PSEUDO_CURRENCY",
- "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "string",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "subtitleTwoText": "string",
- "verticalAlignment": "TOP",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "terms": "string",
- "priority": 0
}, - "excludeDiscountIds": [
- "string"
], - "_id": "string",
- "created": "string",
- "updated": "string"
}Retrieves all the Award Enrichments for a Tenant.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "loyaltyRewardId": "string",
- "loyaltyProvider": "PEPPER",
- "title": "string",
- "token": "string",
- "template": "PSEUDO_CURRENCY",
- "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "string",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "subtitleTwoText": "string",
- "verticalAlignment": "TOP",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "terms": "string",
- "priority": 0
}, - "excludeDiscountIds": [
- "string"
], - "_id": "string",
- "created": "string",
- "updated": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Retrieves a specific Award Enrichment for a Tenant
| enrichmentId required | string The ID of the Award Enrichment to retrieve. |
{- "loyaltyRewardId": "string",
- "loyaltyProvider": "PEPPER",
- "title": "string",
- "token": "string",
- "template": "PSEUDO_CURRENCY",
- "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "string",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "subtitleTwoText": "string",
- "verticalAlignment": "TOP",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "terms": "string",
- "priority": 0
}, - "excludeDiscountIds": [
- "string"
], - "_id": "string",
- "created": "string",
- "updated": "string"
}Delete a specific Award Enrichment for a Tenant.
| enrichmentId required | string The unique ID of the Award Enrichment to Delete |
{- "code": "string",
- "message": "string"
}Update an existing Award Enrichment for a Tenant.
| enrichmentId required | string The ID of the Award Enrichment to update. |
| loyaltyRewardId | string A Reward ID representing Pepper PerkID or External Loyalty Reward ID |
| loyaltyProvider | string Enum: "PEPPER" "SQUARE" "POWERCARD" "ATREEMO" "REVEL" "PAYTRONIX" The provider of the Loyalty Reward this Enrichment is for |
string or null | |
string or null | |
string or null | |
object or null | |
object or null | |
object or null | |
object or null | |
object or null | |
Array of strings or null |
{- "loyaltyRewardId": "string",
- "loyaltyProvider": "PEPPER",
- "title": "string",
- "token": "string",
- "template": "PSEUDO_CURRENCY",
- "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "string",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "subtitleTwoText": "string",
- "verticalAlignment": "TOP",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "terms": "string",
- "priority": 0
}, - "excludeDiscountIds": [
- "string"
]
}{- "loyaltyRewardId": "string",
- "loyaltyProvider": "PEPPER",
- "title": "string",
- "token": "string",
- "template": "PSEUDO_CURRENCY",
- "basketQualification": {
- "matchCode": "string",
- "maxCount": 0,
- "minimumItems": 0,
- "minimumValue": 0,
- "scope": "ITEM"
}, - "dateTimeRestriction": {
- "startTime": 0,
- "endTime": 0,
- "daysOfWeek": 0,
- "startDate": "string",
- "endDate": "string"
}, - "points": {
- "initial": 0,
- "min": 0,
- "max": 0,
- "step": 0,
- "redemption": 0,
- "maxTotalRedemptions": 0
}, - "discount": {
- "value": 0,
- "type": "string",
- "maxValue": 0,
- "maxCount": 1,
- "scope": "ITEM",
- "scopeMatchCode": "string",
- "rule": "CHEAPEST",
- "childItemRule": "INCLUDE",
- "combinationRule": "MULTI",
- "discountCharges": 0
}, - "visualisation": {
- "templates": [
- {
- "name": "string",
- "value": "string"
}
], - "media": [
- {
- "name": "string",
- "value": "string"
}
], - "colours": [
- {
- "name": "string",
- "value": "string"
}
], - "stampImageUrl": "string",
- "textColour": "string",
- "stampColour": "string",
- "randomiseStampPositions": true,
- "backgroundOverlayColour": "string",
- "backgroundOverlayOpacity": 1,
- "titleText": "string",
- "subtitleText": "string",
- "description": "string",
- "availableCardCopy": "string",
- "nextCardProgressCopy": "string",
- "textAlignment": "LEFT",
- "subtitleTwoText": "string",
- "verticalAlignment": "TOP",
- "backgroundImageUrl": "string",
- "showExpiry": true,
- "expiryLabelAnchorStyle": "BOTTOM_LEFT_CHIP",
- "expiryLabelDetailStyle": "BOTTOM_MIDDLE_CHIP",
- "awardsScreenShape": "DOUBLE_RECTANGLE",
- "expiryLabelTextStyle": "NONE",
- "terms": "string",
- "priority": 0
}, - "excludeDiscountIds": [
- "string"
], - "_id": "string",
- "created": "string",
- "updated": "string"
}Use the Subscription Scheme endpoints to create, retrieve and edit Subscription Schemes.
A Subscription Scheme defines the parameters of a subscription plan that users can subscribe to.
Creates a subscription scheme for a tenant.
A Subscription Scheme defines a recurring billing plan that users can subscribe to with various benefits (perks).
required | Array of objects Pricing options |
required | Array of objects List of perk Ids associated with this subscription scheme |
| active | boolean Whether the subscription scheme is active (available for new subscriptions) |
| title required | string Title of the subscription scheme |
| terms | string Terms and conditions of the subscription scheme |
object Visualisation details for the subscription scheme |
{- "pricing": [
- {
- "id": "string",
- "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}, - "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}
}
], - "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}{- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}Retrieves all the subscription schemes for a tenant.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Retrieves a subscription scheme for a tenant by Id.
| schemeId required | string The Id of the subscription scheme to retrieve. |
{- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}Update a subscription scheme for a tenant.
Note: price updates (Stripe Price changes) are not allowed via this endpoint.
| schemeId required | string The Id of the subscription scheme to update. |
Array of objects Pricing options | |
Array of objects List of perk Ids associated with this subscription scheme | |
| active | boolean Whether the subscription scheme is active (available for new subscriptions) |
| title | string Title of the subscription scheme |
| terms | string Terms and conditions of the subscription scheme |
object Visualisation details for the subscription scheme |
{- "pricing": [
- {
- "id": "string",
- "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}{- "code": "string",
- "message": "string"
}Delete a subscription scheme for a tenant.
| schemeId required | string The unique Id of the subscription scheme to remove. |
{- "code": "string",
- "message": "string"
}Use the Subscription endpoints to create, retrieve and manage Subscriptions.
A Subscription represents an user's subscription to a Subscription Scheme.
Creates a subscription for a user.
| userId | string Id of the user who will own this subscription. Only allowed for admin users to set. |
| subscriptionSchemeId required | string Id of the subscription scheme |
| paymentMethodId | string Id of the payment method to be used for this subscription |
| priceId | string Id of the price to be used for this subscription |
{- "userId": "string",
- "subscriptionSchemeId": "string",
- "paymentMethodId": "string",
- "priceId": "string"
}{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "subscriptionSchemeId": "string",
- "subscriptionScheme": {
- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}, - "stripe": {
- "subscriptionId": "string",
- "priceId": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentMethod": {
- "id": "string",
- "methodType": "string",
- "type": "string",
- "last4": "string",
- "expires": "string",
- "walletType": "string"
}, - "active": true,
- "cancelAt": "2019-08-24T14:15:22Z",
- "nextPaymentAt": "2019-08-24T14:15:22Z"
}Retrieves all the subscriptions.
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "subscriptionSchemeId": "string",
- "subscriptionScheme": {
- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}, - "stripe": {
- "subscriptionId": "string",
- "priceId": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentMethod": {
- "id": "string",
- "methodType": "string",
- "type": "string",
- "last4": "string",
- "expires": "string",
- "walletType": "string"
}, - "active": true,
- "cancelAt": "2019-08-24T14:15:22Z",
- "nextPaymentAt": "2019-08-24T14:15:22Z"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Retrieves a subscription.
| subscriptionId required | string The Id of the subscription to retrieve. |
| expand | Array of strings Items Value: "subscriptionScheme" Optional list of extra fields to be returned in addition to the default subscription fields. Eg |
{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "subscriptionSchemeId": "string",
- "subscriptionScheme": {
- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}, - "stripe": {
- "subscriptionId": "string",
- "priceId": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentMethod": {
- "id": "string",
- "methodType": "string",
- "type": "string",
- "last4": "string",
- "expires": "string",
- "walletType": "string"
}, - "active": true,
- "cancelAt": "2019-08-24T14:15:22Z",
- "nextPaymentAt": "2019-08-24T14:15:22Z"
}Cancels a subscription.
| subscriptionId required | string The unique Id of the subscription to cancel. |
| comment | string Reason for cancelling the subscription |
{- "comment": "string"
}{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "subscriptionSchemeId": "string",
- "subscriptionScheme": {
- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}, - "stripe": {
- "subscriptionId": "string",
- "priceId": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentMethod": {
- "id": "string",
- "methodType": "string",
- "type": "string",
- "last4": "string",
- "expires": "string",
- "walletType": "string"
}, - "active": true,
- "cancelAt": "2019-08-24T14:15:22Z",
- "nextPaymentAt": "2019-08-24T14:15:22Z"
}Resumes a subscription.
| subscriptionId required | string The unique Id of the subscription to resume. |
| paymentMethodId | string Id of the payment method to be used for this subscription |
{- "paymentMethodId": "string"
}{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "subscriptionSchemeId": "string",
- "subscriptionScheme": {
- "_id": "string",
- "tenantId": "string",
- "stripe": {
- "productId": "string",
- "taxRateIds": [
- "string"
]
}, - "pricing": [
- {
- "id": "string",
- "price": 0,
- "billing": {
- "interval": "day",
- "intervalCount": 0
}, - "active": true,
- "default": true,
- "visualisation": {
- "name": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "perks": [
- {
- "perkId": "string",
- "interval": "day"
}
], - "active": true,
- "title": "string",
- "terms": "string",
- "visualisation": {
- "titleText": "string",
- "heroImageUrl": "string",
- "heroTitleText": "string",
- "heroText": "string",
- "calloutTitleText": "string",
- "calloutBullets": [
- "string"
], - "calloutFooterText": "string",
- "footerText": "string"
}
}, - "stripe": {
- "subscriptionId": "string",
- "priceId": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentMethod": {
- "id": "string",
- "methodType": "string",
- "type": "string",
- "last4": "string",
- "expires": "string",
- "walletType": "string"
}, - "active": true,
- "cancelAt": "2019-08-24T14:15:22Z",
- "nextPaymentAt": "2019-08-24T14:15:22Z"
}Removes all the sessions against a userId from the database
| userId required | string The unique Id of the user |
{- "code": "string",
- "message": "string"
}Creates a Credit for a specific User
| userId required | string The unique ID of the User to create the Credit for. |
| scheme required | string |
| number | number |
| description required | string |
| awardId required | string The ID of the Award to be credited |
{- "scheme": "string",
- "number": 0,
- "description": "string",
- "awardId": "string"
}Create one delivery boundary for a specific location.
| locationId required | string The unique ID of the location to create the delivery boundary for. |
required | Polygon Boundary (object) or Circle Boundary (object) (Delivery Boundary) Fields for creating and updating a Delivery Boundary |
| filter required | string Enum: "include" "exclude" Location will only be available if delivery coordinates are within an include boundary AND outside of any exclude boundaries. |
{- "deliveryBoundary": {
- "shape": "polygon",
- "vertices": [
- [
- 0
]
], - "allowOverlap": true
}, - "filter": "include"
}{- "include": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "circle",
- "center": [
- 37.785834,
- -122.406417
], - "radius": 10,
- "allowOverlap": false
}
], - "exlude": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "polygon",
- "coordinates": [
- [
- 37,
- -122
], - [
- 38,
- -122
], - [
- 38,
- -123
], - [
- 37,
- -123
], - [
- 37,
- -122
]
]
}
]
}Update one delivery boundary for a specific location.
| locationId required | string The unique ID of the location to update the delivery boundary for. |
required | Polygon Boundary (object) or Circle Boundary (object) (Delivery Boundary) Fields for creating and updating a Delivery Boundary |
| filter required | string Enum: "include" "exclude" Location will only be available if delivery coordinates are within an include boundary AND outside of any exclude boundaries. |
{- "deliveryBoundary": {
- "shape": "polygon",
- "vertices": [
- [
- 0
]
], - "allowOverlap": true
}, - "filter": "include"
}{- "include": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "circle",
- "center": [
- 37.785834,
- -122.406417
], - "radius": 10,
- "allowOverlap": false
}
], - "exlude": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "polygon",
- "coordinates": [
- [
- 37,
- -122
], - [
- 38,
- -122
], - [
- 38,
- -123
], - [
- 37,
- -123
], - [
- 37,
- -122
]
]
}
]
}Delete one delivery boundary for a specific location.
| locationId required | string The unique ID of the location to delete the delivery boundary from. |
| deliveryBoundaryId required | string The unique ID of the deliveryBoundary to delete. |
{- "include": [
- {
- "id": "XXXXXXXXXXXXXXXXXX",
- "shape": "circle",
- "center": [
- 37.785834,
- -122.406417
], - "radius": 10,
- "allowOverlap": false
}
], - "exlude": [ ]
}Retrieve the locations that are available for delivery for a given pair of co-ordinates.
| lat required | number Latitude of the delivery location. |
| long required | number Longitude of the delivery location. |
| include | Array of strings Items Enum: "created" "updated" "state" "mainImageUrl" "alternativeOpeningHoursText" "buttons" "links" "description" "ordering" "VATnumber" "regions" "address" "tags" "zones" Specify which optional fields to return in the response. |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "created": "string",
- "updated": "string",
- "title": "string",
- "description": "string",
- "state": "PENDING",
- "mainImageUrl": "string",
- "listingImageUrl": "string",
- "openingHours": {
- "monday": "string",
- "tuesday": "string",
- "wednesday": "string",
- "thursday": "string",
- "friday": "string",
- "saturday": "string",
- "sunday": "string"
}, - "alternativeOpeningHoursText": "string",
- "facilities": [
- "string"
], - "services": {
- "checkins": true,
- "offline_checkin": true,
- "pre_order": true,
- "book_table": true,
- "book_room": true,
- "tab": true,
- "order_to_table": true,
- "pay_at_table": true,
- "pay_at_table_nfc": true,
- "delivery": true,
- "dine_in": true
}, - "buttons": [
- {
- "title": "string",
- "style": "PRIMARY",
- "action": "PREORDER",
- "properties": {
- "url": "string"
}
}
], - "links": {
- "facebook": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "twitter": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "foursquare": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "instagram": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "uber": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "hailo": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}, - "citymapper": {
- "title": "string",
- "parameters": "string",
- "enabled": true
}
}, - "VATnumber": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "town": "string",
- "country": "string",
- "postcode": "string",
- "summary": "string",
- "fullAddress": "string",
- "googleMapsShortUrl": "string"
}, - "contacts": {
- "email": "string",
- "phone": "string"
}, - "beacons": [
- {
- "enabled": "string",
- "minor": "string",
- "major": "string",
- "uuid": "string"
}
], - "ordering": {
- "extendedFields": {
- "PREORDER": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}, - "ORDER_TO_TABLE": {
- "note": [
- {
- "title": "string",
- "description": "string"
}
]
}
}
}, - "geo": [
- 0,
- 0
], - "regions": [
- "string"
], - "tags": [
- "string"
], - "mapPinImageUrl": "string",
- "timezone": "string",
- "zones": { }
}
]
}Creates a voucher for a tenant.
A voucher is redeemable a specific number of times, either globally or per user. In addition, validity dates can be set.
| title required | string [ 1 .. 255 ] characters |
| code required | string [ 1 .. 255 ] characters ^[A-Za-z0-9]*$ |
| voucherSchemeId | string^[0-9a-fA-F]{24}$ Id of the voucher scheme |
| startDate required | string <date-time> |
| endDate required | string <date-time> |
| numRedemptionsPerUser required | integer >= 1 |
| numGlobalRedemptions required | integer >= 1 |
{- "title": "string",
- "code": "string",
- "voucherSchemeId": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "numRedemptionsPerUser": 1,
- "numGlobalRedemptions": 1
}{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "code": "string",
- "voucherSchemeId": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "numRedemptionsPerUser": 1,
- "numGlobalRedemptions": 1
}Gets vouchers for the tenantId, matching any query parameters.
This path is versioned via the x-api-version header, which should be '10' or higher.
When x-api-version header is not present, the legacy resource is returned.
| startKey | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| limit | number Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| voucherSchemeId | string Return vouchers matching voucherSchemeId |
| sort | string The names of the fields to sort the results by, in decreasing order of precendence. Allowed values are |
| x-api-version | number The behaviour of this path is versioned via the
|
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "code": "string",
- "voucherSchemeId": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "numRedemptionsPerUser": 1,
- "numGlobalRedemptions": 1
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Redeems a voucher for a user
| code required | string [ 1 .. 255 ] characters ^[A-Za-z0-9]*$ |
{- "code": "string"
}{- "_id": "string",
- "tenantId": "string",
- "userId": "string",
- "voucherId": "string",
- "dateRedeemed": "string"
}Retrieves a voucher via a voucher Id
| voucherId required | string |
{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "code": "string",
- "voucherSchemeId": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "numRedemptionsPerUser": 1,
- "numGlobalRedemptions": 1,
- "numRedemptions": 0
}Updates a specific Voucher
| voucherId required | string |
| title | string [ 1 .. 255 ] characters |
| code | string [ 1 .. 255 ] characters ^[A-Za-z0-9]*$ |
| voucherSchemeId | string^[a-fA-F0-9]{24}$ Id of the voucher scheme |
| startDate | string <date-time> |
| endDate | string <date-time> |
| numRedemptionsPerUser | integer >= 1 |
| numGlobalRedemptions | integer >= 1 |
{- "title": "string",
- "code": "string",
- "voucherSchemeId": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "numRedemptionsPerUser": 1,
- "numGlobalRedemptions": 1
}{- "_id": "string",
- "tenantId": "string",
- "title": "string",
- "code": "string",
- "voucherSchemeId": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "numRedemptionsPerUser": 1,
- "numGlobalRedemptions": 1
}Upload the apple-developer-merchantid-domain-association.txt file for Apple Pay web domain verification.
The file is stored in S3 at {tenantTitle}/.well-known/apple-developer-merchantid-domain-association.txt.
| file | string <binary> The .txt domain association file from Apple |
{- "code": "string",
- "message": "string"
}Create a segment metric definition
| scheduled required | boolean |
| factType required | string Enum: "ATV" "TotalSpend" "OrderCount" |
required | object |
required | Array of objects or objects or strings non-empty |
{- "scheduled": true,
- "factType": "ATV",
- "query": {
- "segmentId": "string"
}, - "periods": [
- {
- "name": "string",
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
]
}{- "scheduled": true,
- "factType": "ATV",
- "query": {
- "segmentId": "string"
}, - "periods": [
- {
- "name": "string",
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
], - "_id": "string",
- "tenantId": "string",
- "metricClass": "SegmentMetric"
}Get segment metric definitions
| startKey required | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| limit required | string Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| scheduled | boolean |
{- "items": [
- {
- "scheduled": true,
- "factType": "ATV",
- "query": {
- "segmentId": "string"
}, - "periods": [
- {
- "name": "string",
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
], - "_id": "string",
- "tenantId": "string",
- "metricClass": "SegmentMetric"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Update a segment metric definition
| scheduled | boolean |
| factType | string Enum: "ATV" "TotalSpend" "OrderCount" |
object | |
Array of objects or objects or strings non-empty |
{- "scheduled": true,
- "factType": "ATV",
- "query": {
- "segmentId": "string"
}, - "periods": [
- {
- "name": "string",
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
]
}{- "scheduled": true,
- "factType": "ATV",
- "query": {
- "segmentId": "string"
}, - "periods": [
- {
- "name": "string",
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
], - "_id": "string",
- "tenantId": "string",
- "metricClass": "SegmentMetric"
}Get segment metric definition by id
| definitionId required | string |
{- "scheduled": true,
- "factType": "ATV",
- "query": {
- "segmentId": "string"
}, - "periods": [
- {
- "name": "string",
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
], - "_id": "string",
- "tenantId": "string",
- "metricClass": "SegmentMetric"
}Compute a segment metric definition
| definitionId required | string |
| x-pepper-req-nonce required | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "metadata": null,
- "result": null,
- "error": null,
- "isRetryable": true,
- "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Get segment metrics
| definitionId required | string |
| startKey required | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| limit required | string Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| metricId | string |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "definitionId": "string",
- "metricId": "string",
- "segmentId": "string",
- "value": 0,
- "updatedAt": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Create a user metric definition
| scheduled required | boolean |
| realtime required | boolean |
| name required | string |
| displayName required | string |
| tags | Array of strings |
| recomputeOn | Array of strings Items Enum: "NOOP" "CARD_CREATED" "CARD_DELETED" "CHECKIN" "USER_CREDITED" "GIFT_CARD_TOPUP" "GIFT_CARD_ACTIVATED" "ORDER_CREATED" "ORDER_ITEMS_ADDED" "ORDER_USER_JOINED" "ORDER_PAYMENT_RECEIVED" "ORDER_PAYMENT_REFUNDED" "ORDER_COMPLETED" "ORDER_USER_BILLED" "REFERAL_CLAIMED_REFEREE" "REFERAL_CLAIMED_REFERER" "REWARD_EARNED" "REDEEM_PERK" "AWARD_POINTS_REFUNDED" "AWARD_POINTS_RESET" "MEMBER_ADDED" "MEMBER_REMOVED" "USER_CREATED" "USER_CHANGED" "USER_DELETED" "USER_ACTIVATION_RESENT" "USER_ACTIVATED" "CREDENTIAL_VERIFIED" "VOUCHER_REDEEMED" "COUPON_REDEEMED" "COUPON_REFUNDED" "BOOKING_CREATED" "BOOKING_CHANGED" "BOOKING_COMPLETED" "SUBSCRIPTION_STARTED" "SUBSCRIPTION_PAYMENT_RECEIVED" "SUBSCRIPTION_CANCELLATION_REQUESTED" "SUBSCRIPTION_CANCELLED" |
object | |
object | |
required | Array of objects or objects or objects or objects or objects |
{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string"
}
]
}{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Get user metric definitions
| startKey required | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| limit required | string Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| scheduled | boolean |
| tag | string Filter user metric definitions by matching on a value in the tags field |
{- "items": [
- {
- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
], - "id": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}Update a user metric definition
| scheduled | boolean |
| realtime | boolean |
| name | string |
| displayName | string |
| tags | Array of strings |
| recomputeOn | Array of strings Items Enum: "NOOP" "CARD_CREATED" "CARD_DELETED" "CHECKIN" "USER_CREDITED" "GIFT_CARD_TOPUP" "GIFT_CARD_ACTIVATED" "ORDER_CREATED" "ORDER_ITEMS_ADDED" "ORDER_USER_JOINED" "ORDER_PAYMENT_RECEIVED" "ORDER_PAYMENT_REFUNDED" "ORDER_COMPLETED" "ORDER_USER_BILLED" "REFERAL_CLAIMED_REFEREE" "REFERAL_CLAIMED_REFERER" "REWARD_EARNED" "REDEEM_PERK" "AWARD_POINTS_REFUNDED" "AWARD_POINTS_RESET" "MEMBER_ADDED" "MEMBER_REMOVED" "USER_CREATED" "USER_CHANGED" "USER_DELETED" "USER_ACTIVATION_RESENT" "USER_ACTIVATED" "CREDENTIAL_VERIFIED" "VOUCHER_REDEEMED" "COUPON_REDEEMED" "COUPON_REFUNDED" "BOOKING_CREATED" "BOOKING_CHANGED" "BOOKING_COMPLETED" "SUBSCRIPTION_STARTED" "SUBSCRIPTION_PAYMENT_RECEIVED" "SUBSCRIPTION_CANCELLATION_REQUESTED" "SUBSCRIPTION_CANCELLED" |
object |
{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}
}{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Get a user metric definition by id
| definitionId required | string |
{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
], - "id": "string"
}Add a metric to a user metric definition
| definitionId required | string |
| metricId required | string |
| type required | string Enum: "TIPS_GIVEN" "NOOP" "CARD_CREATED" "CARD_DELETED" "CHECKIN" "USER_CREDITED" "GIFT_CARD_TOPUP" "GIFT_CARD_ACTIVATED" "ORDER_CREATED" "ORDER_ITEMS_ADDED" "ORDER_USER_JOINED" "ORDER_PAYMENT_RECEIVED" "ORDER_PAYMENT_REFUNDED" "ORDER_COMPLETED" "ORDER_USER_BILLED" "REFERAL_CLAIMED_REFEREE" "REFERAL_CLAIMED_REFERER" "REWARD_EARNED" "REDEEM_PERK" "AWARD_POINTS_REFUNDED" "AWARD_POINTS_RESET" "MEMBER_ADDED" "MEMBER_REMOVED" "USER_CREATED" "USER_CHANGED" "USER_DELETED" "USER_ACTIVATION_RESENT" "USER_ACTIVATED" "CREDENTIAL_VERIFIED" "VOUCHER_REDEEMED" "COUPON_REDEEMED" "COUPON_REFUNDED" "BOOKING_CREATED" "BOOKING_CHANGED" "BOOKING_COMPLETED" "SUBSCRIPTION_STARTED" "SUBSCRIPTION_PAYMENT_RECEIVED" "SUBSCRIPTION_CANCELLATION_REQUESTED" "SUBSCRIPTION_CANCELLED" |
| name required | string |
| displayName required | string |
required | object or object or string |
{- "type": "POINTS_EARNED",
- "perkId": "string",
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}
}{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Delete a metric from a user metric definition
| definitionId required | string |
| metricId required | string |
{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Add an effect to a user metric definition
| definitionId required | string |
| type required | string Enum: "ADD_TO_SEGMENT" "REMOVE_FROM_SEGMENT" |
| segmentId required | string |
Array of objects or objects or objects or objects or objects or objects or objects or objects |
{- "type": "GRANT_PERK",
- "perkId": "string",
- "points": 0,
- "counter": {
- "max": 0,
- "resetsAfterMins": 0
}, - "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0
}
]
}{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Delete an effect from a user metric definition
| definitionId required | string |
| effectId required | string |
{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Add a condition to a user metric definition effect
| definitionId required | string |
| effectId required | string |
| metricId required | string |
| operator required | string Enum: "EQUAL" "NOT_EQUAL" "GREATER_THAN" "LESS_THAN" |
| value required | number |
{- "operator": "IS_IN_SEGMENT",
- "value": "string"
}{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Delete a condition from a user metric definition effect
| definitionId required | string |
| effectId required | string |
| conditionId required | string |
{- "scheduled": true,
- "realtime": true,
- "name": "string",
- "displayName": "string",
- "tags": [
- "string"
], - "recomputeOn": [
- "NOOP"
], - "query": {
- "created": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "birthdate": {
- "or": [
- "2019-08-24T14:15:22Z"
]
}, - "hasAgreedToReceiveMarketing": true,
- "hasAgreedToShareData": true,
- "primaryPlatform": "UNKNOWN",
- "gender": "MALE",
- "favouriteLocations": {
- "in": [
- "string"
]
}
}, - "metrics": {
- "property1": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}, - "property2": {
- "name": "string",
- "displayName": "string",
- "timeRange": {
- "windowStartOffsetMins": 527040,
- "windowEndOffsetMins": 527040,
- "gt": "2019-08-24T14:15:22Z",
- "lt": "2019-08-24T14:15:22Z"
}, - "type": "TIPS_GIVEN"
}
}, - "_id": "string",
- "tenantId": "string",
- "effects": [
- {
- "conditions": [
- {
- "metricId": "string",
- "operator": "EQUAL",
- "value": 0,
- "_id": "string"
}
], - "type": "ADD_TO_SEGMENT",
- "segmentId": "string",
- "_id": "string"
}
]
}Compute user metric definition
| definitionId required | string |
| x-pepper-req-nonce required | string This call requires a nonce in this header to prevent duplicate processing of calls. The nonce value represents an individual call. It should be set to a guid. Each new call should have a new guid. In the rare occasion you want to repeat a call, use the original guid value. |
| userId | string |
{- "userId": "string"
}{- "_id": "string",
- "tenantId": "string",
- "namespace": "string",
- "entityId": "string",
- "nonce": "string",
- "name": "string",
- "status": "DONE",
- "metadata": null,
- "result": null,
- "error": null,
- "isRetryable": true,
- "createdAt": "string",
- "updatedAt": "string",
- "endedAt": "string"
}Get user metric values
| definitionId required | string |
| startKey required | string Request results to start at the record represented by this key. You can page through a dataset by making requests, setting |
| limit required | string Set the response to be paged, and limit by this number of results. If not provided, a default limit (usually 100) will be used |
| metricId | string |
| userId | string |
{- "items": [
- {
- "_id": "string",
- "tenantId": "string",
- "definitionId": "string",
- "metricId": "string",
- "userId": "string",
- "value": 0,
- "updatedAt": "string"
}
], - "page": {
- "limit": 0,
- "count": 0,
- "startKey": "string",
- "nextKey": "string"
}
}