All endpoints are classified into one of three tiers based on their computational complexity and usage frequency. The following RPS (requests per second) limits apply to all API keys:
| Tier | Description | RPS |
|---|---|---|
| Tier 1 — Critical | High-frequency, critical actions | 60 |
| Tier 2 — Moderate | Moderate-frequency, supplementary actions | 25 |
| Tier 3 — Low | Low-frequency, operational management | 10 |
When a limit is exceeded, the API returns HTTP 429 Too Many Requests with a Retry-After header indicating how many seconds to wait before retrying.
For full details on global caps, burst limits, and monthly usage, refer to your service agreement or contact your account manager.
An HTTP Response is composed by a STATUS and a BODY ( among other less important things.. ), keep in mind that should read both to have a complete understanding of what is happening. The STATUS is more important and the BODY will give you extra information.
The common HTTP Response Status Codes are used.
Status summary:
200: everything is ok. You may need to check the message with the 200 anyway in some cases to do certain thing.
4xx: you are not using our API properly. Check the message in the response body for more detail.
5xx: Our fault, Loyal Guru Api is having some error, report it to us please
When a request is not success ( Response Status is not 200 ) the Response Body has this format:
{
"error": "human readable error message",
"code": "machine friendly error"
}
When the error is related with API KEY validation the response error has this format:
{
"message": "Forbidden"
}
Every http's code the error means something different
400 Your request is not correct, some parameter is required or is not in the right format.
402 When a request is valid but does not complete successfully.
403 The api key/secret are not valid.
404 When the requested resource does not exist or cannot be found.
500 Something when wrong with our server (These are rare.).
We recommend to use HTTP Response Status code and HTTP Response Body code field to handle the errors.
Response Body error code field definitions
| code | meaning |
|---|---|
| *_not_found | The resource cannot be found. Example: customer_not_found |
| forbidden_request | The resource you were trying to reach is absolutely forbidden |
| invalid_request | The request is not valid, a parameters is missing or not valid |
| server_error | Server error |
| customer_not_enough_score | Customer haven't got enough scores for transferring |
| customer_inactive | Customer is not active so no transfers can be executed |
| voucher_redeemed | The voucher is already redeemed |
| voucher_expired | The available_to date is earlier than today |
| voucher_inactive | The coupons is not active |
| voucher_deleted | The coupon has been deleted |
| voucher_out_location | The voucher cannot be redeemed in the current location |
| voucher_out_date | The available_from date is later than today |
| voucher_not_found | The voucher not found, customer not found or voucher does not belong to customer |
| exchange_not_found | The score exchange is not found for the required location |
In case of server_error or unexpected error the Application is responsible for waiting for a period of time before issuing another request. This means that after the first error, there is a minimum back-off interval of 1 second and for each consecutive error, the back-off interval increases exponentially up to 32 seconds.
As this is a http API the "real types" that you can use are the types that allows you to send the http protocol as a parameter, these are number, string, boolean and array. So you'll see this 4 types specified along the docs in the request and response parameters of every method, but please keep in mind that your should follow this format guide.
(Number) Integer: 123 Length from 1 to 9223372036854775807
(Number) Float: 123.45 Decimal separator is dot, not coma.
(String): hello
(String) Date: 2016-12-31
(String) DateTime: 2016-12-31T23:59:43Z
(Boolean): true or false
(Array): [{"key1":123,"key2":"hello","key3":"2016-12-31T23:59:43Z"}]
(slug): ( not a proper type but.. ) A short label for something, containing only letters, numbers, underscores or hyphens. sub_family
Important notes:
Date and DateTime: you MUST ensure that you use ISO-8601 date format in UTC, so it's possible that you'll need to apply some kind of conversion to your date ( and UTC will be returned in the API ) (some documentation related). If you are not able to send UTC you should specify the offset of your DateTime ( 2016-12-31T23:59:43-0500 ), keep in mind that the offset is different depending on your timezone and date.
Regarding to the Integer type: 0 is not a valid integer
Regarding to the Integer type: 00X will be converted to X so keep in mind this if you have, for example, in your database situations in which 003 is the id of a certain resource and 3 is the id of another different resource, for us 003 and 3 is the same number.To avoid collisions between the real 001 and the real 1 in your database. For this purpose you could solve the problem by always adding to parameter a 1 prefix so the end result is 1001 and 11 and no collision between 001 converted to 1 and the real 1 will be existing
Text encoding: utf-8
Along the documentation we are not specifying DateTime or Float. You'll only see it by the example on the param. If the integer can be float you'll se an example with a float and if the Date should be a DateTime you'll see an example with a DateTime instead of a Date.
An Email header can be provided in the API requests. This email parameter will be used to register the authors of the request for a set of specific endpoints. At this moment the endpoints that register the author are:
POST /scores/transfer
POST /scores/trigger
After user authentication you can specify the expected language to our API (as part of the http-headers) in order to force the language in which the system will respond to some of the endpoints regarding multi-language content ( for example: coupons, vouchers, rewards, score transactions, challenges). Please notice that if no language is declared in the header, the system will return the default values. This only applies to companies with multilanguage feature enabled
Accept-Language: 'en'
if "Accept-Language" in header:
if "Accept-Language" language is included as part of the possible options:
return text in language of the header
else:
return text in default language of the company
else:
return default values for multilanguage fields. Ex:
The API supports idempotence for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. For example, if a request to subtract scores fails due to a network connection error, you can retry the request with the same idempotence key to guarantee that only a single subtract is done. Note that retrying a request with an idempotence key will not change the outcome of a request. When the API receives a request successfully but returns an error code, retrying it with an idempotence key will simply result in a new response with the same error code.
GET and DELETE requests are idempotent by definition, meaning that the same backend work will occur no matter how many times the same request is issued. You shouldn't send an idempotence key with these verbs because it will have no effect.
To perform an idempotent request, provide an additional Idempotency-Key:
How you create unique keys is up to you, but we suggest using V4 UUIDs or another appropriately random string. We'll always send back the same response for requests made with the same key, and keys can't be reused with different request parameters. Keys expire after 24 hours.
Idempotency-Key: 'QknyRdIN6wECfOb5'
We recommend you Postman in order to freely try this API. It's a great tool, easy to use, and you'll be able to issue every call to our API. Remember to set properly your headers.
The main resources you'll be able to manage with this API are:
Customers
Customer events
Loyalty & Gamification campaigns
Company Data
Regarding the product taxonomy system, here you'll see and example of how to represent a categorization of products in our flexible system.
+-- Taxonomy ( Family )
| +-- Feature ( Meat )
| +-- Product ( Ham )
| +-- Product ( Cow )
| +-- Product ( Horse )
| +-- ...
| +-- Feature ( Vegetables )
| +-- Product ( Tomato )
| +-- ...
| +-- Feature ( Drinks )
| +-- Product ( Coca-cola )
| +-- ...
| +-- ...
+-- Taxonomy ( Sub-Family )
| +-- Feature ( Soda )
| +-- Product ( Coca-cola )
| +-- ...
| +-- ...
+-- Taxonomy ( Section )
+-- ...
Check please the documentation of the method create activity below to have a good understanding of how a purchase activity works ( discounts, cancellations , negative and positive values... )
Some of our top resources have support for bulk fetches via "list" API methods. For instance, you can list score transactions or list of vouchers. These list API methods share a common structure with the parameter parameters: starting_after.
Loyal Guru utilizes cursor-based pagination via the starting_after parameter. You must use the response body parameter next_token_starts_after as
starting_after parameter to the next to get the next page. If the current page is the last next_token_starts_after is not present.
The order of the elements in the list could change between endpoints.
If your library doesn't support the use of a PATCH method you can always use a PUT method instead.
We strongly recommend the use of the PATCH method as the standard for this kind of actions, but we provide this alternative for older libraries.
Every call must use these three authentication headers:
X-Api-Key: api_key
X-Api-Secret: api_key_secret
X-Api-Version: 1
Please, keep in mind that you must respect Lower and Uppercase characters in the header variable name.
The api_key and the api_key_secret will be delivered by Loyal Guru, ask for them if you don't have them at info@loyal.guru.
For security reasons our system ignores all duplicated calls (same content and action) to update/delete/create elements within a 5-minutes interval.
We use the ID field of the records to avoid duplication and keep the integrity of the system. When you execute any action over a record the ID will be checked:
Insert a record with an ID that already exists will raise in real time ( not deferred ) a request error.
Delete a record with an ID than does not exist will raise in real time ( not deferred ) a request error.
Exceptions:
Activities: ID will no be checked in "POST Activities" ( it will be checked in "POST Activities/RealTime" ), so if a duplicated activity is sent will raise a deferred error and not a real time one.
Customers: apart form ID the email will also be checked.
To create a customer using the friend referral feature, check the referred_by field in the request body schema description.
Important: The updated_at field is automatically set to the current server time when creating a customer, regardless of any creation_date value provided. This ensures accurate tracking of when records are processed by the server.
Tier 2 (Moderate) — See rate limit table
| allow_duplicate_email | boolean Example: allow_duplicate_email=false Allows to create a customer with existing email. Duplicated email will be stored in duplicated_email field. If not received, default value is 'false'. |
| allow_duplicate_dni | boolean Example: allow_duplicate_dni=false Allows to create a customer with existing dni. Duplicated dni will be stored in duplicated_dni field. If not received, default value is 'false'. |
| id required | integer <int64> ID of the customer in form of an integer. It becomes optional if code is present. |
| code | string Alternatibe customer's identification in form of an Alphanumeric. It admits up to 36 characters. |
| card_id | integer <int64> When creating a unified customer, use this field to indicate the customer's card. |
| name required | string Name. |
| surname_1 | string Surname 1. |
| surname_2 | string Surname 2. |
string Email. It must be unique and it is case insensitive. It will always be saved in lowercase. | |
| phone | string Mobile phone number. An extra validation will be checked:
|
| phone_prefix | string Phone country prefix. When phone is filled phone_prefix is required |
| address | string Address. |
| address_extra | string 2 (optional, string) - Extra information about the address. |
| city | string The customer's city. |
| state | string The city's region. |
| postal_code | string Postal code. |
| birth | string Date of the birth. Must be in YYYY-MM-DD format. Years must be between 1900 and 9999 (inclusive). Birth dates with years outside this range will be automatically set to null. |
| gender | string Gender of the customer, must be one of them:
|
| document_type | string Type of document that identifies the customer. |
| dni | string Identification card number. It must be unique per customer. It will always be saved in uppercase. |
| country | string ISO 3166-1 alpha-2 country code in capital letters |
| authentication_token | string Authentication token |
| registration_location_id required | integer <int64> Registration location id. It becomes optional if registration_location_code is present. |
| registration_location_code | string Registration location code. |
| usual_location_id | integer <int64> Usual location id. It could be overriden by automatic calculations from Loyal Guru. |
| status | string Status of the customer, must be one of them:
|
| password | string Password of the customer. If not specified the system will create one. |
| password_confirmation | string Confirmation password of the customer |
| creation_date | string DateTime of the creation of the customer. The format must be ISO 8601 in UTC, e.g. '2016-01-01T20:23:20Z'. |
| sms_unsubscribe | boolean Unsubscribe status for sms campaigns |
| email_unsubscribe | boolean Unsubscribe status for email campaigns |
| push_unsubscribe | boolean Unsubscribe status for push campaigns |
| paper_free | boolean Uses digital activity or not |
| collective_id | integer <int64> Collective Id |
| collective_slug | string Collective Slug, only use it when the collective id is not used |
| communications | boolean Only true when the customer has accepted to receive communications |
| terms | boolean Only true when the customer has accepted the gdpr terms |
| profiling | boolean Only true when ther customer are allowed to share his data to make profile metrics (appear in segments, impacted by campaigns, etc) |
| terms_accepted_at | string The date when the customer accepts the gdpr terms. Can be set manually |
| profiling_accepted_at | string The date when the customer accepts the profiling. Can be set manually |
| app | boolean If customer registration is done by any mobile app |
| push_token | string Mobile app token to send notifications. Only used when app param is true. |
| custom1 | string Deprecated Use Custom value |
| custom2 | string Deprecated Use Custom value |
| custom3 | string Deprecated Use Custom value |
| custom4 | string Deprecated Use Custom value |
| custom5 | string Deprecated Use Custom value |
| custom6 | string Deprecated Use Custom value |
| custom7 | string Deprecated Use Custom value |
| custom8 | string Deprecated Use Custom value |
| custom9 | string Deprecated Use Custom value |
| custom10 | string Deprecated Use Custom value |
| custom11 | string Deprecated Use Custom value |
| custom1f | number <double> Deprecated Use Numeric custom value |
| custom2f | number <double> Deprecated Use Numeric custom value |
| custom3f | number <double> Deprecated Use Numeric custom value |
| custom4f | number <double> Deprecated Use Numeric custom value |
| custom5f | number <double> Deprecated Use Numeric custom value |
| custom6f | number <double> Deprecated Use Numeric custom value |
| custom7f | number <double> Deprecated Use Numeric custom value |
| custom8f | number <double> Deprecated Use Numeric custom value |
| kind | string Kind of customer |
| preferred_language | string ISO 639-1 preferred language for the customer |
| referred_by | integer <int64> A friend referral is registered in Loyal Guru when a customer account is created with this referrer field, which is the customer ID of the friend's account (which must be an existing ID in the Loyal Guru platform) Once a customer is created using this referred_by field, a referral event (system trigger called refer_a_friend) is triggered and can be used to reward the inviting person and the referring person with points or rewards under different conditions (defined by the created loyalty rule). See the Help Centre (Refer a Friend document) for more information. |
| fraudulent | boolean If the customer is fraudulent or not |
| third_party_consent | boolean This flag indicates whether the customer has accepted the third party data sharing. |
| attributes | object Attributes allow you to store additional data on customers. Uses the JSON Schema Form standard link.
Allowed Data Types:
Unknown Properties: Properties not defined in the schema are silently discarded - they won't cause validation errors but will NOT be stored. Case Sensitivity:
Property names are case-sensitive per JSON Schema specification. If your schema defines Attributes must be single-level only with a maximum of 50 attributes and 10KB total size. Example:
|
{- "id": 1234,
- "code": "A54fTr1",
- "name": "Jon",
- "surname_1": "Snow",
- "surname_2": "Sand",
- "email": "jon@winter.com",
- "phone": "678123456",
- "phone_prefix": "34",
- "address": "Snow Tree",
- "address_extra": "31 1",
- "postal_code": "08110",
- "birth": "2016-01-01",
- "gender": "feminine",
- "document_type": "dni",
- "dni": "53023040B",
- "country": "ES",
- "authentication_token": "y78rhr29feuyfw89",
- "registration_location_id": 123,
- "status": "active",
- "password": "mysecretpassword",
- "password_confirmation": "mysecretpassword",
- "creation_date": "2016-01-01T20:23:20Z",
- "sms_unsubscribe": true,
- "email_unsubscribe": true,
- "push_unsubscribe": true,
- "paper_free": false,
- "collective_id": 17,
- "collective_slug": "employees",
- "communications": true,
- "terms": true,
- "profiling": true,
- "terms_accepted_at": "2016-01-02T15:04:05Z",
- "profiling_accepted_at": "2016-01-02T15:04:05Z",
- "app": false,
- "push_token": "cd9fea48-c2c4-ab88-d4ef-db1f7288af92",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "custom9": "custom value 9",
- "custom10": "custom value 10",
- "custom11": "custom value 11",
- "kind": "ecommerce",
- "preferred_language": "es",
- "referred_by": 1234,
- "fraudulent": false,
- "third_party_consent": true,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}{- "status": "success"
}Get a list of customers, filtered by ID and/or phone number.
Usage of the parameters:
ids or phones must be present to get the list of customers. Otherwise, the API returns an error.ids and phones can be sent at the same time.Tier 3 (Low) — See rate limit table
| ids | string Example: ids=123,456 List of IDs to be used for filtering. If there are more than one, they should be separated by commas. |
| phones | string Example: phones=666777888,666777999 List of phone numbers to be used for filtering. If there are more than one, they should be separated by commas. |
{- "list": [
- {
- "dni": "12345678A",
- "name": "Jon",
- "surname_1": "Snow",
- "surname_2": "Sand",
- "email": "jon@example.com",
- "birth": "1990-12-31",
- "phone_prefix": "34",
- "status": "active",
- "phone": "600600600",
- "address": "Calle ABC, 10",
- "address_extra": "-",
- "postal_code": "55555",
- "city": "Barcelona",
- "state": "Catalonia",
- "id": "123",
- "trimestral_expend": 123,
- "score": 100,
- "score_available": 80,
- "paper_free": true,
- "merged": true,
- "preferred_language": "es",
- "registration_location_id": 1234,
- "registration_location_code": "S22C-Plaza",
- "fraudulent": false,
- "collective_id": 123,
- "attributes": {
- "membership_level": "premium",
- "points_balance": 1250
}
}
]
}The field and value to look for in the body of the POST request. The fields that can be searched are: id, code, dni, associate_id, email.
Tier 3 (Low) — See rate limit table
| id | integer <int64> Customer ID, exclusive with other search params. |
| code | string Customer Code, exclusive with other search params. |
| dni | string Customer DNI, exclusive with other search params. |
| associate_id | integer <int64> Customer Associate ID, exclusive with other search params. |
string Customer Email, exclusive with other search params |
{- "id": 123
}{- "id": 123,
- "code": "A54fTr1",
- "dni": "00000000T",
- "name": "Jon",
- "surname_1": "Snow",
- "surname_2": "Sand",
- "email": "jon@example.com",
- "birth": "1985-06-15",
- "phone_prefix": "+1",
- "phone": "555123456",
- "status": "active",
- "address": "123 Main Street",
- "address_extra": "Apt 4B",
- "postal_code": "10001",
- "city": "New York",
- "state": "NY",
- "trimestral_expend": 123,
- "score": 100,
- "score_available": 80,
- "paper_free": true,
- "merged": true,
- "merged_to": 321,
- "kind": "ecommerce",
- "preferred_language": "es",
- "communications": true,
- "app": false,
- "registration_location_id": 5678,
- "registration_location_code": "NYC-Downtown",
- "fraudulent": false,
- "collective_id": 456,
- "attributes": {
- "search_verified": true,
- "engagement_score": 95
}
}Tier 1 (Critical) — See rate limit table
| value required | string Example: 1234,53345345B Could be an integer or a string. Search options are as follows:
|
| search_param required | string Example: search_param=id,code,dni,email The param field used for the customer search. |
{- "id": "123",
- "code": "A54fTr1",
- "name": "Jon",
- "surname_1": "Snow",
- "surname_2": "Sand",
- "email": "jon@example.com",
- "phone_prefix": "+34",
- "phone": "600600600",
- "address": "Calle ABC, 10",
- "address_extra": "-",
- "postal_code": "55555",
- "city": "Barcelona",
- "state": "Catalonia",
- "trimestral_expend": 123,
- "score": 100,
- "score_available": 80,
- "paper_free": true,
- "merged": true,
- "merged_to": 321,
- "kind": "ecommerce",
- "preferred_language": "es",
- "communications": true,
- "app": false,
- "dni": "12345678Z",
- "birth": "1990-12-31",
- "custom1": "custom 1 value",
- "custom2": "custom 2 value",
- "custom3": "custom 3 value",
- "custom4": "custom 4 value",
- "custom5": "custom 5 value",
- "custom6": "custom 6 value",
- "custom7": "custom 7 value",
- "custom8": "custom 8 value",
- "custom9": "custom 9 value",
- "custom10": "custom 10 value",
- "custom11": "custom 11 value",
- "custom1f": "custom 1f value",
- "custom2f": "custom 2f value",
- "custom3f": "custom 3f value",
- "custom4f": "custom 4f value",
- "custom5f": "custom 5f value",
- "custom6f": "custom 6f value",
- "custom7f": "custom 7f value",
- "custom8f": "custom 8f value",
- "status": "active",
- "registration_location_id": 1234,
- "registration_location_code": "S22C-Plaza",
- "fraudulent": false,
- "collective_id": 123,
- "third_party_consent": true,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "vip_status": true
}
}Important: The updated_at field in the request body is now deprecated and ignored. The system automatically sets updated_at to the current server time for all customer updates. This ensures data consistency and accurate tracking of record modifications for downstream systems.
Attributes Validation: For the attributes field, only the incoming attributes in your request are validated against the schema. Existing attributes stored on the customer are NOT re-validated. This means:
Tier 2 (Moderate) — See rate limit table
| value required | integer <int64> Could be an integer or a string.
|
| search_param | string Example: search_param=id Field used to update customer. Valid fields: (id, code) |
| allow_duplicate_email | boolean Example: allow_duplicate_email=false Allows to update a customer with existing email. Duplicated email will be stored in duplicated_email field. If not received, default value is 'false'. |
| allow_duplicate_dni | boolean Example: allow_duplicate_dni=false Allows to update a customer with existing dni. Duplicated dni will be stored in duplicated_dni field. If not received, default value is 'false'. |
| name | string Name. |
| surname_1 | string Surname 1. |
| surname_2 | string Surname 2. |
string Email. It must be unique and it is case insensitive. It will always be saved in lowercase. | |
| phone | string Mobile phone number. An extra validation will be checked:
|
| phone_prefix | string Phone country prefix. When phone is filled phone_prefix is required. |
| address | string Address. |
| address_extra | string 2 (optional, string) - Extra information about the address. |
| city | string The customer's city. |
| state | string The city's region. |
| postal_code | string Postal code. |
| birth | string Date of the birth. Must be in YYYY-MM-DD format. Years must be between 1900 and 9999 (inclusive). Birth dates with years outside this range will be automatically set to null. |
| gender | string Gender of the customer, must be one of them:
|
| document_type | string Type of document that identifies the customer. |
| dni | string Identification card number. It will always be saved in uppercase. |
| country | string ISO 3166-1 alpha-2 country code in capital letters |
| authentication_token | string Authentication token |
| registration_location_id | integer <int64> Registration location id. |
| registration_location_code | string Registration location code. |
| usual_location_id | integer <int64> Usual location id. It could be overriden by automatic calculations from Loyal Guru. |
| status | string Status of the customer, must be one of them:
|
| creation_date | string DateTime of the creation of the customer. The format must be ISO 8601 in UTC, e.g. '2016-01-01T20:23:20Z'. |
| sms_unsubscribe | boolean Unsubscribe status for sms campaigns |
| email_unsubscribe | boolean Unsubscribe status for email campaigns |
| push_unsubscribe | boolean Unsubscribe status for push campaigns |
| paper_free | boolean Uses digital activity or not |
| collective_id | integer <int64> Collective Id |
| collective_slug | string Collective Slug, only use it,when the collective id is not used |
| communications | boolean Only true when the customer has accepted to receive communications |
| terms | boolean Only true when the customer has accepted the gdpr terms |
| profiling | boolean Only true when ther customer are allowed to share his data to make profile metrics (appear in segments, impacted by campaigns, etc) |
| terms_accepted_at | string The date when the customer accepts the gdpr terms. Can be set manually |
| profiling_accepted_at | string The date when the customer accepts the profiling. Can be set manually |
| app | boolean If customer registration is done by any mobile app |
| push_token | string Mobile app token to send notifications. Only used when app param is missing, null or true. |
| custom1 | string Deprecated Use Custom value |
| custom2 | string Deprecated Use Custom value |
| custom3 | string Deprecated Use Custom value |
| custom4 | string Deprecated Use Custom value |
| custom5 | string Deprecated Use Custom value |
| custom6 | string Deprecated Use Custom value |
| custom7 | string Deprecated Use Custom value |
| custom8 | string Deprecated Use Custom value |
| custom9 | string Deprecated Use Custom value |
| custom10 | string Deprecated Use Custom value |
| custom11 | string Deprecated Use Custom value |
| custom1f | number <double> Deprecated Use Numeric custom value |
| custom2f | number <double> Deprecated Use Numeric custom value |
| custom3f | number <double> Deprecated Use Numeric custom value |
| custom4f | number <double> Deprecated Use Numeric custom value |
| custom5f | number <double> Deprecated Use Numeric custom value |
| custom6f | number <double> Deprecated Use Numeric custom value |
| custom7f | number <double> Deprecated Use Numeric custom value |
| custom8f | number <double> Deprecated Use Numeric custom value |
| kind | string Kind of customer |
| preferred_language | string ISO 639-1 preferred language for the customer |
| fraudulent | boolean If the customer is fraudulent or not |
| attributes | object Attributes allow you to store additional data on customers. Uses the JSON Schema Form standard link.
Update Behavior (JSON Merge Patch):
Case Sensitivity:
Property names are case-sensitive per JSON Schema specification. If your schema defines Validation Timing:
Allowed Data Types:
Attributes must be single-level only with a maximum of 50 attributes and 10KB total size. Example:
|
{- "name": "Jon",
- "surname_1": "Snow",
- "surname_2": "Sand",
- "email": "jon@winter.com",
- "phone": "678123456",
- "phone_prefix": "34",
- "address": "Snow Tree",
- "address_extra": "31 1",
- "postal_code": "08110",
- "birth": "2016-01-01",
- "gender": "feminine",
- "document_type": "dni",
- "dni": "53023040B",
- "country": "ES",
- "authentication_token": "y78rhr29feuyfw89",
- "registration_location_id": 123,
- "registration_location_code": "loc_cod_001",
- "usual_location_id": 123,
- "status": "active",
- "creation_date": "2016-01-01T20:23:20Z",
- "sms_unsubscribe": true,
- "email_unsubscribe": true,
- "push_unsubscribe": true,
- "paper_free": false,
- "collective_id": 17,
- "collective_slug": "employees",
- "communications": true,
- "terms": true,
- "profiling": true,
- "terms_accepted_at": "2016-01-02T15:04:05Z",
- "profiling_accepted_at": "2016-01-02T15:04:05Z",
- "app": false,
- "push_token": "cd9fea48-c2c4-ab88-d4ef-db1f7288af92",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "custom9": "custom value 9",
- "custom10": "custom value 10",
- "custom11": "custom value 11",
- "kind": "ecommerce",
- "preferred_language": "es",
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}{- "status": "success"
}Deletes a customer definitely or empty it according to the 'hard' variable
There are two delete modes according to the 'hard' variable
If the 'hard' variable is true, it will execute the hard delete mode.
- This mode deletes definitely the customer if he/she hasn't any critical relation.
The critical relations are:
· activities
· cashback
· redemptions
· score transactions
· tag customers
· vouchers
If the customer have critical relations, is not possible to do the hard delete but the soft delete will be done
Otherwise if the 'hard' variable is false, it will execute the soft delete mode.
- This mode empty the customer and deletes some relations with them.
The customer still exists so the id is not possible to use in other customer.
**Important**: A customer cannot be deleted while in "merging" status. If a delete request is made for a customer with status "merging", the API will return a 409 CONFLICT error.
Tier 3 (Low) — See rate limit table
| value required | integer <int64 or string> Example: 12 ID of the customer |
| hard required | boolean Example: hard=true Defines the hard mode |
| search_param | string Example: search_param=id Field used to update customer. Valid fields: (id, code) |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Get the list of customer attributes for a customer
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 123 Id of the customer |
| attribute_type | string Example: attribute_type=calculation Attribute type of the customer attribute to list. Mutually exclusive with attribute_id. |
| attribute_id | integer <int64> Example: attribute_id=3214 Attribute definition id of the customer attribute to list. Mutually exclusive with attribute_type. |
| name | string Example: name=attr Name to search the customer attribute list. It's not case-sensitive and does not require an exact match. |
| system | boolean Example: system=true Define system to search the customer attribute list. |
| per_page | integer <int64> Example: per_page=20 Max number of attributes returned per response. - Default: 10 |
| starting_after | string Example: starting_after=token Yo will receive this token on every response ( on the variable next_token_starts_after ) in order to have the next batch of elements. |
{- "data": [
- {
- "name": "Max cost",
- "value": "50.6",
- "data_type": "float",
- "attribute_type": "calculation",
- "slug": "max_cost",
- "system": true,
- "created_at": "2018-09-04T16:19:25.343+02:00"
}
], - "next_token_starts_after": "token"
}Retrieve an array of all active program tiers related to the customer. This includes program tiers specific to the customer's country and those not assigned to any country (program tiers available for the entire customer database).
Only program tiers relevant to the customer's country and currently active will be included in the response.
Check out the following links that can help you:
Tier 3 (Low) — See rate limit table
| id | integer Could be an integer or a string.
|
| search_param | string Default: "id" Example: search_param=code The param field used for the customer search. Possible options: "id" and "code" |
{- "data": [
- {
- "id": 1,
- "name": "Avg. Spend",
- "countries": [
- "ES"
], - "current_level_name": "Bronze",
- "current_level": 1,
- "attribute_value": 50,
- "won_at": "2021-05-01T15:00:00Z",
- "expires_at": "2021-12-31T23:59:59Z",
- "to_reach_next_level_value": 50,
- "to_reach_next_level_name": "Silver",
- "structure": [
- {
- "level": 1,
- "name": "Bronze",
- "threshold": 0
}, - {
- "level": 2,
- "name": "Silver",
- "threshold": 100
}, - {
- "level": 3,
- "name": "Gold",
- "threshold": 200
}
]
}, - {
- "id": 2,
- "name": "Scores",
- "countries": [
- "ES",
- "FR"
], - "current_level_name": "Gold",
- "current_level": 3,
- "attribute_value": 250,
- "won_at": "2021-05-01T15:00:00Z",
- "expires_at": "2021-12-31T23:59:59Z",
- "structure": [
- {
- "level": 1,
- "name": "Bronze",
- "threshold": 0
}, - {
- "level": 2,
- "name": "Silver",
- "threshold": 100
}, - {
- "level": 3,
- "name": "Gold",
- "threshold": 200
}
]
}
]
}/customers/{id}/segment_validation is also available as a LEGACY version of this API.
Get the result of checking if a customer belongs to a segment
Tier 3 (Low) — See rate limit table
| id required | string |
| segment_id required | integer <int64> Example: segment_id=1234 The segment ID |
{- "result": true
}/customers/{id}/segments is also available as a LEGACY version of this API.
Get the list of segments which the customer belongs to.
Tier 3 (Low) — See rate limit table
| id required | string |
{- "list": [
- {
- "segment_id": 1234
}, - {
- "segment_id": 5678
}
]
}Tier 3 (Low) — See rate limit table
| customer_id required | integer <int64> ID of the customer in form of an integer. |
| associate_customer_id required | integer <int64> ID of the associate customer in form of an integer. |
| relationship_type | string It is the kind of relationship between both customers. |
| active | boolean Status of the association. If not provided the association will be created as active=true by default. |
| main | boolean Indicates the main association. If not provided will be created as main=false by default. |
{- "customer_id": 1234,
- "associate_customer_id": 4321,
- "relationship_type": "default",
- "active": true,
- "main": true
}{- "id": 1,
- "customer_id": 1234,
- "associate_customer_id": 4321,
- "relationship_type": "default",
- "active": true,
- "main": true,
- "created_at": "2021-09-22T14:02:06.708121Z",
- "updated_at": "2021-09-22T14:02:06.708121Z"
}Updates the relationship type of the active association between provided customers.
Tier 3 (Low) — See rate limit table
| customer_id required | integer <int64> ID of the customer in form of an integer. |
| associate_customer_id required | integer <int64> ID of the associate customer in form of an integer. |
| relationship_type required | string It is the kind of relationship between both customers. |
| main | boolean Indicates the main association. If not provided will not change. |
{- "customer_id": 1234,
- "associate_customer_id": 4321,
- "relationship_type": "default",
- "main": true
}{- "status": "success"
}Sets as inactive the active association between provided customers.
Tier 3 (Low) — See rate limit table
| customer_id required | integer <int64> Example: customer_id=1234 ID of the customer in form of an integer. |
| associate_customer_id required | integer <int64> Example: associate_customer_id=4321 ID of the associate customer in form of an integer. |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Tier 3 (Low) — See rate limit table
| id required | string |
| active required | boolean Example: active=true Status of the association between the customer and the associates to list. If not provided, it will be true by default. |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "list": [
- {
- "id": 1,
- "customer_id": 999050031793530,
- "associate_customer_id": 999050032283499,
- "relationship_type": null,
- "active": true,
- "created_at": "2021-09-22T10:45:32.40923Z",
- "updated_at": "2021-09-22T10:45:32.40923Z"
}, - {
- "id": 2,
- "customer_id": 999050031793530,
- "associate_customer_id": 999050032283689,
- "relationship_type": "merge",
- "active": true,
- "merge_id": 1,
- "created_at": "2021-09-22T14:02:06.708121Z",
- "updated_at": "2021-09-22T14:02:06.708121Z",
- "main": true
}
]
}Create a new card associated to a customer
Tier 3 (Low) — See rate limit table
| id required | integer ID of the customer |
| id | integer Id of the new card |
| main | boolean Indicates the main association. |
| motive | string It is the motive for creation of the new card. |
| relationship_type | string It is the kind of relationship between customer and the new card. |
{- "id": 331,
- "main": true,
- "motive": "default",
- "relationship_type": "default"
}{- "status": "success"
}Executes a merge between two customers. This is the detailed actions done during a merge operation:
- set the old customer's status to "merging" immediately (protects against deletion during merge)
- create an associate record related to both customers
- reassign all associated records to the new customer. Entities involved: activities, campaign_content_customers, cashbacks, loyalty_score_vouchers, redemptions, relatives, scores, score_expenses, score_transactions, vouchers
- set the old customer as the associated in all the transferred activities
- set the old customer's status to "merged" so it cannot be targeted by segments
Personal data (such as name, phone number, email...) is not transferred nor erased in the old customer.
New customer keeps all previous associated records they had. The merge operation is just 'appending' data to them.
**Status Flow**: active/inactive → merging → merged
The transference won't take place when:
- the old customer is already merged or merging
- the new customer is already merged
Tier 3 (Low) — See rate limit table
| old_customer_id | number The customer id you want to transfer data from. Exactly one of old_customer_id or old_customer_code must be given. |
| new_customer_id | number The customer id that is going to recieve the data. Exactly one of new_customer_id or nw_customer_code must be given. |
| old_customer_code | string The customer code you want to transfer data from. Exactly one of old_customer_id or old_customer_code must be given. |
| new_customer_code | string The customer code that is going to recieve the data. Exactly one of new_customer_id or nw_customer_code must be given. |
| relationship_type | string It is the kind of relationship between both customers. |
| motive | string It is the motive for merging these two customers. |
{- "old_customer_id": 292247,
- "new_customer_id": 188976,
- "old_customer_code": "292247",
- "new_customer_code": "188976",
- "relationship_type": "\"default\"",
- "motive": "\"default\""
}{- "status": "success"
}Breaks customer association with its parent one. Only customers with not empty "merged_to" field can be unmerged.
- Set association "active" field to false.
- Create a record in customer_merge_logs with unmerge information using association merge_id field as an origin_merge_id
- Change associated customer status field to active
- Unset merge_to field fron associated customer.
- If with_activites flag is set to true, all the activities that were transferred to the parent will be reassigned to the associate, otherwise they will be kept in the parent customer.
Tier 3 (Low) — See rate limit table
| associate_id required | integer <int64> Example: 1234 ID of the customer in form of an integer. If sent a string and |
| with_activites required | boolean Example: with_activites=true Flag for indicating if activities must be reassigned to the associate or kept in the parent customer.
Default: |
| search_param | string Example: search_param=id,code The param field used for the customer search. In case it is not present or invalid, the default value will be id. |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Transfers the data related to a customer to a newly created customer.
The old customer's status is set to "merging" immediately when the request is received, protecting it from deletion during the merge process. Once the merge completes (asynchronously), the status is set to "merged".
**Status Flow**: active/inactive → merging → merged
The transference won't take place when:
- the old customer is already merged or merging
- there is an active association between the customers
Tier 3 (Low) — See rate limit table
| X-Api-Key required | string Value: "api_key" Example: api_key |
| X-Api-Secret required | string Value: "api_key_secret" Example: api_key_secret |
| X-Api-Version required | string Value: "1" Example: 1 |
| old_customer_id | number The customer id you want to transfer data from. Exactly one of old_customer_id or old_customer_code must be given. |
| new_customer_id | number The customer id that is going to recieve the data. Exactly one of new_customer_id or nw_customer_code must be given. |
| old_customer_code | string The customer code you want to transfer data from. Exactly one of old_customer_id or old_customer_code must be given. |
| new_customer_code | string The customer code that is going to recieve the data. Exactly one of new_customer_id or nw_customer_code must be given. |
| relationship_type | string It is the kind of relationship between both customers. |
| motive | string It is the motive for merging these two customers. |
{- "old_customer_id": 292247,
- "new_customer_id": 188976,
- "old_customer_code": "292247",
- "new_customer_code": "188976",
- "relationship_type": "default",
- "motive": "default"
}{- "status": "success"
}/activities/realtime is also available as a LEGACY version of this API.
An "Activity" in Loyal Guru primarily represents a purchase event, often referred to as a "cart" or "ticket." This method focuses on the real-time creation of such cart events.
Purpose of this method (Real-time Cart Creation): This method allows you to create a new cart in real-time. It's designed for immediate processing and to provide insights upon creation.
Key Uses & Benefits:
Promotions and Discounts (coupons_desired property):
By default, all massive and loyalty member promotions (points and discounts) without coupon are included and applied when calculating the ticket.
You can control how vouchers are applied using the coupons_desired property:
all: Apply all masive + loyalty member promotions + all vouchers assigned to the customer.selected: Apply all massive + loyalty member promotions + only vouchers previously selected by the customer via the appropriate endpoint.["34433", "465443"]: apply all massive + loyalty member promotions without coupon + the vouchers/static code specified.[] (empty array) or omit property: Apply only all massive and loyalty member promotions without coupon (no specific vouchers)..Data Integrity and Coherence (Important Caveats):
cart.total equals sum of line.totals,
customer_id exists). If you send incoherent data, the endpoint will
process everything anyway, and the customer WILL get their points.Important Method Logic & Considerations:
total amount returned for cart lines is adjusted after applying
all relevant discounts (promotional campaigns, vouchers, point-based
discounts/cashback).original_total attribute.quantity field): Lines are only accepted for return if the
quantity is less than or equal to the original cart line quantity. If
different, the response will be an error. You are allowed to return the
same original line across different activities.original_total
(50% by default). The final total for a line must be divisible by its
quantity with no more than two decimal places. Similarly, the points
allocated to a line must be divisible by its quantity without decimals.customer_id and customer_code are mutually
exclusive; use only one.Cart Structure Summary:
total field representing the exact amount paid by the
customer for the entire cart, including taxes and applied discounts.total field representing the exact amount paid for
that specific line, including taxes and applied discounts.total field in a cart and a line should be negative if the cart
is a cart cancellation. The same applies to the quantity field within a line.international: true
field will be included in all cart responses. If both currencies are the
same, this field will not be shown.Tier 1 (Critical) — See rate limit table
| id | integer <int64> ID of the cart in form of an integer. |
| code | string Identification |
| location_id | integer <int64> ID of the location in form of an integer. |
| location_code | string Code of the location. |
| customer_id | integer <int64> ID of the customer in form of an integer. Mutually exclusive with |
| customer_code | string Alphanumeric customer code. It must be unique and existing in ours system. Mutually exclusive with |
| creation_date required | string DateTime of the creation of the cart. |
| total required | number Total amount of the purchase cart payed by the customer ( dsscounts applied, taxes included ). If the cart is a cancellation this amount should be negative. The sum of the total values of the activities should be equal to the total sales of the company. |
| original_total | number Original total amount of the purchase cart before any discount or cashback applied before evaluation of the ticket in LG. This value never changes in the different evaluations of the same ticket, and it is used to calculate the total discount applied on the ticket. |
| currency | string Code of the currency acording to the ISO 4217(It must be Capitals letters). In the absence of any information on this point, is going to be filled with the default company currency setup. |
| cashback_score_desired | number The total amount of points that you'd like to spend on the purchase, if specified a cashback array will appear on the response showing how the points were distributed qithin the cart lines. And also, the total of every line will be modifyied acording this array. Use this param or cashbacks array, but you can's use both. If you don't want to deal with specifying exactly the amount of points for the cashback but you'd like to force the maximum redemption of points available for a certain customer, you can specify "-1". (50% maximum discount by default per each line will be applied) |
| vouchers_desired | Array of arrays Deprecated Use
|
| coupons_desired | Array of arrays By default, all massive and loyalty member promotions (points and discounts) are included and applied when calculating the ticket. You can control how vouchers are applied using the |
required | Array of objects (LineActivity) Array of lines, at least one is required. |
Array of objects (Cashback) Array of cashbacks. Use this param or cashback_score_desired, but you can's use both. | |
Array of objects (Return) Array of returns. | |
Array of objects (PromotionV2) Array with applied promotions. Important: this is only an informative field, you can't apply a promotion through this field. | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
| business_name | string The company's corporate name. |
| total_net | number Total amount of money paid by the customer, excluding taxes. |
| total_tax | number Total amount of taxes paid by the customer. |
| tpv_id | string Alphanumeric identifier of the PoS terminal where the cart is made. |
| staff_name | string Name of the person on the PoS terminal. |
| order_id | string Alphanumeric identifier of the order the cart belongs to. |
Array of objects (Payment) Details how the cart amount is paid. | |
object (Shipment) | |
| checkout_date | string DateTime of the checkout of the cart. |
| payment_cost | number Total amount of payment cost paid by the customer. |
| shipping_cost | number Total amount of shipping cost paid by the customer. |
| channel | string Channel from which the cart comes. |
| attributes | object Attributes allow you to store additional data on activities. Uses the JSON Schema Form standard link.
Allowed Data Types:
Unknown Properties: Properties not defined in the schema are silently discarded - they won't cause validation errors but will NOT be stored. Case Sensitivity:
Property names are case-sensitive per JSON Schema specification. If your schema defines Attributes must be single-level only with a maximum of 50 attributes and 10KB total size. Example:
|
| additional_costs | object It allows you to store additional costs associated with the cart.
Limits:
Example:
|
| apply_discounts | boolean It allows you to decide whether discounts should be applied to the cart or not. By default, discounts are applied to the cart. If you set this parameter to false, no discount will be applied to the cart, but points discount will be applied if |
| apply_points | boolean It allows you to decide whether points campaigns should be applied to the cart or not. By default, points are given to the customer according to the points campaigns configured in the platform. If you set this parameter to false, no points campaign will be given through the cart. This parameter doesn't affect the redemption of points specified through |
{- "id": 1234,
- "code": "1a2b3c4d",
- "location_id": 12,
- "location_code": "12A",
- "customer_id": 8223,
- "customer_code": "8223a",
- "creation_date": "2016-01-01T23:43:20Z",
- "total": 1234,
- "original_total": 1234,
- "currency": "EUR",
- "cashback_score_desired": 123,
- "vouchers_desired": [
- "selected"
], - "coupons_desired": [
- "selected"
], - "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "returns": [
- {
- "ticket_id": 1234,
- "ticket_code": "1a2b3c4d",
- "line_order": 1,
- "from_line_order": 3,
- "quantity": 1,
- "line_order_change": 1
}
], - "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "custom1": "custom value",
- "custom2": "custom value",
- "custom3": "custom value",
- "custom4": "custom value",
- "custom5": "custom value",
- "custom6": "custom value",
- "custom7": "custom value",
- "custom8": "custom value",
- "business_name": "SuperMarket S.L. Spain",
- "total_net": 1200,
- "total_tax": 34,
- "tpv_id": "A55",
- "staff_name": "John Doe",
- "order_id": "Order 1234A",
- "payments": [
- {
- "amount": 15,
- "type": "cash",
- "change": 5
}
], - "shipment": {
- "status": "some_status",
- "tracking_code": "some_code",
- "delivery_address": "some_address",
- "company": "some_company",
- "tracking_url": "some_url"
}, - "checkout_date": "2016-01-01T23:43:20Z",
- "payment_cost": 1.5,
- "shipping_cost": 5.5,
- "channel": "online",
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}, - "apply_discounts": true,
- "apply_points": false
}{- "id": 123456,
- "code": "ACT-123456",
- "creation_date": "2025-06-01T12:00:00Z",
- "location_id": 98765,
- "total": 100.5,
- "original_total": 150.75,
- "score": 100,
- "score_as_money": 12.65,
- "score_used": 120,
- "score_used_as_money": 12.65,
- "score_returned_from_customer": 12,
- "score_returned_from_customer_as_money": 1.25,
- "score_returned_to_customer": 12,
- "score_returned_to_customer_as_money": 1.25,
- "total_scores_coupon_applied": 116,
- "total_scores_coupon_applied_as_money": 1.16,
- "total_discount_voucher_applied": 11.2,
- "total_discount_applied": 11.2,
- "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "customer": [
- {
- "id": 1,
- "score": 1234,
- "score_as_money": 12.34,
- "score_available": 1204,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "score_threshold_cashback_as_money": 100,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}
], - "effects": [
- {
- "rule_id": 2322,
- "line": 1,
- "rule_name": "Product Discount",
- "type": "discount",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "select_customers": "loyalty",
- "value": 100
}, - {
- "rule_id": 2323,
- "line": -1,
- "rule_name": "Holiday Points Bonus",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "all_customers",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 2324,
- "line": 2,
- "rule_name": "Combo Meal Deal",
- "type": "discount",
- "effect_type": "combo_price",
- "distribution_type": "individual_items_pro_rata",
- "select_customers": "targeted",
- "value": 400,
- "coupon_info": {
- "voucher_id": 111,
- "voucher_code": "4344fjaa",
- "coupon_id": 122211,
- "coupon_name": "Combo Meal Deal"
}
}, - {
- "rule_id": 2325,
- "line": 3,
- "rule_name": "Cashback Offer",
- "type": "points",
- "effect_type": "ratio",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "type": "discount",
- "rule_id": 23224,
- "rule_name": "Discount 15% promo",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "effect_type": "rollback",
- "line": 6,
- "value": 400,
- "coupon_info": {
- "voucher_id": 222,
- "voucher_code": "sale190",
- "coupon_id": 12311,
- "coupon_name": "Sales discount example"
}
}, - {
- "type": "points",
- "effect_type": "rollback",
- "rule_id": 12313,
- "rule_name": "Double points promo Weekends",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "line": 7,
- "value": -200,
- "coupon_info": {
- "voucher_id": 223,
- "voucher_code": "doublepoints",
- "coupon_id": 12312,
- "coupon_name": "Double points campaign"
}
}
], - "rejected_campaigns": [
- {
- "rule_id": 1,
- "rule_name": "€5 total cart",
- "type": "discount",
- "error": "The campaign budget was reached",
- "coupon_info": {
- "voucher_id": 1001,
- "voucher_code": "23222",
- "coupon_id": 3222,
- "coupon_name": "€5 total cart",
- "static_code": "SALES89"
}
}
], - "invalid_coupons": [ ],
- "vouchers": [
- {
- "voucher_id": 13009014,
- "voucher_code": "13993492",
- "discount": 1267,
- "line_order": 1,
- "product_id": 2,
- "rule_id": 2,
- "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo",
- "name": " Discount meat 50%",
- "description": "Discount meat 50% extended description",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity"
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "cashback_returns": [
- {
- "line_order": 1,
- "score": 1234
}
], - "scores": [
- {
- "line_order": 1,
- "score": 100,
- "loyalty_score_id": 2,
- "available_from": "2020-01-01",
- "available_to": "2021-01-01"
}
], - "vouchers_desired": [ ],
- "coupons_desired": [ ],
- "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99,
- "original_cost1": 1.5,
- "original_cost2": 3.5
}
}/activities/simulate is also available as a LEGACY version of this API.
An "Activity" in Loyal Guru represents a cart event.
Purpose of this method (Pre-calculation/Simulation):
This method lets you simulate a new cart (like a purchase) in real-time. It's crucial for Loyalty Points and discount programs and should always be used before finalizing the ticket creation with the POST /activities/realtime method.
Key Uses:
Points and Discounts (coupons_desired property):
By default, all massive and loyalty member promotions (points and discounts) without coupon are included and applied when calculating the ticket.
You can control how vouchers are applied using the coupons_desired property:
all: Apply all masive + loyalty member promotions + all vouchers assigned to the customer.selected: Apply all massive + loyalty member promotions + only vouchers previously selected by the customer via the appropriate endpoint.["34433", "465443"]: apply all massive + loyalty member promotions without coupon + the vouchers/static code specified.[] (empty array) or omit property: Apply only all massive and loyalty member promotions without coupon (no specific vouchers).Cashback Considerations (cashback_score_desired):
If you specify a cashback_score_desired value, you can bypass the manual cashback array calculation. Just provide the total points you wish to redeem. The response will then recommend a cashback array, prioritizing point distribution by line_order based on an internal algorithm.
Note: Specifying this parameter will change the total points and lines in the response compared to your initial request.
Set to -1 to force maximum points usage. The discount applied to a line (from cashback) must not exceed the defined maximum limit of the line's original_total(50% by default).
Important Method Considerations:
total amount of returned lines on the cart is adjusted after applying all relevant discounts, including those from promotional campaigns, vouchers, and any point-based discounts (cashback).original_total attribute.customer_id and customer_code are mutually exclusive; use only one.international: true field will be included in all cart responses.1€ = 10 points and you purchase 2.99€, you earn 29 points.1€ = 1 point and you purchase 12.5€, you earn 12 points.Tier 1 (Critical) — See rate limit table
| id | integer <int64> ID of the cart in form of an integer. |
| code | string Identification |
| location_id | integer <int64> ID of the location in form of an integer. |
| location_code | string Code of the location. |
| customer_id | integer <int64> ID of the customer in form of an integer. Mutually exclusive with |
| customer_code | string Alphanumeric customer code. It must be unique and existing in ours system. Mutually exclusive with |
| creation_date required | string DateTime of the creation of the cart. |
| total required | number Total amount of the purchase cart payed by the customer ( dsscounts applied, taxes included ). If the cart is a cancellation this amount should be negative. The sum of the total values of the activities should be equal to the total sales of the company. |
| original_total | number Original total amount of the purchase cart before any discount or cashback applied before evaluation of the ticket in LG. This value never changes in the different evaluations of the same ticket, and it is used to calculate the total discount applied on the ticket. |
| currency | string Code of the currency acording to the ISO 4217(It must be Capitals letters). In the absence of any information on this point, is going to be filled with the default company currency setup. |
| cashback_score_desired | number The total amount of points that you'd like to spend on the purchase, if specified a cashback array will appear on the response as a recommendation on how should you distribute the score in the different lines. And also, the total of every line will be modifyied acording this array.Use this param or cashbacks array, but you can's use both. If you don't want to deal with specifying exactly the amount of points for the cashback but you'd like to force the maximum redemption of points available for a certain customer, you can specify "-1". |
| vouchers_desired | Array of arrays Deprecated Use coupons_desired instead
By default, all massive and loyalty member promotions (points and discounts) without coupon are included and applied when calculating the ticket.
You can control how vouchers are applied using the
|
| coupons_desired | Array of arrays By default, all massive and loyalty member promotions (points and discounts) are included and applied when calculating the ticket.
You can control how vouchers are applied using the
|
required | Array of objects (LineActivity) Array of lines, at least one is required. |
Array of objects (Cashback) Array of cashbacks. Use this param or cashback_score_desired, but you can's use both. | |
Array of objects (Return) Array of returns. | |
Array of objects (PromotionV2) Array with applied promotions. Important: this is only an informative field, you can't apply a promotion through this field. | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
| business_name | string The company's corporate name. |
| total_net | number Total amount of money paid by the customer, excluding taxes. |
| total_tax | number Total amount of taxes paid by the customer. |
| tpv_id | string Alphanumeric identifier of the PoS terminal where the cart is made. |
| staff_name | string Name of the person on the PoS terminal. |
| order_id | string Alphanumeric identifier of the order the cart belongs to. |
Array of objects (Payment) Details how the cart amount is paid. | |
object (Shipment) | |
| checkout_date | string DateTime of the checkout of the cart. |
| payment_cost | number Total amount of payment cost paid by the customer. |
| shipping_cost | number Total amount of shipping cost paid by the customer. |
| channel | string Channel from which the cart comes. |
| attributes | object Attributes allow you to store additional data on activities. Uses the JSON Schema Form standard link.
Allowed Data Types:
Attributes must be single-level only with a maximum of 50 attributes and 10KB total size. Example:
|
| additional_costs | object It allows you to store additional costs associated with the cart.
Limits:
Example:
|
| apply_discounts | boolean It allows you to decide whether discounts should be applied to the cart or not. By default, discounts are applied to the cart. If you set this parameter to false, no discount will be applied to the cart, but points discount will be applied if |
| apply_points | boolean It allows you to decide whether points campaigns should be applied to the cart or not. By default, points are given to the customer according to the points campaigns configured in the platform. If you set this parameter to false, no points campaign will be given through the cart. This parameter doesn't affect the redemption of points specified through |
{- "id": 1234,
- "code": "1a2b3c4d",
- "location_id": 12,
- "location_code": "12A",
- "customer_id": 8223,
- "customer_code": "8223a",
- "creation_date": "2016-01-01T23:43:20Z",
- "total": 1234,
- "original_total": 1234,
- "currency": "EUR",
- "cashback_score_desired": 123,
- "vouchers_desired": [
- "selected"
], - "coupons_desired": [
- "selected"
], - "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "returns": [
- {
- "ticket_id": 1234,
- "ticket_code": "1a2b3c4d",
- "line_order": 1,
- "from_line_order": 3,
- "quantity": 1,
- "line_order_change": 1
}
], - "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "custom1": "custom value",
- "custom2": "custom value",
- "custom3": "custom value",
- "custom4": "custom value",
- "custom5": "custom value",
- "custom6": "custom value",
- "custom7": "custom value",
- "custom8": "custom value",
- "business_name": "SuperMarket S.L. Spain",
- "total_net": 1200,
- "total_tax": 34,
- "tpv_id": "A55",
- "staff_name": "John Doe",
- "order_id": "Order 1234A",
- "payments": [
- {
- "amount": 15,
- "type": "cash",
- "change": 5
}
], - "shipment": {
- "status": "some_status",
- "tracking_code": "some_code",
- "delivery_address": "some_address",
- "company": "some_company",
- "tracking_url": "some_url"
}, - "checkout_date": "2016-01-01T23:43:20Z",
- "payment_cost": 1.5,
- "shipping_cost": 5.5,
- "channel": "online",
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}, - "apply_discounts": true,
- "apply_points": false
}{- "id": 123456,
- "code": "ACT-123456",
- "creation_date": "2025-06-01T12:00:00Z",
- "location_id": 98765,
- "total": 100.5,
- "original_total": 150.75,
- "score": 100,
- "score_as_money": 12.65,
- "score_used": 120,
- "score_used_as_money": 12.65,
- "score_returned_from_customer": 12,
- "score_returned_from_customer_as_money": 1.25,
- "score_returned_to_customer": 12,
- "score_returned_to_customer_as_money": 1.25,
- "total_scores_coupon_applied": 116,
- "total_scores_coupon_applied_as_money": 1.16,
- "total_discount_voucher_applied": 11.2,
- "total_discount_applied": 11.2,
- "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "customer": [
- {
- "id": 1,
- "score": 1234,
- "score_as_money": 12.34,
- "score_available": 1204,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "score_threshold_cashback_as_money": 100,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}
], - "effects": [
- {
- "rule_id": 2322,
- "line": 1,
- "rule_name": "Product Discount",
- "type": "discount",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "select_customers": "loyalty",
- "value": 100
}, - {
- "rule_id": 2323,
- "line": -1,
- "rule_name": "Holiday Points Bonus",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "all_customers",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 2324,
- "line": 2,
- "rule_name": "Combo Meal Deal",
- "type": "discount",
- "effect_type": "combo_price",
- "distribution_type": "individual_items_pro_rata",
- "select_customers": "targeted",
- "value": 400,
- "coupon_info": {
- "voucher_id": 111,
- "voucher_code": "4344fjaa",
- "coupon_id": 122211,
- "coupon_name": "Combo Meal Deal"
}
}, - {
- "rule_id": 2325,
- "line": 3,
- "rule_name": "Cashback Offer",
- "type": "points",
- "effect_type": "ratio",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "type": "discount",
- "rule_id": 23224,
- "rule_name": "Discount 15% promo",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "effect_type": "rollback",
- "line": 6,
- "value": 400,
- "coupon_info": {
- "voucher_id": 222,
- "voucher_code": "sale190",
- "coupon_id": 12311,
- "coupon_name": "Sales discount example"
}
}, - {
- "type": "points",
- "effect_type": "rollback",
- "rule_id": 12313,
- "rule_name": "Double points promo Weekends",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "line": 7,
- "value": -200,
- "coupon_info": {
- "voucher_id": 223,
- "voucher_code": "double points",
- "coupon_id": 12312,
- "coupon_name": "Double points campaign"
}
}
], - "rejected_campaigns": [
- {
- "rule_id": 1,
- "rule_name": "€5 total cart",
- "type": "discount",
- "error": "The campaign budget was reached",
- "coupon_info": {
- "voucher_id": 1001,
- "voucher_code": "23222",
- "coupon_id": 3222,
- "coupon_name": "€5 total cart",
- "static_code": "SALES89"
}
}
], - "invalid_coupons": [ ],
- "vouchers": [
- {
- "voucher_id": 13009014,
- "voucher_code": "13993492",
- "discount": 1267,
- "line_order": 1,
- "product_id": 2,
- "rule_id": 2,
- "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo",
- "name": " Discount meat 50%",
- "description": "Discount meat 50% extended description",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity"
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "cashback_returns": [
- {
- "line_order": 1,
- "score": 1234
}
], - "scores": [
- {
- "line_order": 1,
- "score": 100,
- "loyalty_score_id": 2,
- "available_from": "2020-01-01",
- "available_to": "2021-01-01"
}
], - "vouchers_desired": [ ],
- "coupons_desired": [ ],
- "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}/activities/{id} is also available as a LEGACY version of this API.
Multicurrency note: if an activity is generated in a country with a currency that is different to the currency of the country that the customer is registered then international = true field will be shown in all the activity responses. In case that both currencies are the same this field will not be shown.
Tier 3 (Low) — See rate limit table
| id required | integer Example: 1234 Activity's id/code value.
|
| search_param | string Example: search_param=id Field used to fetch the activity. Valid values are |
{- "id": 100,
- "currency": "EUR",
- "code": "43433fsss-ihjyw",
- "total": 12,
- "location_id": 120,
- "location_code": "1234567890",
- "customer_id": 100,
- "customer_code": "1234567890",
- "customer": {
- "id": 1,
- "score": 1234,
- "score_as_money": 12.34,
- "score_available": 1204,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "score_threshold_cashback_as_money": 100,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}, - "creation_date": "2026-05-27T00:00:00",
- "lines": [
- {
- "order": 1,
- "total": 100,
- "total_net": 1200,
- "quantity": 100,
- "product_code": "ERMP4L3",
- "product_id": 1567567,
- "product_ean": "GHT567A",
- "product_name": "Example product",
- "product_tax": 100,
- "total_cost": 100,
- "original_total": 100,
- "custom1": "tryit",
- "custom2": "custom",
- "custom3": "custom",
- "custom4": "custom",
- "custom5": "custom",
- "custom6": "custom",
- "custom7": "custom",
- "custom9": "custom",
- "measurement_unit": "u",
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}
}
], - "scores": [
- {
- "score": 100,
- "line_order": 12,
- "loyalty_score_id": 12,
- "available_from": "2026-05-01",
- "available_to": "2026-05-27"
}
], - "business_name": "100",
- "payments": [
- {
- "amount": 100,
- "change": 12,
- "type": "cash"
}
], - "score": 100,
- "score_as_money": 12.34,
- "score_used": 120,
- "score_used_as_money": 12.34,
- "score_returned_to_customer": 12,
- "score_returned_to_customer_as_money": 12.34,
- "score_returned_from_customer": 12,
- "score_returned_from_customer_as_money": 12.34,
- "shipment": [
- {
- "status": "1",
- "tracking_code": "1",
- "delivery_address": "1",
- "company": "1",
- "tracking_url": "1",
- "status_histories": [
- {
- "status": "1",
- "created_at": "1"
}
]
}
], - "vouchers_desired": [ ],
- "coupons_desired": [ ],
- "vouchers": [
- {
- "voucher_id": 13009014,
- "voucher_code": "13993492",
- "discount": 1267,
- "line_order": 1,
- "product_id": 2,
- "rule_id": 2,
- "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo",
- "name": " Discount meat 50%",
- "description": "Discount meat 50% extended description",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity"
}
}
], - "total_discount_voucher_applied": 11.2,
- "total_discount_promotion_applied": 0,
- "total_discount_applied": 11.2,
- "effects": [
- {
- "rule_id": 2322,
- "line": 1,
- "rule_name": "Product Discount",
- "type": "discount",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "select_customers": "loyalty",
- "value": 100
}, - {
- "rule_id": 2323,
- "line": -1,
- "rule_name": "Holiday Points Bonus",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "all_customers",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 2324,
- "line": 2,
- "rule_name": "Combo Meal Deal",
- "type": "discount",
- "effect_type": "combo_price",
- "distribution_type": "individual_items_pro_rata",
- "select_customers": "targeted",
- "value": 400,
- "coupon_info": {
- "voucher_id": 111,
- "voucher_code": "4344fjaa",
- "coupon_id": 122211,
- "coupon_name": "Combo Meal Deal"
}
}, - {
- "rule_id": 2325,
- "line": 3,
- "rule_name": "Cashback Offer",
- "type": "points",
- "effect_type": "ratio",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "type": "discount",
- "rule_id": 23224,
- "rule_name": "Discount 15% promo",
- "distribution_type": "individual_items",
- "select_customers": "targeted",
- "effect_type": "rollback",
- "line": 6,
- "value": 400,
- "coupon_info": {
- "voucher_id": 222,
- "voucher_code": "sale190",
- "coupon_id": 12311,
- "coupon_name": "Sales discount example"
}
}, - {
- "type": "points",
- "effect_type": "rollback",
- "rule_id": 12313,
- "rule_name": "Double points promo Weekends",
- "distribution_type": "individual_items",
- "select_customers": "targeted",
- "line": 7,
- "value": -200,
- "coupon_info": {
- "voucher_id": 223,
- "voucher_code": "doublepoints",
- "coupon_id": 12312,
- "coupon_name": "Double points campaign"
}
}
], - "rejected_campaigns": [
- {
- "rule_id": 1,
- "rule_name": "€5 total cart",
- "type": "discount",
- "error": "The campaign budget was reached",
- "coupon_info": {
- "voucher_id": 1001,
- "voucher_code": "23222",
- "coupon_id": 3222,
- "coupon_name": "€5 total cart",
- "static_code": "SALES89"
}
}
], - "invalid_coupons": [ ],
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "associate_id": 101,
- "cashbacks": [
- {
- "line_order": 12,
- "score": 100,
- "discount": 4.96
}
], - "total_net": 120,
- "total_tax": 12,
- "custom1": "100",
- "custom2": "100",
- "custom3": "100",
- "custom4": "100",
- "custom5": "100",
- "custom6": "100",
- "custom7": "100",
- "custom8": "100",
- "order_id": 100,
- "score_simulation": true,
- "returns": [
- {
- "ticket_id": 100,
- "ticket_code": "a1b2c34d",
- "score": 100,
- "quantity": 100,
- "line_order": 12,
- "from_line_order": 10,
- "line_order_change": 112
}
], - "cashback_returns": [
- {
- "line_order": 12,
- "score": 100
}
], - "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "cashback_score_desired": 12,
- "cashback_score_desired_unused": 12,
- "checkout_date": "2016-01-01T23:43:20Z",
- "payment_cost": 1.5,
- "shipping_cost": 5.5,
- "channel": "online",
- "tpv_id": "100",
- "staff_name": "120",
- "staff_code": "12"
}/activities is also available as a LEGACY version of this API.
Multicurrency note: if an activity is generated in a country with a currency that is different to the currency of the country that the customer is registered then international = true field will be shown in all the activity responses. In case that both currencies are the same this field will not be shown.Regarding filters:
id, code can´t be sent at the same time.
customer_id, customer_code and location_id can´t be sent at the same time. Just one of them is allowed.
country and countries are mutually exclusive and cannot be passed together in the same request.
Tier 3 (Low) — See rate limit table
| customer_id | integer <int64> Example: customer_id=99302 Will return all activities by customer. |
| customer_code | string Example: customer_code=99302a Will return all activities by customer code. |
| associate_id | integer <int64> Example: associate_id=99301 Will return all activities by associate. Mutually exclusive with customer_id and customer_code. |
| location_id | integer <int64> Example: location_id=21 Activities in a given location. Mutually exclusive with |
| location_code | string Example: location_code=789B Activities in a given location. Mutually exclusive with |
| order_id | string Example: order_id=order 101 Activities by order. |
| from_date | string Example: from_date=2017-12-31 Activities filter in a given date range, equivalent to session. |
| to_date | string Example: to_date=2018-12-31 Activities filter in a given date range, equivalent to session. |
| id | integer <int64> Example: id=101 Activity by id. Will return only 1 activity as id is unique. Mutually exclusive with |
| code | string Example: code=T1234 Activity by code. Will return only 1 activity as code is unique.
Mutually exclusive with If the code contains special characters (such as
Example: For code |
| per_page | integer <int64> Example: per_page=20 Max number of activities returned per response. - Default: 10 |
| starting_after | string Example: starting_after=token You will receive this token on every response ( on the variable next_token_starts_after ) in order to have the next batch of elements. |
| country | string Example: country=ES Will return all activities by country (single country filtering). ISO 3166-1 alpha-2. Mutually exclusive with |
| countries | string Example: countries=ES,IT Will return all activities by multiple countries (multi-country filtering). ISO 3166-1 alpha-2. Mutually exclusive with |
{- "data": [
- {
- "id": 1234,
- "code": "T1234",
- "barcode": "0012349437",
- "creation_date": "2017-10-16T12:45:55Z",
- "customer_id": 99302,
- "associate_id": 99303,
- "location_id": 43,
- "total": 15.75,
- "international": true,
- "score": 100,
- "score_used": -20,
- "score_returned_from_customer": -20,
- "score_returned_to_customer": 40,
- "business_name": "Streaming Corp",
- "total_net": 14,
- "total_tax": 1.75,
- "tpv_id": "AT123",
- "staff_name": "John Doe",
- "staff_code": "john-doe",
- "currency": "EUR",
- "score_simulation": true,
- "cashback_score_desired": 10,
- "cashback_score_desired_unused": 8,
- "custom1": "custom 1 value",
- "custom2": "custom 2 value",
- "custom3": "custom 3 value",
- "custom4": "custom 4 value",
- "custom5": "custom 5 value",
- "custom6": "custom 6 value",
- "custom7": "custom 7 value",
- "custom8": "custom 8 value",
- "promotions": [
- {
- "promotion_id": 11,
- "product_id": 34,
- "discount": 4.1,
- "line_order": 5,
- "discount_int": 4
}
], - "customer": {
- "id": 99302,
- "code": "99302a",
- "score": 10,
- "score_available": 10,
- "score_as_money": 12.34,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false
}, - "payments": [
- {
- "amount": 20,
- "type": "cash",
- "change": 4.25
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 100,
- "discount": 8.5
}
], - "scores": [
- {
- "line_order": 1,
- "score": 100,
- "loyalty_score_id": 2,
- "available_from": "2016-01-01"
}
], - "cashback_returns": [
- {
- "line_order": 1,
- "score": 10
}
], - "returns": [
- {
- "line_order": 2,
- "quantity": 5.3,
- "ticket_id": 12,
- "ticket_code": "a1b2c3d4",
- "from_line_order": 1,
- "score": 10
}
], - "lines": [
- {
- "order": 1,
- "total": 15.75,
- "total_net": 14,
- "total_tax": 1.75,
- "total_cost": 16,
- "original_total": 16,
- "price": 16,
- "quantity": 3,
- "product_code": "PR00987L",
- "product_ean": "GHT567A",
- "product_id": 987,
- "product_name": "Product 987 1L",
- "product_tax": 21,
- "custom1": "custom 1 value",
- "custom2": "custom 2 value",
- "custom3": "custom 3 value",
- "custom4": "custom 4 value",
- "custom5": "custom 5 value",
- "custom6": "custom 6 value",
- "custom7": "custom 7 value",
- "custom9": "custom 9 value",
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}
}
], - "shipment": {
- "status": "some_status",
- "tracking_code": "some_code",
- "delivery_address": "some-address",
- "company": "some-company",
- "tracking_url": "some-url",
- "status_histories": [
- {
- "status": "first_status",
- "created_at": "2017-12-25T23:45:55Z"
}, - {
- "status": "second_status",
- "created_at": "2017-12-28T23:45:55Z"
}
]
}, - "rewards": [
- {
- "id": 319,
- "discount": 3.2,
- "line_order": 2,
- "product_id": 12
}
], - "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}
}
], - "next_token_starts_after": "token"
}This endpoint facilitates the complete reversal of a prior purchase identified by the cart id or cart code.
IMPORTANT!: To cancel a cart correctly and generate a rollback for all vouchers as expected, you must wait at least 5 minutes after the original cart creation. This delay ensures that all asynchronous processes related to points accrual and voucher issuance are completed before initiating the cancellation. If you do not wait this time, there is a risk that some vouchers may not be rolled back correctly.
Purpose. The primary function is to process a full return where the customer cancels the entire cart. This ensures that the system accurately tracks the reversal of inventory, points and redeemed promotions.
Mechanism & Result. Upon successful execution, the system performs the following:
A new order/cart object is generated (often referred to as a "Return Cart").
This new object is a mirror copy of the original cart, but with all product quantities and associated monetary values (including products, coupons, and vouchers) represented as negative amounts.
The original cart is not modified.
The system is then triggered to process the rollback of all earned/used points, vouchers affected and return of stock plus reset of Limits.
Considerations
Tier 3 (Low) — See rate limit table
| cart_to_cancel_id required | integer <int64> Id of the cart to cancel. |
| cart_to_cancel_code required | string Code of the cart to cancel. |
| new_cart_id required | integer <int64> Id of the new cart that is going to be created for the full return. |
| new_cart_code required | string <int64> Code of the new cart that is going to be created for the full return. |
{- "cart_to_cancel_id": 2122322222,
- "cart_to_cancel_code": "ORD12345",
- "new_cart_id": 822323232,
- "new_cart_code": "RET12345"
}{- "id": 1234,
- "code": "1a2b3c4d",
- "location_id": 12,
- "location_code": "12A",
- "customer_id": 8223,
- "customer_code": "8223a",
- "creation_date": "2022-01-01T23:43:20Z",
- "total": -100,
- "currency": "EUR",
- "customer": [
- {
- "id": 1,
- "score": 1234,
- "score_as_money": 12.34,
- "score_available": 1204,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "score_threshold_cashback_as_money": 100,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}
], - "score": 100,
- "score_as_money": 12.65,
- "score_used": 120,
- "score_used_as_money": 12.65,
- "score_returned_from_customer": 12,
- "score_returned_from_customer_as_money": 1.25,
- "score_returned_to_customer": 12,
- "score_returned_to_customer_as_money": 1.25,
- "total_scores_coupon_applied": 116,
- "total_scores_coupon_applied_as_money": 1.16,
- "total_discount_voucher_applied": 11.2,
- "total_discount_applied": 11.2,
- "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "returns": [
- {
- "ticket_id": 1234,
- "ticket_code": "1a2b3c4d",
- "line_order": 1,
- "from_line_order": 3,
- "quantity": 1,
- "line_order_change": 1
}
], - "effects": [
- {
- "type": "discount",
- "effect_type": "rollback",
- "rule_id": 54321,
- "rule_name": "Summer Sale 20% Off",
- "distribution_type": "total_cart",
- "select_customers"": "targeted",
- "value": -15,
- "coupon_info": {
- "voucher_id": 456,
- "voucher_code": "SUMMER20",
- "coupon_id": 65432,
- "coupon_name": "Summer Sale Campaign"
}
}, - {
- "type": "points",
- "effect_type": "rollback",
- "rule_id": 12313,
- "rule_name": "Double points promo Weekends",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "line": 7,
- "value": -200,
- "coupon_info": {
- "voucher_id": 223,
- "voucher_code": "doublepoints",
- "coupon_id": 12312,
- "coupon_name": "Double points campaign"
}
}
], - "cashback_returns": [
- {
- "line_order": 1,
- "score": 1234
}
], - "coupons_desired": [ ],
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}
}/custom_entities is also available as a LEGACY version of this API.
Create a new custom entity
Tier 2 (Moderate) — See rate limit table
| id | string Custom entity identifier. It must be unique. |
| customer_id | integer The numerical identifier of the owner customer. Required if customer_code is not provided. |
| customer_code | string The alphanumeric identifier of the owner customer. Required if customer_id is not provided. |
| slug required | string Custom entity definition identifier. |
| data required | object Custom entity payload. It will be validated against the schema configured for the definition with the provided slug. |
| created_at | string Custom entity date of creation. |
{- "id": "fc12345",
- "customer_id": 123456789,
- "customer_code": "code123456789",
- "slug": "fishing_course",
- "data": {
- "prey_count": 25,
- "location": "BCN"
}, - "created_at": "2023-01-01T12:00:00Z"
}{- "id": "fc12345",
- "customer_id": 123456789,
- "customer_code": "code123456789",
- "slug": "fishing_course",
- "data": {
- "prey_count": 25,
- "location": "BCN"
}, - "created_at": "2023-01-01T12:00:00Z",
- "ingested_at": "2023-11-11T12:00:00Z",
- "score": 700,
- "score_available": 200,
- "scores": [
- {
- "score": 200,
- "loyalty_score_id": 1,
- "available_from": "2023-07-10",
- "available_to": "2023-12-31"
}, - {
- "score": 500,
- "loyalty_score_id": 123,
- "available_from": "2024-01-01",
- "available_to": "2024-12-31"
}
], - "customer": {
- "code": "code123456789",
- "id": 123456789,
- "score": 700,
- "score_available": 200
}
}/custom_entities is also available as a LEGACY version of this API.
Tier 3 (Low) — See rate limit table
| id | string Example: id=asdf12345 Id of the custom entity. |
| customer_id | integer <int64> Example: customer_id=123456789 Id of the owner customer. |
| customer_code | string Example: customer_code=code123456789 Code of the owner customer. |
| slug | string Example: slug=fishing_course Code of the custom entity definition. |
| created_at_gt | string Example: created_at_gt=2023-08-31 If specified, it will return the custom entities created after this date. The format must be ISO 8601 |
| starting_after | string Example: starting_after=token Yo will receive this token on every response ( on the variable next_token_starts_after ) in order to have the next batch of elements. |
{- "data": [
- {
- "id": "fc12345",
- "customer_id": 123456789,
- "customer_code": "code123456789",
- "slug": "fishing_course",
- "data": {
- "prey_count": 25,
- "location": "BCN"
}, - "created_at": "2023-01-01T12:00:00Z",
- "ingested_at": "2023-11-11T12:00:00Z"
}
], - "next_token_starts_after": "token"
}/custom_entities/{id} is also available as a LEGACY version of this API.
Tier 3 (Low) — See rate limit table
| id | string Example: asdf12345 Id of the custom entity. |
{- "id": "fc12345",
- "customer_id": 123456789,
- "customer_code": "code123456789",
- "slug": "fishing_course",
- "data": {
- "prey_count": 25,
- "location": "BCN"
}, - "created_at": "2023-01-01T12:00:00Z",
- "ingested_at": "2023-11-11T12:00:00Z"
}/scores/trigger is also available as a LEGACY version of this API.
This endpoint allows you to programmatically trigger a Points or Wallet campaign when a specific condition is fulfilled.
Customers earn points based on predefined campaigns. These rules can be applied in different scenarios, such as purchases, user sign-ups, or custom events defined by your integration. Accumulated points can later be redeemed for discounts, rewards, or coupons.
Points campaigns can be triggered either by specifying a loyalty rule ID or by using a trigger associated with one or more campaigns.
Important:
Endpoint Versions: There are two versions of this endpoint, depending on the loyalty engine in use.
Version 1: - If multiple loyalty rules are associated with the same trigger, only one rule will be executed. - The rule selection order is not guaranteed. - It is strongly recommended to use the loyalty_rule_id to ensure the correct loyalty rule is triggered.
Version 2: - If multiple loyalty rules are associated with the same trigger, all associated rules will be executed and all points will be granted if conditions are met. - To apply only one rule, you must explicitly specify the loyalty_rule_id.
Additional Considerations:
Tier 1 (Critical) — See rate limit table
| trigger required | string Slug of the trigger associated to the points campaign. |
| customer_id required | number ID of the customer. Mutually exclusive with |
| loyalty_score_id | integer <int64> Deprecated Id of the loyalty rule that you would like to trigger. Use |
| loyalty_rule_id required | integer <int64> Id of the points campaign that you would like to trigger.
It is recommended to always use |
| location_id | number Id of the trigger location. |
| location_code | string Code of the trigger location. |
| score_overwrite | number Overwrite the score given by the campaign. Only makes sense if loyalty_rule_id is provided. If no value, points associated to the campaign will be given. Maximum value allowed: 50000000' |
| comments | string Comments about the trigger transaction. |
| country | string ISO 3166-1 alpha-2 country code (It must be Capitals letters Required for Version 1 engine. For Version 2 engine, if not provided, the customer's registration location country will be used. |
{- "trigger": "manual",
- "customer_id": 10,
- "loyalty_score_id": 12,
- "score_overwrite": 30,
- "comments": "30 extra points for completing the poll"
}{- "customer_code": "string",
- "loyalty_score_id": 12,
- "score": 110,
- "score_as_money": 11,
- "customer": {
- "id": 12,
- "code": "12a",
- "score": 100,
- "score_available": 100
}, - "scores": [
- {
- "loyalty_score_id": 2222,
- "score": 100,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "loyalty_score_id": 1222,
- "score": 10,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}
], - "effects": [
- {
- "rule_id": 2222,
- "rule_name": "Manual points adjustment",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 100,
- "value_as_money": 10,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 1222,
- "rule_name": "Manual extra points for tier Gold",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 10,
- "value_as_money": 1,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}
]
}This endpoint allows you to create a new discount campaign.
This process involves creating a Loyalty Campaign and, if the campaign is
configured for targeted customers, an associated Coupon (by providing
coupon_params).
Tier 3 (Low) — See rate limit table
object (CreateNewDiscountsCampaignRequestRuleParams) | |
object (CreateNewDiscountsCampaignRequestCouponParams) This object defines the parameters related to coupons for a new campaign. It includes details such as the static code, availability, printing options, and other relevant attributes that determine how the coupons will be generated, distributed, and redeemed within the campaign. These parameters are essential for configuring the behavior of coupons in targeted campaigns or loyalty club promotions. Important: Required for targeted campaigns, all-members campaigns and loyalty club promotions that include a coupon. |
{- "rule_params": {
- "name": "25 % discount on selected category",
- "when": "after_create_activity",
- "loyalty_rule_category_id": 1,
- "description": "Discount for new customers.",
- "available_from": "2025-10-01T08:59:59.999+00:00",
- "available_to": "2025-12-31T23:59:59.999+00:00",
- "active": true,
- "currency": "EUR",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "select_customers": "loyalty",
- "coupon_required": false,
- "partner_id": 123,
- "customer_registration_countries": [
- "string"
], - "once": "num_month",
- "once_limit": 1,
- "chance_to_accrue_limit": 1000,
- "chance_to_accrue_period": "num_month",
- "budget_period": "num_month",
- "budget_value": 100000,
- "maximum_budget_transaction": 500000,
- "rule_conditions": {
- "conditions": {
- "and": [
- {
- "key": "country",
- "field": "country",
- "values": [
- "ES"
], - "operator": "in"
}, - {
- "key": "cart_product_id",
- "field": "product_id",
- "values": [
- 5
], - "grouped": true,
- "operator": "in",
- "conditions": [
- {
- "field": "quantity",
- "value": 2,
- "operator": "gte"
}
], - "array_field": "lines"
}
]
}
}, - "rule_effects": {
- "key": "percentage",
- "type": "percentage",
- "value": 25,
- "distribution": "individual_items",
- "rule_group": false,
- "limits": 0
}, - "rule_application": {
- "conditions": {
- "and": [
- {
- "key": "cart_product_id",
- "field": "product_id",
- "values": [
- 5
], - "grouped": true,
- "operator": "in",
- "conditions": [
- {
- "field": "quantity",
- "value": 1,
- "operator": "eq"
}
], - "array_field": "lines"
}
]
}
}, - "stackability_properties": "stackability",
- "priority": 1
}, - "coupon_params": {
- "static_code": "{{rand_static_code}}",
- "key": "UNIQUEKEY123",
- "available_days": 90,
- "available_delay_days": 0,
- "print_days": 90,
- "print_delay_days": 0,
- "printable": true,
- "priority": 1,
- "external_id": "POS_COUPON_XYZ",
- "auto_select": true,
- "active": true,
- "name": "string",
- "max_redemptions": 0,
- "available_from": "string",
- "available_to": "string"
}
}{- "status": "success",
- "id": 223222
}Returns a list of discount campaigns available under different conditions (see query parameters for filtering options).
Use cases:
Note: Campaigns response order:
Considerations:
Refer to the JSON response schema below for details.
Tier 3 (Low) — See rate limit table
| campaign_audience | string Example: campaign_audience=loyalty Type of discount campaign. If not provided, it will return all types of discount campaigns (massive, loyalty member campaigns and targeted). Possible values:
All these types of campaigns can be filtered by country, location or customer (see other parameters). |
| location_id | integer <int64> Example: location_id=1234 'Filter discount campaigns available in certain location. If both |
| location_code | string Example: location_code=abc Filter discount campaigns available in certain location, considering massive campaigns and loyalty member campaigns. If both |
| customer_id | integer <int64> Example: customer_id=12345 ID of the customer. Mutually exclusive with Filter discount campaigns defined for the country of the customer and specific targeted campaigns for that customer. If this value (or customer code) is sent as a parameter, it will return all the discount campaigns available in the customer's country of registration (massive campaigns and loyalty member campaigns) plus the specific targeted campaigns for that customer. |
| customer_code | string Example: customer_code=12345a Code of the customer. Mutually exclusive with If this value (or customer id) is sent as a parameter, it will return all the discount campaigns available in the customer's country of registration (massive campaigns and loyalty member campaigns) plus the specific targeted campaigns for that customer. |
| countries | string Example: countries=ES Countries where the discount campaign is available. Mutually exclusive with For more than one country, example: countries=ES&countries=FR . It will return discount campaigns for Spain OR France (massive campaigns and loyalty member campaigns |
| tier_id | integer <int64> Example: tier_id=12345 Returns all active discount campaigns applicable to the loyalty tier level (massive campaigns and loyalty member campaigns)
Mutually exclusive with |
| category_id | integer <int64> Example: category_id=2 Returns all active discount campaigns applicable to the specified category. |
| selected | boolean Example: selected=true If true returns only the discount campaigns vouchers that are currently selected for the customer (only applicable when If false, it returns only discount campaigns vouchers for that customer that are not selected (considering targeted campaigns only). If not provided, it returns all discount campaigns vouchers for that customer, regardless of their selection status. If you want to get only targeted campaigns you have to use the campaign_audience parameter with the value 'targeted'. Otherwise it will include massive and loyalty campaigns in the |
| starting_after | string Example: starting_after=100 You will receive this number on every response (on the variable next_token_starts_after) in order to have the next batch of elements. |
{- "data": [
- {
- "id": 1001,
- "name": "25% discount on selected category",
- "description": "Campaign offering a 25% discount on electronics when total purchase exceeds €200.",
- "category": {
- "id": 1,
- "name": "Baseline",
- "priority": 1
}, - "active": true,
- "available_from": "2025-06-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "currency": "EUR",
- "when": "after_create_activity",
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "ES",
- "FR",
- "IT"
], - "tiers": [
- {
- "id": 10,
- "name": "Gold Tier",
- "threshold": 500
}, - {
- "id": 11,
- "name": "Platinum Tier",
- "threshold": 1000
}
], - "rule_conditions": "{\"conditions\":{\"and\":[{\"field\":\"total\",\"operator\":\"gte\",\"value\":200,\"key\":\"cart.total\"},{\"field\":\"country\",\"operator\":\"in\",\"values\":[\"ES\",\"FR\"],\"key\":\"cart.country\"}]}}\n",
- "application": "{\"application\":{\"and\":[{\"field\":\"product_categories\",\"operator\":\"in\",\"values\":[101,202],\"key\":\"cart.item.product_categories\",\"array_field\":\"lines\"}]}}\n",
- "effects": "{\"key\":\"percentage\",\"type\":\"percentage\",\"value\":25,\"distribution\":\"individual_items\"}\n",
- "chances_to_accrue": "num_month",
- "chances_to_accrue_limit": 2,
- "budget_value": 100000,
- "budget_period": "num_month",
- "maximum_discount_transaction": 50,
- "stackability_properties": "stackability",
- "priority": 1,
- "partner": {
- "id": 5,
- "name": "Tech Retailers Inc.",
- "description": "Partnership with electronics chain",
}
}, - {
- "id": 1002,
- "name": "Buy 2 Get 1 Free",
- "description": "Special promotion: for every 2 beverages purchased, get 1 free.",
- "category": {
- "id": 2,
- "name": "Universal",
- "priority": 2
}, - "active": true,
- "available_from": "2025-09-01",
- "available_to": "2025-11-30",
- "recurrence_type": "weekly",
- "recurrence_days": [
- 5,
- 6
], - "currency": "USD",
- "when": "after_create_activity",
- "select_customers": "all_customers",
- "customer_registration_countries": [
- "US",
- "MX"
], - "tiers": [ ],
- "rule_conditions": "{\"conditions\":{\"and\":[{\"array_field\":\"lines\",\"field\":\"product_categories\",\"operator\":\"in\",\"values\":[303],\"key\":\"cart.item.product_categories\"}]}}\n",
- "rule_application": "{\"application\":{\"and\":[{\"array_field\":\"lines\",\"field\":\"product_id\",\"operator\":\"in\",\"values\":[45,46,47],\"key\":\"cart.item.product\"}]}}\n",
- "rule_effects": "{\"key\":\"percentage\",\"type\":\"percentage\",\"value\":\"100\",\"rule_grouped\":\"true\",distribution\":\"individual_items\"}\n",
- "chances_to_accrue": "always",
- "chances_to_accrue_limit": 0,
- "budget_value": 50000,
- "budget_period": "num_day",
- "maximum_discount_transaction": 20,
- "stackability_properties": "highest_discount",
- "priority": 2,
- "partner": {
- "id": 7,
- "name": "Beverage Co.",
- "description": "Partnership with beverage brand",
}
}, - {
- "id": 8012,
- "name": "Exclusive 15% off for you",
- "description": "Targeted campaign offering 15% off for selected customers.",
- "category": {
- "id": 3,
- "name": "Targeted",
- "priority": 3
}, - "active": true,
- "available_from": "2025-10-01",
- "available_to": "2025-10-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "currency": "EUR",
- "coupon_required": true,
- "when": "after_create_activity",
- "select_customers": "targeted",
- "customer_registration_countries": [
- "ES"
], - "tiers": [ ],
- "rule_conditions": "{\"conditions\":{\"and\":[{\"field\":\"total\",\"operator\":\"gte\",\"value\":50,\"key\":\"cart.total\"}]}}\n",
- "rule_application": "{\"application\":{\"and\":[]}}\n",
- "rule_effects": "{\"key\":\"percentage\",\"type\":\"percentage\",\"value\":15,\"distribution\":\"individual_items\"}\n",
- "chances_to_accrue": "always",
- "chances_to_accrue_limit": 0,
- "budget_value": 10000,
- "budget_period": "num_month",
- "maximum_discount_transaction": 30,
- "stackability_properties": "stackability",
- "priority": 3,
- "partner": {
- "id": 12,
- "name": "Fashion Brand",
- "description": "Apparel partner",
}, - "coupon_info": {
- "coupon_id": 123,
- "static_code": "SALE15OFF",
- "coupon_name": "Exclusive 15% off for you",
- "external_id": "EXT-8012",
- "key": "VOUCHER8012",
- "voucher_info": {
- "voucher_id": 789,
- "voucher_code": "SALE15OFF",
- "available_redemptions": 1,
- "max_redemptions": 1,
- "selected": true,
- "status": "pending",
- "available_from": "2025-10-01T00:00:00Z",
- "available_to": "2025-10-31T23:59:59Z",
- "print_from": "2025-10-01T00:00:00Z",
- "print_to": "2025-10-31T23:59:59Z",
- "priority": 3,
- "printable": true
}
}
}
], - "next_token_starts_after": "8012"
}Updates a discount campaign.
Tier 3 (Low) — See rate limit table
| value required | integer <int64> Id of the campaign to be updated |
object (UpdateANewCampaignRequestRuleParams) | |
object (UpdateANewCampaignRequestCouponParams) |
{- "rule_params": {
- "name": "25 % discount on selected category",
- "when": "after_create_activity",
- "loyalty_rule_category_id": 1,
- "description": "Discount for new customers.",
- "available_from": "2025-06-01",
- "available_to": "2025-12-31",
- "active": true,
- "currency": "EUR",
- "recurrence_type": "daily",
- "recurrence_days": false,
- "activation_period_type": "relative",
- "activation_fixed_option_selected": "at_the_end_of_the_calendar_month",
- "activation_date": "2024-08-15",
- "activation_delay": 0,
- "activation_delay_unit": "days",
- "expiration_period_type": "relative",
- "fixed_option_selected": "at_the_end_of_the_calendar_month",
- "availability_duration": 30,
- "availability_duration_unit": "days",
- "availability_duration_natural": false,
- "transferable": false,
- "partner_id": 123,
- "customer_registration_countries": [
- "string"
], - "once": "num_month",
- "once_limit": 1,
- "chance_to_accrue_limit": 1000,
- "chance_to_accrue_period": "num_month",
- "budget_period": "num_month",
- "budget_value": 100000,
- "maximum_budget_transaction": 500000,
- "rule_conditions": "{\"conditions\": {\"and\": [{\"key\": \"country\", \"field\": \"country\", \"values\": [\"ES\"], \"operator\": \"in\"}, {\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 2, \"operator\": \"gte\"}], \"array_field\": \"lines\"}]}}",
- "rule_effects": "{\"key\": \"percentage\", \"type\": \"percentage\", \"value\": 25, \"distribution\": \"individual_items\" }",
- "rule_application": "{\"conditions\": {\"and\": [{\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 1, \"operator\": \"eq\"}], \"array_field\": \"lines\"}]}}",
- "stackability_properties": "stackability",
- "priority": 1,
- "custom_entity_definition_id": 100
}, - "coupon_params": {
- "name": "Targeted Customer Discount Coupon",
- "active": true,
- "static_code": "{{rand_static_code}}",
- "print_from": "2024-03-01",
- "print_to": "2024-09-30",
- "key": "UNIQUEKEY123",
- "priority": 1,
- "available_days": 90,
- "available_delay_days": 0,
- "print_days": 90,
- "print_delay_days": 0,
- "printable": true,
- "external_id": "POS_COUPON_XYZ",
- "auto_select": true,
- "available_from": "2024-03-01",
- "available_to": "2025-19-30"
}
}{- "status": "success"
}Tier 3 (Low) — See rate limit table
| value required | integer <int64> Example: 1234 The value which you want to search by. This value can be related to the campaign id, the voucher code, the voucher id, the static code of the coupon or the campaign history id. |
| search_by | string Example: search_by=campaign_history_id The field by which the search will be performed.
|
{- "id": 1001,
- "name": "25 % discount on selected category",
- "description": "string",
- "category": {
- "id": 1,
- "name": "Baseline",
- "priority": 1
}, - "active": true,
- "available_from": "2025-06-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [
- 0
], - "currency": "EUR",
- "coupon_required": false,
- "when": "after_create_activity",
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "string"
], - "achievement_definitions": [
- {
- "id": 132,
- "level": 2,
- "name": "Silver",
- "tier_id": 122,
- "tier_name": "Total expenditure"
}
], - "rule_conditions": "{\"conditions\": {\"and\": [{\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 1, \"operator\": \"eq\"}], \"array_field\": \"lines\"}]}}",
- "rule_application": "{\"application\": {\"and\": [{\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 1, \"operator\": \"eq\"}], \"array_field\": \"lines\"}]}}",
- "rule_effects": "{\"key\": \"percentage\", \"type\": \"percentage\", \"value\": 25, \"distribution\": \"individual_items\" }",
- "once": "num_month",
- "once_limit": 1,
- "chances_to_accrue_period": "num_month",
- "chances_to_accrue_limit": 1,
- "budget_value": 100000,
- "budget_period": "num_month",
- "maximum_discount_transaction": 50,
- "stackability_properties": "stackability",
- "priority": 1,
- "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
- "image_url": "https//www.imagetest.com/image.png",
- "image_file_name": "image.png"
}, - "coupon_info": {
- "coupon_id": 123,
- "static_code": "SALE50OFF",
- "coupon_name": " Discount meat 50%",
- "external_id": "EXT-456",
- "key": "VOUCHER123",
- "voucher_info": {
- "voucher_id": 789,
- "voucher_code": "SALE50OFF",
- "available_redemptions": 10,
- "max_redemptions": 100,
- "selected": true,
- "status": "pending",
- "available_from": "2024-01-01T00:00:00Z",
- "available_to": "2024-12-31T23:59:59Z",
- "print_from": "2024-01-01T00:00:00Z",
- "print_to": "2024-12-31T23:59:59Z",
- "priority": 1,
- "printable": true
}
}, - "product_ids_rule_conditions": [
- "string"
], - "product_ids_rule_application": [
- "string"
], - "locations_ids": [
- 0
], - "location_codes": [
- "string"
]
}This endpoint allows clients to redeem a specific voucher or coupon. It is designed to handle both types of coupons:
Tier 2 (Moderate) — See rate limit table
| voucher_code required | string The voucher code to redeem. |
| static_code required | string The coupon code. Each static code is linked to a single campaign. Important: If a static code is linked to multiple vouchers, the one with the earliest expiration date will be redeemed. |
| customer_id required | integer ID of the customer, is mutually exclusive to |
| customer_code required | string Code of the customer, is mutually exclusive to |
| cart_id required | integer ID of the cart, is mutually exclusive to |
| cart_code required | string Code of the cart, is mutually exclusive to |
| discount required | integer the discount applied in the voucher/coupon (in cents). This allows adjusting the campaign’s budget accordingly. |
{- "voucher_code": "212128711",
- "static_code": "AAHY79212",
- "customer_id": 8223,
- "customer_code": "8223a",
- "cart_id": 8223,
- "cart_code": "8223asf44fffdd",
- "discount": 1500
}{- "rule_id": 555253114,
- "campaign_history_id": 7206,
- "rule_name": "Rule name",
- "type": "discount",
- "effect_type": "external_redeem",
- "distribution_type": "total",
- "value": 1500,
- "value_as_money": 1500,
- "select_customers": "targeted",
- "coupon_info": {
- "voucher_id": 31176968,
- "voucher_code": "212128711",
- "coupon_id": 100004180,
- "coupon_name": "Coupon name",
- "static_code": "AAHY79212"
}
}Retrieves all discounts applied by promotional campaigns, grouped by event type. A record is generated for each event associated with a discount campaign (e.g., cart event).
Tier 3 (Low) — See rate limit table
| customer_id | integer Example: customer_id=787665252 Mutually exclusive with |
| customer_code | string Example: customer_code=a1b2c3d4-4jfhdksl2 Mutually exclusive with |
| starting_after | string Example: starting_after=11 Pagination token in order to have the next batch of elements. |
{- "data": [
- {
- "id": 123119,
- "created_at": "2017-12-12T13:45:22Z",
- "amount": 899.12,
- "customer_id": 2323,
- "activity_id": 4327463374
}, - {
- "id": 123119,
- "created_at": "2019-12-12T13:45:22Z",
- "amount": 1,
- "customer_id": 2323,
- "activity_id": 12223332
}
], - "next_token_starts_after": "234"
}This endpoint allows you to trigger a coupon with a discount for a customer.
Important Notes:
This endpoint only works for coupons or for discount campaigns of the type Targeted
You must provide either customer_id or customer_code (mutually exclusive)
You must provide either coupon_id or loyalty_rule_id (mutually exclusive, but at least one is required)
external_voucher_code is optional and has no validation - any value provided will be used as-is for voucher code generation
priority_allocation is optional - when set to true, the voucher will be generated and assigned with maximum priority
Rate Limit: This endpoint has a limit of 50 Request Per Second (RPS)
Tier 1 (Critical) — See rate limit table
| customer_id required | number ID of the customer. Mutually exclusive with |
| coupon_id required | number ID of the coupon. Mutually exclusive with |
| external_voucher_code | string Optional. Code that will be used to create the Voucher. Important: This parameter has no validation - any value provided will be used as-is for voucher code generation. |
| priority_allocation | boolean Optional. When |
{- "customer_id": 1,
- "coupon_id": 2
}{- "status": "success"
}Returns a list of game campaigns available under different conditions (see query parameters for filtering options).
Use cases:
Note: Campaigns response order:
For targeted campaigns, each item may include loyalty_rule_history_id. Use that value with GET /games/{id}?search_by=loyalty_rule_history_id to retrieve the historical snapshot for that specific delivery.
Multi-language content (e.g. name, description) follows the Accept-Language header. Refer to the JSON response schema below for details.
Tier 3 (Low) — See rate limit table
| campaign_audience | string Example: campaign_audience=loyalty Type of game campaign. If not provided, it will return all types (loyalty member campaigns and targeted). Possible values:
All these types can be filtered by country, location or customer (see other parameters). |
| location_id | integer <int64> Example: location_id=1234 Filter game campaigns available in a certain location (loyalty member campaigns). If both |
| location_code | string Example: location_code=abc Filter game campaigns available in a certain location (loyalty member campaigns). If both |
| customer_id | string Example: customer_id=12345 ID of the customer. Mutually exclusive with |
| customer_code | string Example: customer_code=12345a Code of the customer. Mutually exclusive with |
| countries | string Example: countries=ES Countries where the game campaign is available. Mutually exclusive with |
| tier_id | integer <int64> Example: tier_id=12345 Returns all active game campaigns applicable to the loyalty tier level. Mutually exclusive with |
| starting_after | string Example: starting_after=100 Cursor for pagination. Use the value of next_token_starts_after from the previous response to get the next page. |
| per_page | integer <uint> Example: per_page=20 Number of items per page (pagination). |
{- "data": [
- {
- "id": 3001,
- "name": "Spin the Wheel",
- "description": "Spin to win a prize on your next visit.",
- "active": true,
- "available_from": "2025-01-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "ES",
- "FR"
], - "rule_type": "gaming",
- "game": {
- "id": 1,
- "loyalty_rule_id": 3001,
- "type": "wheel",
- "config": "{}",
- "template": "default",
- "game_prizes": [
- {
- "id": 1,
- "game_id": 1,
- "name": "10% discount",
- "outcome": "discount",
- "display_options": "{}",
- "weight": 0.5,
- "stock": 100,
- "stock_management_strategy": "decrement"
}
]
}
}, - {
- "id": 3002,
- "name": "Targeted Lucky Wheel",
- "description": "Special game campaign for selected customers.",
- "active": true,
- "available_from": "2025-01-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "select_customers": "targeted",
- "loyalty_rule_history_id": 900004,
- "customer_registration_countries": [
- "ES"
], - "rule_type": "gaming",
- "game": {
- "id": 2,
- "loyalty_rule_id": 3002,
- "type": "wheel",
- "config": "{}",
- "template": "default",
- "game_prizes": [
- {
- "id": 2,
- "game_id": 2,
- "name": "50 points",
- "outcome": "points",
- "display_options": "{}",
- "weight": 0.4,
- "stock": 500,
- "stock_management_strategy": "decrement"
}
]
}
}
], - "next_token_starts_after": "3001"
}Returns a single game campaign.
Use search_by to choose how the path id is interpreted. If search_by=loyalty_rule_history_id, then path id must be a loyalty_rule_history_id value. For targeted game historical snapshots, use search_by=loyalty_rule_history_id. This lookup is only valid for targeted gaming campaigns; otherwise, the API returns 400 invalid_request.
Multi-language content (e.g. name, description) follows the Accept-Language header.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 3001 Identifier value according to
|
| search_by | string Default: "loyalty_rule_id" Enum: "loyalty_rule_id" "loyalty_rule_history_id" "campaign_history_id" "static_code" Example: search_by=loyalty_rule_history_id Lookup strategy for path |
{- "id": 3001,
- "name": "Lucky Wheel",
- "description": "Spin the wheel once per day and win discounts or points on your next purchase.",
- "active": true,
- "available_from": "2025-01-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "ES",
- "PT"
], - "loyalty_rule_category": {
- "id": 10,
- "name": "Seasonal promotions",
- "priority": 1,
- "category_type": "seasonal"
}, - "rule_conditions": "{\"min_points\": 0, \"allowed_tiers\": [1, 2, 3]}",
- "rule_application": "{\"max_plays_per_period\": 1, \"period\": \"day\"}",
- "rule_effects": "{\"apply_best_prize\": true}",
- "rule_type": "gaming",
- "game": {
- "id": 1,
- "loyalty_rule_id": 3001,
- "type": "wheel",
- "config": "{\"spins\": 1, \"theme\": \"default\", \"sectors\": 8}",
- "template": "default",
- "game_prizes": [
- {
- "id": 1,
- "game_id": 1,
- "name": "10% off your next purchase",
- "outcome": "discount",
- "display_options": "{\"icon\": \"percent\", \"color\": \"#2E7D32\"}",
- "weight": 0.15,
- "stock": 500,
- "stock_management_strategy": "decrement"
}, - {
- "id": 2,
- "game_id": 1,
- "name": "50 bonus points",
- "outcome": "points",
- "display_options": "{\"icon\": \"star\", \"color\": \"#FFC107\"}",
- "weight": 0.25,
- "stock": 1000,
- "stock_management_strategy": "decrement"
}, - {
- "id": 3,
- "game_id": 1,
- "name": "Try again",
- "outcome": "no_prize",
- "display_options": "{\"icon\": \"refresh\"}",
- "weight": 0.6,
- "stock": -1,
- "stock_management_strategy": "unlimited"
}
]
}, - "priority": 5,
- "stackability_properties": null,
- "when": null,
- "once": null,
- "once_limit": null
}Executes a play for the given game campaign. The customer is identified by either customer_id or customer_code in the request body.
The game engine evaluates eligibility (campaign dates, audience, location, etc.), selects a prize according to the game configuration, and applies the corresponding effect (e.g. discount, points, voucher). The response returns the list of effects applied for this play.
For targeted audience game campaigns, you must send loyalty_rule_history_id in the request body with the history assigned to the customer. If the history is missing or does not match the targeted campaign, the response is still 200 with an empty effects array. For non-targeted campaigns, loyalty_rule_history_id is optional and does not change the expected play behavior.
If the customer and game do not match (for example, the customer is not eligible to play), the response is still 200 with an empty effects array. If the customer can play but no prize is selected, the response is still 200 and the effect status is no_prize. If a prize is selected but stock is already exhausted, the response is still 200 and the effect status is stock_exhausted.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 3001 ID of the game campaign to play |
Customer identifier; exactly one of customer_id or customer_code is required. For targeted audience campaigns, include loyalty_rule_history_id.
| customer_id required | integer <int64> [ 1 .. 9223372036854776000 ] ID of the customer. Mutually exclusive with |
| customer_code | string <= 255 characters Code of the customer. Mutually exclusive with |
| loyalty_rule_history_id | integer <int64> [ 1 .. 9223372036854776000 ] Optional loyalty rule history identifier. For targeted audience game campaigns, send the history ID assigned to the customer. If it is missing or does not match, the play returns |
{- "customer_id": 8223342
}{- "code": "success",
- "effects": [
- {
- "game_info": {
- "config": "{\"defeat_message\": \"lose\", \"victory_message\": \"win\"}",
- "game_id": 101,
- "game_type": "scratch",
- "outcome": "{\"promotion_id\": 1234568150, \"promotion_type\": \"points\"}",
- "prize_id": 125,
- "status": "won",
- "status_message": "Prize won and applied successfully",
- "template": {
- "String": "",
- "Valid": false
}, - "won_prize": {
- "name": "Test points prize",
- "points": 100,
- "type": "points"
}
}, - "line": 0,
- "order_apply": 0,
- "rule_id": 1234568641,
- "rule_name": "test play",
- "rule_unique_id": "1234568641",
- "select_customers": "loyalty",
- "type": "gaming"
}
]
}This endpoint is used to create a new promotional points campaign. Please consult with the support team for the correct application of the request payload to ensure campaigns function properly.
Tier 3 (Low) — See rate limit table
object (CreateNewPointsCampaignRequestRuleParams) | |
object (CreateNewPointsCampaignRequestCouponParams) This object defines the parameters related to coupons for a new campaign. It includes details such as the static code, availability, printing options, and other relevant attributes that determine how the coupons will be generated, distributed, and redeemed within the campaign. These parameters are essential for configuring the behavior of coupons in targeted campaigns or loyalty club promotions. Important: Required for targeted campaigns, all-members campaigns and loyalty club promotions that include a coupon. |
{- "rule_params": {
- "name": "25 % discount on selected category",
- "when": "after_create_activity",
- "loyalty_rule_category_id": 1,
- "description": "Discount for new customers.",
- "available_from": "2025-10-01T08:59:59.999+00:00",
- "available_to": "2025-12-31T23:59:59.999+00:00",
- "active": true,
- "currency": "EUR",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "select_customers": "loyalty",
- "coupon_required": false,
- "activation_period_type": "relative",
- "activation_fixed_option_selected": "at_the_end_of_the_calendar_month",
- "activation_date": "2024-08-15",
- "expiration_date": "2024-12-31",
- "activation_delay": 0,
- "activation_delay_unit": "days",
- "expiration_period_type": "relative",
- "fixed_option_selected": "at_the_end_of_the_calendar_month",
- "availability_duration": 30,
- "availability_duration_unit": "days",
- "availability_duration_natural": false,
- "transferable": false,
- "partner_id": 123,
- "customer_registration_countries": [
- "string"
], - "once": "num_month",
- "once_limit": 1,
- "chance_to_accrue_limit": 1000,
- "chance_to_accrue_period": "num_month",
- "budget_period": "num_month",
- "budget_value": 100000,
- "maximum_budget_transaction": 500000,
- "rule_conditions": {
- "conditions": {
- "and": [
- {
- "key": "country",
- "field": "country",
- "values": [
- "ES"
], - "operator": "in"
}, - {
- "key": "cart_product_id",
- "field": "product_id",
- "values": [
- 5
], - "grouped": true,
- "operator": "in",
- "conditions": [
- {
- "field": "quantity",
- "value": 2,
- "operator": "gte"
}
], - "array_field": "lines"
}
]
}
}, - "rule_effects": {
- "key": "percentage",
- "type": "percentage",
- "value": 25,
- "distribution": "individual_items",
- "rule_group": false,
- "limits": 0
}, - "rule_application": {
- "conditions": {
- "and": [
- {
- "key": "cart_product_id",
- "field": "product_id",
- "values": [
- 5
], - "grouped": true,
- "operator": "in",
- "conditions": [
- {
- "field": "quantity",
- "value": 1,
- "operator": "eq"
}
], - "array_field": "lines"
}
]
}
}, - "stackability_properties": "stackability",
- "priority": 1,
- "custom_entity_definition_id": 100
}, - "coupon_params": {
- "static_code": "{{rand_static_code}}",
- "key": "UNIQUEKEY123",
- "available_days": 90,
- "available_delay_days": 0,
- "print_days": 90,
- "print_delay_days": 0,
- "printable": true,
- "priority": 1,
- "external_id": "POS_COUPON_XYZ",
- "auto_select": true,
- "active": true,
- "name": "string",
- "max_redemptions": 0,
- "available_from": "string",
- "available_to": "string"
}
}{- "status": "success",
- "id": 3343333
}Returns a list of points campaigns available under different conditions (see query parameters for filtering options).
Use cases:
Note: Campaigns response order:
Refer to the JSON response schema below for details.
Tier 3 (Low) — See rate limit table
| campaign_audience | string Example: campaign_audience=loyalty Type of points campaign. If not provided, it will return all types of points campaigns (loyalty member campaigns and targeted). Possible values:
All these types of campaigns can be filtered by country, location or customer (see other parameters). |
| location_id | integer <int64> Example: location_id=1234 'Filter points campaigns available in certain location (loyalty member campaigns). If both |
| location_code | string Example: location_code=abc Filter points campaigns available in certain location, considering loyalty member campaigns. If both |
| customer_id | integer <int64> Example: customer_id=12345 ID of the customer. Mutually exclusive with Filter points campaigns defined for the country of the customer and specific targeted campaigns for that customer. If this value (or customer code) is sent as a parameter, it will return all the points campaigns available in the customer's country of registration (loyalty member campaigns) plus the specific targeted campaigns for that customer. |
| customer_code | string Example: customer_code=12345a Code of the customer. Mutually exclusive with If this value (or customer id) is sent as a parameter, it will return all the points campaigns available in the customer's country of registration (loyalty member campaigns) plus the specific targeted campaigns for that customer. |
| countries | string Example: countries=ES Countries where the points campaign is available. Mutually exclusive with For more than one country, example: countries=ES&countries=FR . It will return points campaigns for Spain OR France |
| tier_id | integer <int64> Example: tier_id=12345 Returns all active points campaigns applicable to the loyalty tier level.
Mutually exclusive with |
| selected | boolean Example: selected=true If true returns only the points campaigns vouchers that are currently selected for the customer (only applicable when If false, it returns only points campaigns vouchers for that customer that are not selected. If not provided, it returns all points campaigns vouchers for that customer, regardless of their selection status. |
| category_id | integer <int64> Example: category_id=2 Returns all active points campaigns applicable to the specified category. |
| starting_after | string Example: starting_after=100 You will receive this number on every response (on the variable next_token_starts_after) in order to have the next batch of elements. |
{- "data": [
- {
- "id": 2001,
- "name": "10 extra points on beverages",
- "description": "Earn 10 extra points when buying any beverage over $5.",
- "category": {
- "id": 1,
- "name": "Baseline",
- "priority": 1
}, - "active": true,
- "available_from": "2025-01-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "currency": "USD",
- "when": "after_create_activity",
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "US",
- "MX"
], - "achievement_definitions": [
- {
- "id": 1,
- "name": "Bronze Tier",
- "threshold": 100
}
], - "rule_conditions": "{\"conditions\":{\"and\":[{\"field\":\"total\",\"operator\":\"gte\",\"value\":5,\"key\":\"cart.total\"},{\"array_field\":\"lines\",\"field\":\"product_categories\",\"operator\":\"in\",\"values\":[303],\"key\":\"cart.item.product_categories\"}]}}\n",
- "rule_application": "{\"application\":{\"and\":[{\"array_field\":\"lines\",\"field\":\"product_id\",\"operator\":\"in\",\"values\":[45,46,47],\"key\":\"cart.item.product\"}]}}\n",
- "rule_effects": "{\"key\":\"direct_value\",\"type\":\"direct_value\",\"value\":10,\"distribution\":\"individual_items\"}\n",
- "chances_to_accrue": "num_day",
- "chances_to_accrue_limit": 1,
- "budget_value": 50000,
- "budget_period": "num_month",
- "maximum_discount_transaction": 20,
- "activation_period_type": "relative",
- "activation_delay": 0,
- "activation_delay_unit": "days",
- "expiration_period_type": "relative",
- "availability_duration": 30,
- "availability_duration_unit": "days",
- "stackability_properties": "stackability",
- "priority": 1,
- "transferable": false,
- "partner_id": 101
}, - {
- "id": 2002,
- "name": "Back to School Promo",
- "description": "20% cashback return on all stationery during September.",
- "category": {
- "id": 2,
- "name": "Universal",
- "priority": 2
}, - "active": true,
- "available_from": "2025-09-01",
- "available_to": "2025-09-30",
- "recurrence_type": "monthly",
- "recurrence_days": [
- 1,
- 15
], - "currency": "EUR",
- "when": "after_create_activity",
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "ES",
- "FR"
], - "achievement_definitions": [ ],
- "rule_conditions": "{\"conditions\":{\"and\":[{\"array_field\":\"lines\",\"field\":\"product_categories\",\"operator\":\"in\",\"values\":[101,102],\"key\":\"cart.item.product_categories\"}]}}\n",
- "rule_application": "{\"application\":{\"and\":[{\"array_field\":\"lines\",\"field\":\"product_id\",\"operator\":\"in\",\"values\":[501,502,503],\"key\":\"cart.item.product\"}]}}\n",
- "rule_effects": "{\"key\":\"percentage\",\"type\":\"percentage\",\"value\":20,\"distribution\":\"individual_items\"}\n",
- "chances_to_accrue": "always",
- "chances_to_accrue_limit": 0,
- "budget_value": 100000,
- "budget_period": "num_year",
- "maximum_discount_transaction": 100,
- "activation_period_type": "fixed",
- "activation_fixed_option_selected": "at_the_beginning_of_the_calendar_month",
- "activation_date": "2025-09-01",
- "expiration_period_type": "fixed",
- "fixed_option_selected": "at_the_end_of_the_calendar_month",
- "expiration_date": "2025-09-30",
- "stackability_properties": "highest_discount",
- "priority": 2,
- "transferable": true,
- "partner_id": 202
}, - {
- "id": 8013,
- "name": "Special targeted bonus",
- "description": "Targeted campaign offering 50 extra points.",
- "category": {
- "id": 3,
- "name": "Targeted",
- "priority": 3
}, - "active": true,
- "available_from": "2025-10-01",
- "available_to": "2025-10-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "currency": "EUR",
- "when": "after_create_activity",
- "select_customers": "targeted",
- "customer_registration_countries": [
- "ES"
], - "achievement_definitions": [ ],
- "rule_conditions": "{\"conditions\":{\"and\":[{\"field\":\"total\",\"operator\":\"gte\",\"value\":100,\"key\":\"cart.total\"}]}}\n",
- "rule_application": "{\"application\":{\"and\":[]}}\n",
- "rule_effects": "{\"key\":\"direct_value\",\"type\":\"direct_value\",\"value\":50,\"distribution\":\"individual_items\"}\n",
- "chances_to_accrue": "always",
- "chances_to_accrue_limit": 0,
- "budget_value": 20000,
- "budget_period": "num_month",
- "maximum_discount_transaction": 0,
- "activation_period_type": "relative",
- "activation_delay": 0,
- "activation_delay_unit": "days",
- "expiration_period_type": "relative",
- "availability_duration": 30,
- "availability_duration_unit": "days",
- "stackability_properties": "stackability",
- "priority": 3,
- "transferable": false,
- "partner_id": 303,
- "coupon_required": true,
- "coupon_info": {
- "coupon_id": 456,
- "static_code": "POINTS50",
- "coupon_name": "Special targeted bonus",
- "external_id": "EXT-8013",
- "key": "VOUCHER8013",
- "voucher_info": {
- "voucher_id": 987,
- "voucher_code": "POINTS50",
- "available_redemptions": 1,
- "max_redemptions": 1,
- "selected": true,
- "status": "pending",
- "available_from": "2025-10-01T00:00:00Z",
- "available_to": "2025-10-31T23:59:59Z",
- "print_from": "2025-10-01T00:00:00Z",
- "print_to": "2025-10-31T23:59:59Z",
- "priority": 3,
- "printable": true
}
}
}
], - "next_token_starts_after": "8013"
}Updates a points campaign.
Tier 3 (Low) — See rate limit table
| value required | integer <int64> Id of the campaign to be updated |
object (UpdateANewCampaignRequestRuleParams) | |
object (UpdateANewCampaignRequestCouponParams) |
{- "rule_params": {
- "name": "25 % discount on selected category",
- "when": "after_create_activity",
- "loyalty_rule_category_id": 1,
- "description": "Discount for new customers.",
- "available_from": "2025-06-01",
- "available_to": "2025-12-31",
- "active": true,
- "currency": "EUR",
- "recurrence_type": "daily",
- "recurrence_days": false,
- "activation_period_type": "relative",
- "activation_fixed_option_selected": "at_the_end_of_the_calendar_month",
- "activation_date": "2024-08-15",
- "activation_delay": 0,
- "activation_delay_unit": "days",
- "expiration_period_type": "relative",
- "fixed_option_selected": "at_the_end_of_the_calendar_month",
- "availability_duration": 30,
- "availability_duration_unit": "days",
- "availability_duration_natural": false,
- "transferable": false,
- "partner_id": 123,
- "customer_registration_countries": [
- "string"
], - "once": "num_month",
- "once_limit": 1,
- "chance_to_accrue_limit": 1000,
- "chance_to_accrue_period": "num_month",
- "budget_period": "num_month",
- "budget_value": 100000,
- "maximum_budget_transaction": 500000,
- "rule_conditions": "{\"conditions\": {\"and\": [{\"key\": \"country\", \"field\": \"country\", \"values\": [\"ES\"], \"operator\": \"in\"}, {\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 2, \"operator\": \"gte\"}], \"array_field\": \"lines\"}]}}",
- "rule_effects": "{\"key\": \"percentage\", \"type\": \"percentage\", \"value\": 25, \"distribution\": \"individual_items\" }",
- "rule_application": "{\"conditions\": {\"and\": [{\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 1, \"operator\": \"eq\"}], \"array_field\": \"lines\"}]}}",
- "stackability_properties": "stackability",
- "priority": 1,
- "custom_entity_definition_id": 100
}, - "coupon_params": {
- "name": "Targeted Customer Discount Coupon",
- "active": true,
- "static_code": "{{rand_static_code}}",
- "print_from": "2024-03-01",
- "print_to": "2024-09-30",
- "key": "UNIQUEKEY123",
- "priority": 1,
- "available_days": 90,
- "available_delay_days": 0,
- "print_days": 90,
- "print_delay_days": 0,
- "printable": true,
- "external_id": "POS_COUPON_XYZ",
- "auto_select": true,
- "available_from": "2024-03-01",
- "available_to": "2025-19-30"
}
}{- "status": "success"
}Tier 3 (Low) — See rate limit table
| value required | integer <int64> Example: 1234 The value which you want to search by. This value can be related to the campaign id, the voucher code, the voucher id, the static code of the coupon or the campaign history id. |
| search_by | string Example: search_by=campaign_history_id The field by which the search will be performed.
|
{- "id": 1001,
- "name": "10 extra points on selected category",
- "description": "string",
- "category": {
- "id": 1,
- "name": "Baseline",
- "priority": 1
}, - "active": true,
- "available_from": "2025-06-01",
- "available_to": "2025-12-31",
- "recurrence_type": "daily",
- "recurrence_days": [ ],
- "currency": "EUR",
- "coupon_required": false,
- "when": "after_create_activity",
- "select_customers": "loyalty",
- "customer_registration_countries": [
- "string"
], - "achievement_definitions": [
- {
- "id": 132,
- "level": 2,
- "name": "Silver",
- "tier_id": 122,
- "tier_name": "Total expenditure"
}
], - "rule_conditions": "{\"conditions\": {\"and\": [{\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 1, \"operator\": \"eq\"}], \"array_field\": \"lines\"}]}}",
- "rule_application": "{\"application\": {\"and\": [{\"key\": \"cart_product_id\", \"field\": \"product_id\", \"bundle\": 1, \"values\": [5], \"grouped\": true, \"operator\": \"in\", \"conditions\": [{\"field\": \"quantity\", \"value\": 1, \"operator\": \"eq\"}], \"array_field\": \"lines\"}]}}",
- "rule_effects": "{\"key\": \"percentage\", \"type\": \"percentage\", \"value\": 25, \"distribution\": \"individual_items\" }",
- "once": "num_month",
- "once_limit": 1,
- "chances_to_accrue_period": "num_month",
- "chances_to_accrue_limit": 1,
- "budget_value": 100000,
- "budget_period": "num_month",
- "maximum_discount_transaction": 50,
- "activation_period_type": "relative",
- "activation_delay": 0,
- "activation_delay_unit": "days",
- "activation_fixed_option_selected": "at_the_beginning_of_the_calendar_month",
- "activation_date": "2025-12-31",
- "expiration_period_type": "relative",
- "availability_duration": 12,
- "availability_duration_unit": "days",
- "fixed_option_selected": "at_the_end_of_the_calendar_year",
- "expiration_date": "2025-12-31",
- "stackability_properties": "stackability",
- "priority": 1,
- "custom_entity_definition_id": 100,
- "transferable": false,
- "partner_id": 123,
- "coupon_info": {
- "coupon_id": 123,
- "static_code": "SALE50OFF",
- "coupon_name": " Discount meat 50%",
- "external_id": "EXT-456",
- "key": "VOUCHER123",
- "voucher_info": {
- "voucher_id": 789,
- "voucher_code": "SALE50OFF",
- "available_redemptions": 10,
- "max_redemptions": 100,
- "selected": true,
- "status": "pending",
- "available_from": "2024-01-01T00:00:00Z",
- "available_to": "2024-12-31T23:59:59Z",
- "print_from": "2024-01-01T00:00:00Z",
- "print_to": "2024-12-31T23:59:59Z",
- "priority": 1,
- "printable": true
}
}
}/scores/transactions is also available as a LEGACY version of this API.
In this method (score/transactions) we show all the operations that involve points. If a customer wins points, this will be reflected as a score transaction with a positive amount and if the customer spends points this will reflected as a score transaction with negative amount. Important. This endpoint returns historical information. Fields like names of rewards, rules, triggers, etc. will have the value at the moment of the transaction, which could be different than the current ones if there had been any update.
Internationalization might be used in order to return information in the expected language'
Tier 3 (Low) — See rate limit table
| include | string Example: include=historical Options:
|
| customer_id | integer <int64> Example: customer_id=267 Mutually exclusive with |
| customer_code | string Example: customer_code=a1b2c3d4 Mutually exclusive with |
| associate_id | integer <int64> Example: associate_id=5678 Mutually exclusive with |
| starting_after | string Example: starting_after=11 Pagination token in order to have the next batch of elements. |
| created_at_gt | string Example: created_at_gt=2006-12-31 If specified, it will return the transactions created after this date. The format must be ISO 8601 |
| origin_type | string Example: origin_type=activation Specify from what kind of transaction you'd like to retrieve the scoring information. Options:
|
{- "data": [
- {
- "id": 123119,
- "type": "activity",
- "created_at": "2017-12-12T13:45:22Z",
- "amount": 64,
- "pending_amount": 0,
- "location_id": 334343,
- "customer_id": 2323,
- "origin_info": {
- "activity": {
- "id": 5873748,
- "currency": "EUR",
- "total": 192.67,
- "creation_date": "2023-07-10T18:14:37Z",
- "location_id": 334343,
- "customer_id": 2323,
- "customer": {
- "id": 2323,
- "score": 2621,
- "score_as_money": 0,
- "score_available": 2621,
- "score_available_as_money": 0,
- "score_to_reach_cashback": 0,
- "money_to_spend_to_reach_cashback": 0,
- "score_threshold_cashback": 0,
- "score_threshold_cashback_as_money": 0,
- "money_threshold_cashback": 0,
- "fraudulent": false
}, - "lines": [
- {
- "order": 1,
- "total": 192.67,
- "quantity": 1,
- "product_code": "22SARL01200085",
- "original_total"": 192.67
}
], - "scores": [
- {
- "score": 64,
- "line_order": 1,
- "loyalty_score_id": 555253287,
- "available_from": "2025-07-10",
- "available_to": "2026-07-10"
}, - {
- "score": 64,
- "line_order": 1,
- "loyalty_score_id": 555253287,
- "available_from": "2025-07-10",
- "available_to": "2026-07-10"
}
], - "score": 128,
- "score_as_money": 1.28,
- "score_used": 0,
- "score_used_as_money": 0,
- "score_returned_to_customer": 0,
- "score_returned_to_customer_as_money": 0,
- "score_returned_from_customer": 0,
- "score_returned_from_customer_as_money": 0,
- "coupons_desired": [
- "all"
], - "total_discount_voucher_applied": 3,
- "total_discount_promotion_applied": 14,
- "total_discount_applied": 17,
- "effects": [
- {
- "rule_id": 555253267,
- "line": "1,",
- "rule_name": "Massive coupon discount 10% per line",
- "type": "discount",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "value": 1000,
- "value_as_money": 1000,
- "select_customers": "all_customers,",
- "coupon_info": {
- "coupon_id"": 100004275,
- "coupon_name": "Massive coupon discount 10% per line",
- "static_code": "PROMO10"
}
}, - {
- "rule_id": 555253287,
- "line": "1,",
- "rule_name": "Base rule",
- "type": "points",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "value": 128,
- "value_as_money": 1.28,
- "select_customers": "loyalty",
- "available_from": "2025-07-10",
- "available_to": "2026-07-10"
}
]
}
}, - "scores": [
- {
- "loyalty_score_name": "Base rule",
- "loyalty_score_id": 555253287,
- "score": 128,
- "available_from": "2025-07-10",
- "available_to": "2026-07-10"
}
]
}, - {
- "id": 1235,
- "type": "transfer",
- "created_at": "2021-12-12T13:45:22Z",
- "amount": 50,
- "pending_amount": 0,
- "customer_id": 333432,
- "origin_info": {
- "comments": "because of pizza",
- "from_customer_id": 333432,
- "to_customer_id": 2
}
}, - {
- "id": 12334,
- "type": "reward",
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "created_at": "2020-12-12T13:45:22Z",
- "amount": -500,
- "pending_amount": 0,
- "origin_info": {
- "reward": {
- "id": 1234,
- "name": "Reward for kids",
- "type": "Physical"
}
}, - "location_id": 5000140014
}, - {
- "id": 1232,
- "type": "expiration",
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "location_id": 12,
- "created_at": "2021-12-12T13:45:22Z",
- "amount": -1000,
- "pending_amount": 0,
- "origin_info": { }
}, - {
- "id": 1231,
- "type": "activation",
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "location_id": 12,
- "created_at": "2021-12-12T13:45:22Z",
- "amount": 100,
- "pending_amount": -100,
- "origin_info": { }
}, - {
- "id": 12323,
- "type": "trigger",
- "created_at": "2022-12-12T13:45:22Z",
- "amount": 100,
- "pending_amount": 200,
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "origin_info": {
- "comments": "100 points for your birthday",
- "slug": "birthday"
}, - "scores": [
- {
- "loyalty_score_name": "Birthday Rule",
- "loyalty_score_id": 2,
- "score": 100,
- "available_from": "2022-12-12",
- "available_to": "2023-12-12"
}
]
}, - {
- "id": 12344,
- "type": "trigger",
- "created_at": "2022-12-12T13:45:22Z",
- "amount": 100,
- "pending_amount": 0,
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "origin_info": {
- "comments": "is a trigger",
- "slug": "slug of the trigger"
}, - "location_id": 704090409,
- "scores": [
- {
- "loyalty_score_name": "Basic Rule",
- "loyalty_score_id": 2121,
- "score": 100,
- "available_from": "2022-12-12",
- "available_to": "2023-12-12"
}
]
}, - {
- "id": 12311,
- "type": "subtract",
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "location_id": 12,
- "created_at": "2021-12-12T13:45:22Z",
- "amount": -111,
- "pending_amount": 0,
- "origin_info": {
- "comments": "Adjustment of points"
}
}, - {
- "id": 22111,
- "type": "custom_entity",
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "location_id": null,
- "created_at": "2022-12-12T13:45:22Z",
- "amount": 500,
- "pending_amount": 0,
- "origin_info": {
- "score": 500,
- "slug": "slug of the custom_entity"
}, - "scores": [
- {
- "loyalty_score_name": "Rule/loyalty score name",
- "loyalty_score_id": 2,
- "score": 100,
- "available_from": "2023-12-12",
- "available_to": "2024-12-12"
}, - {
- "loyalty_score_name": "Double points",
- "loyalty_score_id": 4,
- "score": 400,
- "available_from": "2023-12-12",
- "available_to": "2024-02-12"
}
]
}, - {
- "id": 23122,
- "type": "challenge",
- "customer_id": 12321,
- "customer_code": "b7f4-e4c9f549963a",
- "amount": 1000,
- "pending_amount": 0,
- "created_at": "2023-12-12T13:45:22Z",
- "origin_info": {
- "score": 1000,
- "challenge": {
- "id": 1234,
- "name": "Run more this month"
}
}, - "scores": [
- {
- "loyalty_score_name": "Base points for completing a challenge",
- "loyalty_score_id": 22,
- "score": 500,
- "available_from": "2023-12-12",
- "available_to": "2024-12-12"
}, - {
- "loyalty_score_name": "Double points during this week for completing challenge",
- "loyalty_score_id": 41,
- "score": 500,
- "available_from": "2023-12-12",
- "available_to": "2024-01-12"
}
]
}
], - "next_token_starts_after": "234"
}/customers/{value}/scores is also available as a LEGACY version of this API.
Returns information about the scores balance of the customer
Tier 3 (Low) — See rate limit table
| value required | string Example: 1234 Could be an integer or a string.
|
| search_param | string Default: "id" Example: search_param=code The param field used for the customer search. Possible options: "id" and "code" |
{- "score": 100,
- "score_as_money": 0.1,
- "score_available": 80,
- "score_available_as_money": 0.08,
- "score_to_reach_cashback": 900,
- "money_to_spend_to_reach_cashback": 0.9,
- "score_threshold_cashback": 1000,
- "money_threshold_cashback": 1,
- "score_threshold_cashback_as_money": 0.5,
- "currency": "EUR",
- "fraudulent": false
}/customers/{value}/scores_expiring is also available as a LEGACY version of this API.
Returns a list of expiring scores given a customer grouped by date, order by date asc.
Tier 3 (Low) — See rate limit table
| value required | string Example: 1234 Could be an integer or a string.
|
| date | string Example: date=2023-04-01 The param field used for the date. Customer scores can be searched with a maximum of 60 days. If the date is omitted or before the current date, it will be automatically set to the current date + 60 days. |
| search_param | string Default: "id" Example: search_param=code The param field used for the customer search. Possible options: "id", "code", "associate_id" |
{- "data": [
- {
- "score_available": 210,
- "score_available_as_money": 4,
- "currency": "EUR",
- "expiration_date": "2023-05-31T00:00:00Z"
}, - {
- "score_available": 420,
- "score_available_as_money": 8,
- "currency": "EUR",
- "expiration_date": "2023-06-30T00:00:00Z"
}
]
}/scores/subtract is also available as a LEGACY version of this API.
This method allows to subtract points from a customer balance.
Idempotence action allowed
Tier 3 (Low) — See rate limit table
| customer_id | integer <int64> Id of the customer |
| customer_code | string Code of the customer to subtract points from. If |
| amount required | integer <int64> The user can remain in a negative status. The value must be between 1 and 2147483647. |
| comments required | string Comments about the action. |
{- "customer_id": 100005,
- "customer_code": "b7f4-e4c9f549963a",
- "amount": 100,
- "comments": "Subtraction done due to an adjustment of your balance"
}{- "customer": {
- "id": 100005,
- "code": "b7f4-e4c9f549963a",
- "score": 2000,
- "score_available": 1000
}, - "score_used": 100,
- "score": 2000,
- "score_available": 1000
}/scores/activity_redeem is also available as a LEGACY version of this API.
It's important to highlight that the Activity (ticket) must exist first.
There are multiple checks that are necessary when validating a redemption of points, such as:
Idempotence action allowed
Tier 2 (Moderate) — See rate limit table
| activity_id | integer <int64> ID of the activity. |
| activity_code | string Code of the activity. |
| customer_id | integer <int64> ID of the customer. |
| customer_code | string Code of the customer. |
| location_id | integer <int64> ID of the location. |
| location_code | string Code of the location. |
| amount required | integer <int64> The amount of scores to redeem |
{- "activity_id": 12345,
- "customer_id": 1234,
- "location_id": 12,
- "amount": 100
}{- "customer": {
- "id": 8223342,
- "code": "8223a",
- "score": 200,
- "score_available": 100
}, - "score_used": 100,
- "score": 200,
- "score_available": 100
}/scores/transfer is also available as a LEGACY version of this API.
Keep in mind that some points earned in certain policies are not ready for transfers, and that suspended/inactive customers can not transfer to another customers or from another customers. Also, keep in mind that one customer can not transfer more points that the total sum of the customer points. If 'allow_partial=true' parameter is provided then if the customer tries to transfer an amount of points higher than the available amount, then all available points will be transfered.
Tier 3 (Low) — See rate limit table
| score required | integer <int64> Quantity of points to be transfered |
| from_customer_id | integer <int64> Id of the customer transfering the points. |
| to_customer_id | integer <int64> Id of the customer receiving the points. |
| country | string (deprecated) ISO 3166-1 alpha-2 country code (It must be Capitals letters) |
| comments | string Comments about the transfer |
| allow_partial | boolean |
{- "score": 24,
- "from_customer_id": 9876666,
- "to_customer_id": 67788876,
- "comments": "Some comments",
- "allow_partial": true
}{- "from_customer_id": 1150524070032999000,
- "to_customer_id": 790178790032933400,
- "score": 100000,
- "comments": "Some comments",
- "requested_scores": 200000
}Tier 3 (Low) — See rate limit table
| location_id required | integer <int64> Example: location_id=1234 A integer representing a location.
|
{- "cashback": 0.005,
- "currency": "EUR"
}{- "data": [
- {
- "score": 100,
- "country": "ES",
- "money_representation": 12.5,
- "currency": "EUR"
}, - {
- "country": "FR",
- "currency": "EUR",
- "score": 400,
- "money_representation": 10
}
]
}Endpoint to list all the rewards available in different scenarios you may need (check query parameters). For example:
Create a Customer Rewards Catalogue. When filtered by customer, this endpoint returns all the rewards available to the customer based on their country. The can_redeem field in the response indicates whether or not the customer can redeem each reward.
To list all rewards available in a specific country or store.
To list upcoming rewards that are expected to be available soon.
Internationalisation can be used to return the reward name and description in the expected language. For example, if the end customer's preferred language is English, send Accept-Language = "EN" and every multi-language field of the reward output will be in English.
Check out the following links that can help you:
The JSON response schema can be checked below
Tier 2 (Moderate) — See rate limit table
| location_id | integer <int64> Example: location_id=1234 Filter rewards available in certain location. If both |
| location_code | string Example: location_code=abc Filter rewards available in certain location. If both |
| customer_id | integer <int64> Example: customer_id=12345 ID of the customer. Mutually exclusive with |
| customer_code | string Example: customer_code=12345a Code of the customer. Mutually exclusive with What indicates whether or not the customer can redeem each reward is the field called |
| countries | Array of strings Example: countries=ES Countries where the reward is available. Mutually exclusive with |
| status | string Example: status=active Filter rewards according to their status. All rewards by default. Options:
|
| starting_after | string Example: starting_after=100 You will receive this number on every response (on the variable next_token_starts_after) in order to have the next batch of elements. |
| store | string Example: store=registration Used when you need a better personalisation of the rewards catalogue for a particular customer, taking into account the rewards available in a particular store.
For example, if store=registration, the result will include rewards available in the customer's registration store plus all other rewards available in the customer's country.
Makes sense only if Options:
Mutually exclusive with |
| type | string Example: type=donation Type of the reward. Possible types are: 'physical', 'code', 'donation', 'digital', 'downloadable', 'coupon', 'free_delivery', 'voucher', 'wallet' |
| redemption_type | string Example: redemption_type=manual Optional parameter. Add the parameter filter to return either 'manual' rewards (default behaviour, not needed to include it) or use redemption_type = 'loyalty_rule' to return rewards that can only be redeemed by loyalty rule conditions. redemption_type = “loyalty_rule“ filter is mutually exclusive with |
| restricted_by | Array of strings Example: restricted_by=tiers&restricted_by=points If this is sent as part of the request, the response will exclude those rewards that the customer can not redeem based on the parameter. By default the endpoint return everything. Possible options:
More than one option can be sent at the same time. For example you can send restricted_by=tiers&restricted_by=points&restricted_by=stock Makes sense only if |
{- "data": [
- {
- "id": 318,
- "name": "Green umbrella",
- "description": "Exclusive green umbrella",
- "points": 100,
- "flexible_score_allowed": true,
- "is_coupon": false,
- "status": "active",
- "available_from": "2023-07-10",
- "available_to": "2024-17-10",
- "type": "physical",
- "image_file_name": "imagereward.png",
- "extra_money": 2.5,
- "currency": "EUR",
- "countries": [
- "ES",
- "IT",
- "UK"
], - "categories": [
- {
- "id": 3,
- "name": "Promotions",
- "taxonomy_slug": "tags",
- "image_url": null
}, - {
- "id": 4,
- "name": "Top buyers",
- "taxonomy_slug": "customers",
- "image_url": null
}
], - "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
}, - "total_stock": 1000,
- "can_redeem": true,
- "redeem_chances": "num_year",
- "redeem_times": 1,
- "available_stock": 10,
- "validity_duration_number": 60,
- "validity_duration_unit_option": "days",
- "validity_duration_type": "relative",
- "redemptions_quantity": 0,
- "redemption_type": "manual"
}, - {
- "id": 319,
- "name": "Red umbrella",
- "description": "Exclusive red Umbrella",
- "points": 100,
- "flexible_score_allowed": true,
- "available_from": "2023-01-01",
- "available_to": "2023-12-31",
- "status": "active",
- "type": "coupon",
- "image_url": null,
- "countries": [
- "ES",
- "AR",
- "EE"
], - "is_coupon": true,
- "categories": [
- {
- "id": 6,
- "name": "Promotions",
- "taxonomy_slug": "tags",
- "image_url": null
}
], - "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo ",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "product_ids": [
- 5,
- 11
]
}, - "total_stock": 1000,
- "can_redeem": false,
- "missing_redeem_conditions": [
- [
- "Not enough points available to redeem - Missing Points: 60"
]
], - "redeem_chances": "num_total",
- "redeem_times": 5,
- "available_stock": 980,
- "validity_duration_number": 3,
- "validity_duration_unit_option": "days",
- "validity_duration_date": "2023-12-31",
- "validity_duration_type": "fixed",
- "redemptions_quantity": 1,
- "redemption_type": "manual"
}
], - "next_token_starts_after": "319"
}Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 1234 The ID of the reward. |
| customer_id | integer <int64> Example: customer_id=12345 ID of the customer. Mutually exclusive with |
| customer_code | string Example: customer_code=12345a Code of the customer. Mutually exclusive with |
{- "id": 319,
- "name": "Red umbrella",
- "description": "Exclusive red Umbrella",
- "points": 100,
- "flexible_score_allowed": true,
- "available_from": "2023-01-01",
- "available_to": "2025-12-31",
- "status": "active",
- "extra_money": 2.5,
- "currency": "EUR",
- "countries": [
- "ES",
- "UY",
- "AR"
], - "is_coupon": true,
- "categories": [
- {
- "id": 6,
- "name": "Promotions",
- "taxonomy_slug": "tags",
}
], - "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo ",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "product_ids": [
- 5,
- 11
]
}, - "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
}, - "total_stock": 1000,
- "redeem_chances": "num_total",
- "redeem_times": 5,
- "available_stock": 890,
- "validity_duration_number": 60,
- "validity_duration_unit_option": "days",
- "validity_duration_type": "relative",
- "can_redeem": true,
- "redemptions_quantity": 1,
- "redemption_type": "manual"
}This is the endpoint necessary to use when a customer is going to redeem a reward. A reward redemptions means that in order to get a reward, needed points must be subtracted from the total points of the customer.
There are multiple checks that are necessary when validating a redemption, such as:
If all the necessary conditions are not met, an error will be returned.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the reward to redeem |
| location_id required | integer <int64> Id of the location related to the reward redemption. |
| location_code required | string Code of the location related to the reward redemption. |
| customer_id required | integer <int64> ID of the customer, is mutually exclusive to |
| customer_code required | string Code of the customer, is mutually exclusive to |
| associate_id | integer <int64> ID of the associate, is mutually exclusive to |
| score_overwrite | integer <int64> Score value to overwrite the original reward score. If no value, original score needed to redeem the reward will be used and subtracted from the customer balance. |
| process_actions | boolean With a true value and in case that the reward has an associated coupon assigns a voucher to the client. |
| source | string source of the redemption. Possible values are:
|
{- "location_id": 211,
- "location_code": "AAHY79212",
- "customer_id": 8223342,
- "customer_code": "8223a",
- "associate_id": 123,
- "score_overwrite": 200,
- "process_actions": false,
- "source": "api"
}{- "customer": {
- "id": 8223342,
- "code": "8223a",
- "score": 100,
- "score_available": 60
}, - "score_used": 200,
- "score": 100,
- "score_available": 60,
- "redemption_id": 12032,
- "code": "8234ABR"
}/redemptions is also available as a LEGACY version of this API.
It is Ordered from the newest to the oldest redemption.
If customer_code and customer_id are present, only customer_id is going to be used.
If location_code and location_id are present, only location_id is going to be used
Tier 3 (Low) — See rate limit table
| location_id | integer <int64> Example: location_id=267 Specify the location for which you'd like to retrieve the redemptions data. |
| location_code | string Example: location_code=43431asd-g87 Specify the location for which you'd like to retrieve the redemptions data. |
| customer_id | integer <int64> Example: customer_id=23211 Specify the customer for which you'd like to retrieve the redemptions data. |
| customer_code | string Example: customer_code=267a2133-2232 Specify the customer for which you'd like to retrieve the redemptions data. |
| status | string Example: status=available Specify the status of the redemptions you want to retrieve. Options:
|
| starting_after | string Example: starting_after=124 You will receive this number on every response ( on the variable next_token_starts_after ) in order to have the next batch of elements |
{- "data": [
- {
- "id": 1456,
- "created_at": "2022-12-13 13:00:00",
- "customer_id": 1232211,
- "customer_code": "b7f4-e4c9f549963a",
- "location_id": 289,
- "reward_id": 123,
- "score_expense": 150,
- "code": "9034ABD",
- "status": "available",
- "source": "api"
}, - {
- "id": 789,
- "created_at": "2018-12-20 20:00:00",
- "customer_id": 1232211,
- "customer_code": "b7f4-e4c9f549963a",
- "location_id": 345,
- "reward_id": 124,
- "score_expense": 200,
- "origin_type": "challenge",
- "origin_id": "1121",
- "loyalty_rule_id": 1,
- "status": "available",
- "source": "challenge"
}
], - "next_token_starts_after": "1"
}/redemptions/{id}/rollback is also available as a LEGACY version of this API.
Important: The reversal should occur within a few seconds after the redemption to ensure point integrity, preventing conflicts from potential returns, additional redemptions, or other transactions happening in the meantime.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the redemption to revert |
| status_detail required | string Information about the reason of the redemption rollback. Max length: 255 characters |
{- "status_detail": "The item is out of stock"
}{- "redemption_id": 2324321,
- "status": "reverted",
- "status_detail": "The item is out of stock"
}Get a list of challenges
Tier 3 (Low) — See rate limit table
| country | string Example: country=ES Country where the challenge is available. |
| type | string Example: type=sports Type of challenge for filtering. |
| starting_after | string Example: starting_after=true@11 You will receive this number on every response ( on the variable next_token_starts_after ) in order to have the next batch of elements |
{- "data": [
- {
- "id": 11,
- "name": "Run more this week",
- "description": "Get extra points for running more this week!",
- "status": "active",
- "customer_attribute_id": 2,
- "countries": [
- "ES",
- "IT",
- "UK"
], - "available_from": "2024-01-01",
- "available_to": "2024-12-31",
- "display_from": "2023-12-15",
- "display_to": "2025-01-15",
- "challenge_type": "Non-sports",
- "image_file_name": "imagechallenge.png",
- "open_to_all": false,
- "max_enrollments": 1700,
- "current_enrollments": 220,
- "attribute_data_period_type": "current_week",
- "attribute_period_from": "2024-02-26",
- "attribute_period_to": "2024-03-03",
- "structure": [
- {
- "level": 1,
- "name": "Run 60 kms",
- "threshold": 60
}
]
}, - {
- "id": 12,
- "name": "Spend more this week and get extra points",
- "description": "If you spend more than 100 euros this week earn 1000 extra points",
- "status": "active",
- "customer_attribute_id": 3,
- "countries": [
- "ES"
], - "available_from": "2023-07-10",
- "available_to": "2024-10-17",
- "display_from": "2023-07-01",
- "display_to": "2024-11-01",
- "challenge_type": "Sports",
- "image_file_name": "imagechallenge.png",
- "open_to_all": true,
- "attribute_data_period_type": "relative_months",
- "attribute_relative_value": 1,
- "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
}, - "structure": [
- {
- "level": 1,
- "name": "Spend more than 100 euros",
- "threshold": 100
}
]
}
], - "next_token_starts_after": "true@101"
}Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 1234 The ID of the challenge. |
{- "id": 11,
- "name": "Run more this week",
- "description": "Get extra points for running more this week!",
- "status": "active",
- "customer_attribute_id": 2,
- "countries": [
- "ES",
- "IT",
- "UK"
], - "available_from": "2023-07-10",
- "available_to": "2024-12-31",
- "display_from": "2023-07-01",
- "display_to": "2025-01-15",
- "challenge_type": "Sports",
- "image_file_name": "imagechallenge.png",
- "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
}, - "open_to_all": false,
- "max_enrollments": 1000,
- "current_enrollments": 190,
- "attribute_data_period_type": "current_week",
- "attribute_period_from": "2024-02-26",
- "attribute_period_to": "2024-03-03",
- "structure": [
- {
- "level": 1,
- "name": "Run 60 kms",
- "threshold": 60
}
]
}Returns the entire challenge catalogue available to the customer, taking into account all challenges that the customer could participate in and all challenges that the customer is already participating in, including the current status or progress of these challenges.
Only challenges with status = active, available_to >= current date, and available in the customer's country will be returned. Enrolled challenges will be returned first in the list order.
Check out the following links that can help you:
Tier 2 (Moderate) — See rate limit table
| value required | string Example: 1234 Could be an integer or a string.
|
| search_param | string Default: "id" Example: search_param=code The param field used for the customer search. Possible options: "id" and "code" |
| only_enrolled | boolean Example: only_enrolled=true
|
| use_display_dates | boolean Example: use_display_dates=true
|
| type | string Example: type=sports Type of challenge for filtering. |
| starting_after | string Example: starting_after=true@11 You will receive this number on every response ( on the variable next_token_starts_after ) in order to have the next batch of elements |
{- "data": [
- {
- "id": 11,
- "name": "Run more this month",
- "description": "Get extra points for running more this month!",
- "attribute_value": 70,
- "attribute_id": 10,
- "last_execution_time": "2023-11-23T14:33:00Z",
- "countries": [
- "ES"
], - "expires_at": "2023-11-25T14:33:00Z",
- "available_from": "2023-07-10",
- "available_to": "2024-12-31",
- "display_from": "2023-07-01",
- "display_to": "2025-01-15",
- "challenge_type": "Sports",
- "image_file_name": "imagechallenge.png",
- "open_to_all": false,
- "max_enrollments": 1700,
- "current_enrollments": 220,
- "enrolled": true,
- "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
- "image_url": null
}, - "attribute_data_period_type": "current_week",
- "attribute_period_from": "2024-02-26",
- "attribute_period_to": "2024-03-03",
- "structure": [
- {
- "level": 1,
- "name": "Run 60 kms",
- "threshold": 60,
- "reached": true,
- "won_at": "2023-11-23T14:33:00Z",
- "prizes": [
- {
- "type": "points",
- "rule_id": 12345,
- "rule_name": "100 points extra",
- "effects": "{\"type\": \"direct_value\", \"value\": 100, distribution\": \"total\"}"
}, - {
- "type": "coupon",
- "coupon_info": {
- "coupon_id": 4322211,
- "coupon_name": "10% off on beverages",
- "coupon_description": "Get 10% off on all beverages for the next 7 days"
}
}, - {
- "type": "discount",
- "rule_id": 54321,
- "rule_name": "15% discount on next purchase",
- "effects": "{\"type\": \"percentage\", \"value\": 15, distribution\": \"total\"}"
}
]
}
], - "awards": [
- {
- "amount": 1000,
- "type": "score"
}, - {
- "reward_id": 12,
- "reward_name": "Free Netflix suscription for 3 months",
- "loyalty_score_id": 19099,
- "type": "reward"
}, - {
- "reward_id": 111,
- "reward_name": "25% discount gym",
- "loyalty_score_id": 12222,
- "type": "reward"
}
]
}, - {
- "id": 12,
- "name": "Spend more this week and get extra points",
- "description": "If you spend more than 100 euros this week earn 1000 extra points",
- "attribute_value": 70,
- "attribute_id": 12,
- "last_execution_time": "2023-11-21T15:33:00Z",
- "open_to_all": false,
- "enrolled": true,
- "countries": [
- "ES"
], - "to_reach_next_level_value": 30,
- "to_reach_next_level_name": "Spend more than 100 euros",
- "attribute_data_period_type": "relative_months",
- "attribute_relative_value": 1,
- "structure": [
- {
- "level": 1,
- "name": "Spend more than 100 euros",
- "threshold": 100,
- "reached": false
}
], - "awards": [
- {
- "amount": 100,
- "type": "score"
}
]
}
], - "next_token_starts_after": "false@101"
}Returns the challenge related to the customer, including the current status or progress of this challenge.
Only challenge with status = active, available_to >= current date, and available in the customer's country will be returned.
Tier 2 (Moderate) — See rate limit table
| value required | string Example: 1234 Could be an integer or a string.
|
| id required | integer <int64> Example: 1234 The ID of the achievement. |
| search_param | string Default: "id" Example: search_param=code The param field used for the customer search. Possible options: "id" and "code" |
{- "data": [
- {
- "id": 11,
- "name": "Run more this month",
- "description": "Get extra points for running more this month!",
- "attribute_value": 70,
- "attribute_id": 10,
- "last_execution_time": "2023-11-23T14:33:00Z",
- "countries": [
- "ES"
], - "expires_at": "2023-11-25T14:33:00Z",
- "available_from": "2023-07-10",
- "available_to": "2024-12-31",
- "display_from": "2023-07-01",
- "display_to": "2025-01-15",
- "challenge_type": "Sports",
- "image_file_name": "imagechallenge.png",
- "open_to_all": false,
- "max_enrollments": 1700,
- "current_enrollments": 220,
- "enrolled": true,
- "partner": {
- "id": 1,
- "name": "Airlines LG",
- "description": "partnership with airline",
- "image_url": null
}, - "attribute_data_period_type": "current_week",
- "attribute_period_from": "2024-02-26",
- "attribute_period_to": "2024-03-03",
- "structure": [
- {
- "level": 1,
- "name": "Run 60 kms",
- "threshold": 60,
- "reached": true,
- "won_at": "2023-11-23T14:33:00Z",
- "prizes": [
- {
- "type": "points",
- "rule_id": 12345,
- "rule_name": "100 points extra",
- "effects": "{\"type\": \"direct_value\", \"value\": 100, distribution\": \"total\"}"
}, - {
- "type": "coupon",
- "coupon_info": {
- "coupon_id": 4322211,
- "coupon_name": "10% off on beverages",
- "coupon_description": "Get 10% off on all beverages for the next 7 days"
}
}, - {
- "type": "discount",
- "rule_id": 54321,
- "rule_name": "15% discount on next purchase",
- "effects": "{\"type\": \"percentage\", \"value\": 15, distribution\": \"total\"}"
}
]
}
], - "awards": [
- {
- "amount": 1000,
- "type": "score"
}, - {
- "reward_id": 12,
- "reward_name": "Free Netflix suscription for 3 months",
- "loyalty_score_id": 19099,
- "type": "reward"
}, - {
- "reward_id": 111,
- "reward_name": "25% discount gym",
- "loyalty_score_id": 12222,
- "type": "reward"
}
]
}
]
}This is the endpoint necessary to use when a customer is going to enroll to a challenge in order to participate in it. There are multiple checks that are necessary when validating a enrollment, such as:
If all the necessary conditions are not met, an error will be returned.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the challenge to enroll |
| customer_id required | integer <int64> ID of the customer, is mutually exclusive to |
| customer_code required | string Code of the customer, is mutually exclusive to |
| enrolled_at | string Datetime of enrollment. UTC format yyyy-mm-ddThh:mm:ssZ |
{- "customer_id": 8223,
- "customer_code": "8223agte",
- "enrolled_at": "2024-02-23T12:00:00Z"
}{- "id": 1211,
- "challenge_id": 35,
- "challenge_name": "Run more this month",
- "customer_id": 30,
- "enrolled_at": "2024-02-23T12:00:00Z",
- "structure": [
- {
- "level": 1,
- "name": "Run 60 kms",
- "threshold": 60
}
]
}A coupon is defining a discount that is applicable when a customer presents a voucher ( a child from this coupon ). A very important element of a coupon is its "key", a key is the element that your POS system will understand in order to apply certain discount.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> ID of the coupon in form of an integer |
| name required | string Name |
| description | string Description |
| available_from | string Available from Date. |
| available_to | string Available to Date. |
| key required | string This key is the code that your POS system will understand in order to apply a discount in a activity, we recomend this to be the same as the ID, but you can do as you please. Understand that this key is the one that will exist in the response when validating a VOUCHER related to this coupon. |
| created_at | string DateTime of the creation of the coupon. |
| location_ids | Array of integers <int64> [ items <int64 > ] Array of location ids that the coupon belongs to. Do not specify this param if the coupon is available to ALL locations, only send this param if the coupon is available only in certain locations. |
| priority | integer <int64> Order in which the coupon will be printed. |
| external_id | string External ID |
| static_code | string Static code. |
| active | boolean Is the coupon active? |
{- "id": 1234,
- "name": "Coupon discount 50%",
- "description": "Discount on meat",
- "available_from": "2016-01-01",
- "available_to": "2016-02-01",
- "key": "1234",
- "created_at": "2016-01-01T12:00:00Z",
- "location_ids": [
- 1,
- 2
], - "priority": 1,
- "external_id": "1"
}{- "status": "success"
}A coupon is defining a discount that is applicable when a customer presents a voucher ( a child from this coupon ). A very important element of a coupon is its "key", a key is the element that your POS system will understand in order to apply certain discount.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the coupon |
| name | string Name |
| description | string Description |
| available_from | string Available from Date. |
| available_to | string Available to Date. |
| created_at | string Created at Date. |
| key | string This key is the code that your POS system will understand in order to apply a discount in a ticket, we recomend this to be the same as the ID, but you can do as you please. Understand that this key is the one that will exist in the response when validating a VOUCHER related to this coupon. |
| priority | integer <int64> Order in which the coupon will be printed. |
| external_id | string External ID Used by PoS/TPV to relate coupons on her setup |
| static_code | string Static code. |
| active | boolean Is the coupon active? |
{- "name": "Coupon discount 50%",
- "description": "I'm a coupon",
- "key": "1234",
- "available_from": "2016-01-01",
- "available_to": "2016-02-01",
- "created_at": "2015-12-01",
- "priority": 1,
- "external_id": "1"
}{- "status": "success"
}A coupon is defining a discount that is applicable when a customer presents a voucher ( a child from this coupon ). A very important element of a coupon is its "key", a key is the element that your POS system will understand in order to apply certain discount.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the coupon |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Get an array of all vouchers belonging to the customer according to the filters. When set by parameter "location_info=true" the fields "location_ids" and "feature_locations" fields be returned.
When a voucher has a product allocation related to an internal category, by default the POS does receive the product IDs (product_ids) belonging to that internal category. For the POS to also receive the external product category, it must be configured in the company configuration. Additionally, 'purchased_product_ids' will provide information about the purchased products in relation to a specific campaign.
Please be aware that the list is paginated
Tier 2 (Moderate) — See rate limit table
| id required | string |
| location_id | string |
| location_code | string Location code. Both location_id and location_code can be used, but if both are sent, location_id has priority. |
| status | string Specify the voucher status to filter. The possible values are:
|
| location_info | boolean Specify the inclusion of the "location_ids" and "feature_locations" fields:
|
| redemption_dates | boolean Show the redemption dates of the vouchers. When this flag is activated redeemed vouchers will be shown as well. The possible values are:
|
| Content-Type required | string Value: "application/json" Example: application/json |
/customers/12345/vouchers?location_id=6789&location_code=LOC-ABC&status=available&location_info=true&redemption_dates=true
{- "data": [
- {
- "id": 1,
- "key": "discountkey",
- "available_from": "2016-01-01",
- "available_to": "2016-01-31",
- "description": "Description",
- "code": "1234567891234",
- "available_redemptions": 1,
- "frozen_redemptions": 1,
- "name": "Name",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "priority": 1,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "status": "active",
- "has_points": true,
- "cumulative": true,
- "coupon_type": "3x2",
- "affectation": "activity",
- "applies_to": "itself",
- "selected": false,
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "purchased_features": [
- {
- "id": 4567,
- "taxonomy_slug": "b_slug"
}
], - "product_ids": [
- "5",
- "11"
], - "purchased_product_ids": [
- "11",
- "221"
], - "purchased_affectation": "product",
- "location_ids": [
- 20,
- 21
], - "feature_locations": [
- {
- "name": "feature name",
- "taxonomy_slug": "taxonomy1",
- "id": 101
}, - {
- "name": "feature name 2",
- "taxonomy_slug": "taxonomy2",
- "id": 202
}
], - "redemption_dates": [
- "2016-01-01",
- "2016-01-02"
], - "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash",
- "partner_description": "Partner description 5",
- "partner_id": 5,
- "partner_name": "Partner 5",
- "coupon_id": 123
}
], - "next_token_starts_after": "token"
}Get an array of available selected vouchers belonging to the customer in the location. If the optional date parameter is provided, then the endpoint returns a list of vouchers available for the specified date. When set by parameter "location_info=true" the fields "location_ids" and "feature_locations" fields be returned.
When a voucher has a product allocation related to an internal category, by default the POS does receive the product IDs (product_ids) belonging to that internal category. For the POS to also receive the external product category, it must be configured in the company configuration. Additionally, 'purchased_product_ids' will provide information about the purchased products in relation to a specific campaign.
Tier 2 (Moderate) — See rate limit table
| id required | string |
| location_id required | string location_id OR location_code is required. |
| location_code required | string location_id OR location_code is required. |
| location_info | boolean Specify the inclusion of the "location_ids" and "feature_locations" fields:
|
| redemption_dates | boolean Show the redemption dates of the vouchers. When this flag is activated redeemed vouchers will be shown as well. The possible values are:
|
| Content-Type required | string Value: "application/json" Example: application/json |
/customers/12345/vouchers/selected?location_id=6789&location_code=LOC-ABC&location_info=true&redemption_dates=true
{- "data": [
- {
- "id": 1,
- "key": "discountkey",
- "available_from": "2016-01-01",
- "available_to": "2016-01-31",
- "description": "Description",
- "code": "1234567891234",
- "available_redemptions": 1,
- "frozen_redemptions": 1,
- "name": "Name",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "priority": 1,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "status": "active",
- "has_points": true,
- "cumulative": true,
- "coupon_type": "3x2",
- "affectation": "activity",
- "applies_to": "itself",
- "selected": false,
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "purchased_features": [
- {
- "id": 4567,
- "taxonomy_slug": "b_slug"
}
], - "product_ids": [
- "5",
- "11"
], - "purchased_product_ids": [
- "11",
- "221"
], - "purchased_affectation": "product",
- "location_ids": [
- 20,
- 21
], - "feature_locations": [
- {
- "name": "feature name",
- "taxonomy_slug": "taxonomy1",
- "id": 101
}, - {
- "name": "feature name 2",
- "taxonomy_slug": "taxonomy2",
- "id": 202
}
], - "redemption_dates": [
- "2016-01-01",
- "2016-01-02"
], - "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash",
- "partner_description": "Partner description 5",
- "partner_id": 5,
- "partner_name": "Partner 5",
- "coupon_id": 123
}
], - "next_token_starts_after": "token"
}Vouchers represent the association between a coupon and a customer.
When a voucher has a product allocation related to an internal category, by default the POS does receive the product IDs (product_ids) belonging to that internal category. For the POS to also receive the external product category, it must be configured in the company configuration. Additionally, 'purchased_product_ids' will provide information about the purchased products in relation to a specific campaign.
In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.
Tier 3 (Low) — See rate limit table
| code required | string |
{- "id": 1,
- "key": "discountkey",
- "available_from": "2016-01-01",
- "available_to": "2016-01-31",
- "description": "Description",
- "code": "1234567891234",
- "available_redemptions": 1,
- "frozen_redemptions": 1,
- "name": "Name",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "priority": 1,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "status": "active",
- "has_points": true,
- "cumulative": true,
- "coupon_type": "3x2",
- "affectation": "activity",
- "applies_to": "itself",
- "selected": false,
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "purchased_features": [
- {
- "id": 4567,
- "taxonomy_slug": "b_slug"
}
], - "product_ids": [
- "5",
- "11"
], - "excluded_product_ids": [
- "3",
- "15"
], - "excluded_feature_pks": [
- "21",
- "30"
], - "purchased_product_ids": [
- "10",
- "220"
], - "purchased_affectation": "product",
- "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash",
- "partner_description": "Partner description 5",
- "partner_id": 5,
- "partner_name": "Partner 5",
- "coupon_id": 123
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.
When a voucher has a product allocation related to an internal category, by default the POS does receive the product IDs (product_ids) belonging to that internal category. For the POS to also receive the external product category, it must be configured in the company configuration. Additionally, 'purchased_product_ids' will provide information about the purchased products in relation to a specific campaign.
This endpoint checks if a certain voucher is valid for certain customer and location. When is valid, it returns the key is the code that your POS system will understand and will use in order to apply a particular discount. Is a number that was previously defined in your system outside Loyal Guru.
voucher_code on the /vouchers/redeem endpoint ( and if you want to exclude several vouchers from printing you will need it too on the vouchers/print endpoint )Tier 2 (Moderate) — See rate limit table
| code required | string Example: 27454637261254 Code of the voucher. |
| customer_id required | integer <int64> Example: id of the customer |
| location_id required | integer <int64> Example: id of the location |
{- "id": 1,
- "key": "discountkey",
- "available_from": "2016-01-01",
- "available_to": "2016-01-31",
- "description": "Description",
- "code": "1234567891234",
- "available_redemptions": 1,
- "frozen_redemptions": 1,
- "name": "Name",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "priority": 1,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "status": "active",
- "has_points": true,
- "cumulative": true,
- "coupon_type": "3x2",
- "affectation": "activity",
- "applies_to": "itself",
- "selected": false,
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "purchased_features": [
- {
- "id": 4567,
- "taxonomy_slug": "b_slug"
}
], - "product_ids": [
- "5",
- "11"
], - "excluded_product_ids": [
- "3",
- "15"
], - "excluded_feature_pks": [
- {
- "id": "21",
- "taxonomy_slug": "test_slug_1"
}, - {
- "id": "30",
- "taxonomy_slug": "test_slug_2"
}
], - "purchased_product_ids": [
- "1",
- "22"
], - "purchased_affectation": "product",
- "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash",
- "coupon_id": 123
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.Send some vouchers in order to mark them as used, so they can not be used anymore. Notice: You can avoid this request if your are using the "create activity" endpoint passing the used vouchers as parameters.
Tier 3 (Low) — See rate limit table
| activity_id | integer <int64> ID of the activity in form of an integer. Mutually exclusive with |
| activity_code | string Code of the activity associated. Mutually exclusive with |
required | Array of objects (Voucher) Array of the vouchers applied on this activity. This vouchers will be redeemed on the system so they're not used again. If the vouchers is used in more than one line use line_order or/and product_id to indicate in which one. |
{- "activity_id": 1234,
- "vouchers": [
- {
- "code": "1234",
- "discount": 1267,
- "line_order": 1,
- "product_id": 2
}
]
}{- "status": "success"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration. This endpoint allows you to rollback vouchers that have been redeemed. When a voucher is rolled back, it returns to its previous state and the Available Redemptions count is increased by 1. You can identify vouchers in three ways: - By id: Provide the voucher ID - By code and customer_id: Provide both the voucher code and customer ID
Tier 3 (Low) — See rate limit table
required | Array of Rollback by ID (object) or Rollback by code (object) non-empty Array of vouchers to rollback. Each voucher can be identified by id, or by code with customer_id (both required). When a voucher is rolled back, it returns to its previous state and the Available Redemptions count is increased by 1. | ||
Array (non-empty) One of
| |||
Rollback vouchers using their IDs
{- "vouchers": [
- {
- "id": 538294
}, - {
- "id": 538295
}
]
}{- "status": "success"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.Get an array of vouchers ( or messages ) in order to print them on your POS activity. Please be aware that the list of vouchers will be sorted regarding the following elements:
Campaign priority (if any): This is because some type of campaigns have priority over others.
Voucher priority (if any): This is precisely to control which vouchers should be printed first in case a given campaign has several.
Voucher availability (always): The list of vouchers will start with the first that will expire on top.
By default this request marks the vouchers as "printed" so won't get the same vouchers again in the next call ( for testing purposes: you can avoid this behaviour with a debug param ). All vouchers printed are valid an ready to redeem.
When a voucher has a product allocation related to an internal category, by default the POS does receive the product IDs (product_ids) belonging to that internal category. For the POS to also receive the external product category, it must be configured in the company configuration. Additionally, 'purchased_product_ids' will provide information about the purchased products in relation to a specific campaign.
Example of how you should print vouchers: link
Tier 3 (Low) — See rate limit table
| customer_id required | integer <int64> ID of the customer |
| size | integer <int64> Number of vouchers minimum: 1 maximum: 10 |
| exclude_codes | Array of strings List of voucher_codes, remember to use the voucher_code that you will find on the voucher_validation response, to exclude before print |
| location_id | integer <int64> ID of the location in form of an integer. It will print only vouchers from that location or without location |
| activity_id | integer <int64> ID of the activity where the print happens |
| category | string Category of the voucher |
| exclude_ids | Array of integers <int64> [ items <int64 > ] List of voucher ids to exclude before print |
| debug | boolean If it is true the vouchers are not set as status = printed Default: |
{- "customer_id": 345,
- "size": 3,
- "exclude_codes": [
- "3412876123876",
- "123981928798712"
], - "location_id": 1,
- "activity_id": 100005677,
- "debug": false
}[- {
- "code": "123123123987987987",
- "available_from": "2016-02-10",
- "available_to": "2016-02-28",
- "name": "Discount meat 50%",
- "description": "Discount meat 50% extended description",
- "key": "dis50meat",
- "available_redemptions": 1,
- "location_ids": [
- 1,
- 2
], - "purchased_product_ids": [
- 123,
- 124
], - "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "has_points": true,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}, - {
- "code": "1123987123987123",
- "available_from": "2016-03-10",
- "available_to": "2016-03-20",
- "name": "Discount dairy products 50%",
- "description": "Discount meat 50% extended description",
- "key": "dis50dairy",
- "available_redemptions": 1,
- "location_ids": [
- 1,
- 2
], - "purchased_product_ids": [
- 123,
- 124
], - "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "has_points": true,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}, - {
- "code": "123987123981723",
- "available_from": "2016-01-01",
- "available_to": "2016-06-01",
- "name": "Discount fish 50%",
- "description": "Discount meat 50% extended description",
- "key": "dis50fish",
- "available_redemptions": 1,
- "location_ids": [
- 1,
- 2
], - "purchased_product_ids": [
- 123,
- 124
], - "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "points": 100,
- "points_money": 0.95,
- "has_points": true,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}
]Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration. Sets the status of the specified vouchers to 'printed'.
Tier 3 (Low) — See rate limit table
| activity_id | integer <int64> Activity which the voucher is associated. |
required | Array of objects (VoucherV2Simple) Array size must be below than 50. |
{- "activity_id": 238,
- "vouchers": [
- {
- "code": "1234"
}
]
}{- "status": "success"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.Sets the specified voucher as 'selected'. A voucher will be selected by the customer in order to be used in the next purchase.
Tier 3 (Low) — See rate limit table
| code required | string Example: 27454637261254 Code of the voucher. |
{- "id": 1312620,
- "code": "1234",
- "available_from": "2019-01-01",
- "available_to": "2019-02-28",
- "name": "Name",
- "description": "Description",
- "key": "Key",
- "image": "image url",
- "status": "pending",
- "selected": true,
- "available_redemtions": 1,
- "cumulative": true,
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "has_points": false,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "frozen_redemptions": 0,
- "priority": 1,
- "applies_to": "itself",
- "purchased_affectation": "",
- "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.Sets the specified voucher as not selected.
Tier 3 (Low) — See rate limit table
| code required | string Example: 27454637261254 Code of the voucher. |
{- "id": 1312620,
- "code": "1234",
- "available_from": "2019-01-01",
- "available_to": "2019-02-28",
- "name": "Name",
- "description": "Description",
- "key": "Key",
- "image": "image url",
- "status": "pending",
- "selected": false,
- "available_redemtions": 1,
- "cumulative": true,
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "has_points": false,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "frozen_redemptions": 0,
- "priority": 1,
- "applies_to": "itself",
- "purchased_affectation": "",
- "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration. Sets the status of the specified vouchers to 'selected'. This feature is helpful to implement vouchers that are automatically redeemed in the next purchase.
Tier 3 (Low) — See rate limit table
required | Array of objects (VoucherV2Simple) Array size must be below than 50. | ||
Array
| |||
{- "vouchers": [
- {
- "code": "1234"
}, - {
- "code": "4567"
}
]
}{- "status": "success"
}Vouchers represent the association between a coupon and a customer.
In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration. Sets the status of the specified vouchers to deselected "selected": false.
This feature is helpful to implement vouchers that are automatically redeemed in the next purchase.
Tier 3 (Low) — See rate limit table
required | Array of objects (VoucherV2Simple) Array size must be below than 50. | ||
Array
| |||
{- "vouchers": [
- {
- "code": "1234"
}, - {
- "code": "4567"
}
]
}{- "status": "success"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.Sets the specified voucher as frozen. A frozen voucher is not printed nor redeemable.
Tier 3 (Low) — See rate limit table
| code required | string Example: 27454637261254 Code of the voucher. |
{- "id": 1312620,
- "code": "1234",
- "available_from": "2019-01-01",
- "available_to": "2019-02-28",
- "name": "Name",
- "description": "Description",
- "key": "Key",
- "image": "image url",
- "status": "pending",
- "selected": true,
- "available_redemtions": 1,
- "cumulative": true,
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "has_points": false,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "frozen_redemptions": 0,
- "priority": 1,
- "applies_to": "itself",
- "purchased_affectation": "",
- "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration.Sets the specified voucher as unfreezed.
Tier 3 (Low) — See rate limit table
| code required | string Example: 27454637261254 Code of the voucher. |
{- "id": 1312620,
- "code": "1234",
- "available_from": "2019-01-01",
- "available_to": "2019-02-28",
- "name": "Name",
- "description": "Description",
- "key": "Key",
- "image": "image url",
- "status": "pending",
- "selected": false,
- "available_redemtions": 1,
- "cumulative": true,
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "has_points": false,
- "affectation": "activity",
- "features": [
- {
- "id": 1234,
- "taxonomy_slug": "a_slug"
}
], - "frozen_redemptions": 0,
- "priority": 1,
- "applies_to": "itself",
- "purchased_affectation": "",
- "payment_methods": [
- "cash",
- "credit_card"
], - "payment_method_categories_1": [
- "bbva",
- "ing",
- "santander"
], - "payment_method_categories_2": [
- "098230",
- "23894"
], - "payment_method_discount": 0.2,
- "payment_method_discount_type": "cash"
}Vouchers represent the association between a coupon and a customer. In some cases your company may be creating the vouchers and in some other cases your company never will create a voucher. It dependes on the level of integration. Get the list of ids of the excluded product and product categories for vouchers at company level.
Tier 3 (Low) — See rate limit table
{- "excluded_product_ids": [
- 111,
- 222
], - "excluded_product_category_ids": [
- 111,
- 222
]
}/activities/simulate is also available as a LEGACY version of this API.
An "Activity" in Loyal Guru represents a cart event.
Purpose of this method (Pre-calculation/Simulation):
This method lets you simulate a new cart (like a purchase) in real-time. It's crucial for Loyalty Points and discount programs and should always be used before finalizing the ticket creation with the POST /activities/realtime method.
Key Uses:
Points and Discounts (coupons_desired property):
By default, all massive and loyalty member promotions (points and discounts) without coupon are included and applied when calculating the ticket.
You can control how vouchers are applied using the coupons_desired property:
all: Apply all masive + loyalty member promotions + all vouchers assigned to the customer.selected: Apply all massive + loyalty member promotions + only vouchers previously selected by the customer via the appropriate endpoint.["34433", "465443"]: apply all massive + loyalty member promotions without coupon + the vouchers/static code specified.[] (empty array) or omit property: Apply only all massive and loyalty member promotions without coupon (no specific vouchers).Cashback Considerations (cashback_score_desired):
If you specify a cashback_score_desired value, you can bypass the manual cashback array calculation. Just provide the total points you wish to redeem. The response will then recommend a cashback array, prioritizing point distribution by line_order based on an internal algorithm.
Note: Specifying this parameter will change the total points and lines in the response compared to your initial request.
Set to -1 to force maximum points usage. The discount applied to a line (from cashback) must not exceed the defined maximum limit of the line's original_total(50% by default).
Important Method Considerations:
total amount of returned lines on the cart is adjusted after applying all relevant discounts, including those from promotional campaigns, vouchers, and any point-based discounts (cashback).original_total attribute.customer_id and customer_code are mutually exclusive; use only one.international: true field will be included in all cart responses.1€ = 10 points and you purchase 2.99€, you earn 29 points.1€ = 1 point and you purchase 12.5€, you earn 12 points.Tier 1 (Critical) — See rate limit table
| id | integer <int64> ID of the cart in form of an integer. |
| code | string Identification |
| location_id | integer <int64> ID of the location in form of an integer. |
| location_code | string Code of the location. |
| customer_id | integer <int64> ID of the customer in form of an integer. Mutually exclusive with |
| customer_code | string Alphanumeric customer code. It must be unique and existing in ours system. Mutually exclusive with |
| creation_date required | string DateTime of the creation of the cart. |
| total required | number Total amount of the purchase cart payed by the customer ( dsscounts applied, taxes included ). If the cart is a cancellation this amount should be negative. The sum of the total values of the activities should be equal to the total sales of the company. |
| original_total | number Original total amount of the purchase cart before any discount or cashback applied before evaluation of the ticket in LG. This value never changes in the different evaluations of the same ticket, and it is used to calculate the total discount applied on the ticket. |
| currency | string Code of the currency acording to the ISO 4217(It must be Capitals letters). In the absence of any information on this point, is going to be filled with the default company currency setup. |
| cashback_score_desired | number The total amount of points that you'd like to spend on the purchase, if specified a cashback array will appear on the response as a recommendation on how should you distribute the score in the different lines. And also, the total of every line will be modifyied acording this array.Use this param or cashbacks array, but you can's use both. If you don't want to deal with specifying exactly the amount of points for the cashback but you'd like to force the maximum redemption of points available for a certain customer, you can specify "-1". |
| vouchers_desired | Array of arrays Deprecated Use coupons_desired instead
By default, all massive and loyalty member promotions (points and discounts) without coupon are included and applied when calculating the ticket.
You can control how vouchers are applied using the
|
| coupons_desired | Array of arrays By default, all massive and loyalty member promotions (points and discounts) are included and applied when calculating the ticket.
You can control how vouchers are applied using the
|
required | Array of objects (LineActivity) Array of lines, at least one is required. |
Array of objects (Cashback) Array of cashbacks. Use this param or cashback_score_desired, but you can's use both. | |
Array of objects (Return) Array of returns. | |
Array of objects (PromotionV2) Array with applied promotions. Important: this is only an informative field, you can't apply a promotion through this field. | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
| business_name | string The company's corporate name. |
| total_net | number Total amount of money paid by the customer, excluding taxes. |
| total_tax | number Total amount of taxes paid by the customer. |
| tpv_id | string Alphanumeric identifier of the PoS terminal where the cart is made. |
| staff_name | string Name of the person on the PoS terminal. |
| order_id | string Alphanumeric identifier of the order the cart belongs to. |
Array of objects (Payment) Details how the cart amount is paid. | |
object (Shipment) | |
| checkout_date | string DateTime of the checkout of the cart. |
| payment_cost | number Total amount of payment cost paid by the customer. |
| shipping_cost | number Total amount of shipping cost paid by the customer. |
| channel | string Channel from which the cart comes. |
| attributes | object Attributes allow you to store additional data on activities. Uses the JSON Schema Form standard link.
Allowed Data Types:
Attributes must be single-level only with a maximum of 50 attributes and 10KB total size. Example:
|
| additional_costs | object It allows you to store additional costs associated with the cart.
Limits:
Example:
|
| apply_discounts | boolean It allows you to decide whether discounts should be applied to the cart or not. By default, discounts are applied to the cart. If you set this parameter to false, no discount will be applied to the cart, but points discount will be applied if |
| apply_points | boolean It allows you to decide whether points campaigns should be applied to the cart or not. By default, points are given to the customer according to the points campaigns configured in the platform. If you set this parameter to false, no points campaign will be given through the cart. This parameter doesn't affect the redemption of points specified through |
{- "id": 1234,
- "code": "1a2b3c4d",
- "location_id": 12,
- "location_code": "12A",
- "customer_id": 8223,
- "customer_code": "8223a",
- "creation_date": "2016-01-01T23:43:20Z",
- "total": 1234,
- "original_total": 1234,
- "currency": "EUR",
- "cashback_score_desired": 123,
- "vouchers_desired": [
- "selected"
], - "coupons_desired": [
- "selected"
], - "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "returns": [
- {
- "ticket_id": 1234,
- "ticket_code": "1a2b3c4d",
- "line_order": 1,
- "from_line_order": 3,
- "quantity": 1,
- "line_order_change": 1
}
], - "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "custom1": "custom value",
- "custom2": "custom value",
- "custom3": "custom value",
- "custom4": "custom value",
- "custom5": "custom value",
- "custom6": "custom value",
- "custom7": "custom value",
- "custom8": "custom value",
- "business_name": "SuperMarket S.L. Spain",
- "total_net": 1200,
- "total_tax": 34,
- "tpv_id": "A55",
- "staff_name": "John Doe",
- "order_id": "Order 1234A",
- "payments": [
- {
- "amount": 15,
- "type": "cash",
- "change": 5
}
], - "shipment": {
- "status": "some_status",
- "tracking_code": "some_code",
- "delivery_address": "some_address",
- "company": "some_company",
- "tracking_url": "some_url"
}, - "checkout_date": "2016-01-01T23:43:20Z",
- "payment_cost": 1.5,
- "shipping_cost": 5.5,
- "channel": "online",
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}, - "apply_discounts": true,
- "apply_points": false
}{- "id": 123456,
- "code": "ACT-123456",
- "creation_date": "2025-06-01T12:00:00Z",
- "location_id": 98765,
- "total": 100.5,
- "original_total": 150.75,
- "score": 100,
- "score_as_money": 12.65,
- "score_used": 120,
- "score_used_as_money": 12.65,
- "score_returned_from_customer": 12,
- "score_returned_from_customer_as_money": 1.25,
- "score_returned_to_customer": 12,
- "score_returned_to_customer_as_money": 1.25,
- "total_scores_coupon_applied": 116,
- "total_scores_coupon_applied_as_money": 1.16,
- "total_discount_voucher_applied": 11.2,
- "total_discount_applied": 11.2,
- "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "customer": [
- {
- "id": 1,
- "score": 1234,
- "score_as_money": 12.34,
- "score_available": 1204,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "score_threshold_cashback_as_money": 100,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}
], - "effects": [
- {
- "rule_id": 2322,
- "line": 1,
- "rule_name": "Product Discount",
- "type": "discount",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "select_customers": "loyalty",
- "value": 100
}, - {
- "rule_id": 2323,
- "line": -1,
- "rule_name": "Holiday Points Bonus",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "all_customers",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 2324,
- "line": 2,
- "rule_name": "Combo Meal Deal",
- "type": "discount",
- "effect_type": "combo_price",
- "distribution_type": "individual_items_pro_rata",
- "select_customers": "targeted",
- "value": 400,
- "coupon_info": {
- "voucher_id": 111,
- "voucher_code": "4344fjaa",
- "coupon_id": 122211,
- "coupon_name": "Combo Meal Deal"
}
}, - {
- "rule_id": 2325,
- "line": 3,
- "rule_name": "Cashback Offer",
- "type": "points",
- "effect_type": "ratio",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "type": "discount",
- "rule_id": 23224,
- "rule_name": "Discount 15% promo",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "effect_type": "rollback",
- "line": 6,
- "value": 400,
- "coupon_info": {
- "voucher_id": 222,
- "voucher_code": "sale190",
- "coupon_id": 12311,
- "coupon_name": "Sales discount example"
}
}, - {
- "type": "points",
- "effect_type": "rollback",
- "rule_id": 12313,
- "rule_name": "Double points promo Weekends",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "line": 7,
- "value": -200,
- "coupon_info": {
- "voucher_id": 223,
- "voucher_code": "double points",
- "coupon_id": 12312,
- "coupon_name": "Double points campaign"
}
}
], - "rejected_campaigns": [
- {
- "rule_id": 1,
- "rule_name": "€5 total cart",
- "type": "discount",
- "error": "The campaign budget was reached",
- "coupon_info": {
- "voucher_id": 1001,
- "voucher_code": "23222",
- "coupon_id": 3222,
- "coupon_name": "€5 total cart",
- "static_code": "SALES89"
}
}
], - "invalid_coupons": [ ],
- "vouchers": [
- {
- "voucher_id": 13009014,
- "voucher_code": "13993492",
- "discount": 1267,
- "line_order": 1,
- "product_id": 2,
- "rule_id": 2,
- "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo",
- "name": " Discount meat 50%",
- "description": "Discount meat 50% extended description",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity"
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "cashback_returns": [
- {
- "line_order": 1,
- "score": 1234
}
], - "scores": [
- {
- "line_order": 1,
- "score": 100,
- "loyalty_score_id": 2,
- "available_from": "2020-01-01",
- "available_to": "2021-01-01"
}
], - "vouchers_desired": [ ],
- "coupons_desired": [ ],
- "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}/activities/realtime is also available as a LEGACY version of this API.
An "Activity" in Loyal Guru primarily represents a purchase event, often referred to as a "cart" or "ticket." This method focuses on the real-time creation of such cart events.
Purpose of this method (Real-time Cart Creation): This method allows you to create a new cart in real-time. It's designed for immediate processing and to provide insights upon creation.
Key Uses & Benefits:
Promotions and Discounts (coupons_desired property):
By default, all massive and loyalty member promotions (points and discounts) without coupon are included and applied when calculating the ticket.
You can control how vouchers are applied using the coupons_desired property:
all: Apply all masive + loyalty member promotions + all vouchers assigned to the customer.selected: Apply all massive + loyalty member promotions + only vouchers previously selected by the customer via the appropriate endpoint.["34433", "465443"]: apply all massive + loyalty member promotions without coupon + the vouchers/static code specified.[] (empty array) or omit property: Apply only all massive and loyalty member promotions without coupon (no specific vouchers)..Data Integrity and Coherence (Important Caveats):
cart.total equals sum of line.totals,
customer_id exists). If you send incoherent data, the endpoint will
process everything anyway, and the customer WILL get their points.Important Method Logic & Considerations:
total amount returned for cart lines is adjusted after applying
all relevant discounts (promotional campaigns, vouchers, point-based
discounts/cashback).original_total attribute.quantity field): Lines are only accepted for return if the
quantity is less than or equal to the original cart line quantity. If
different, the response will be an error. You are allowed to return the
same original line across different activities.original_total
(50% by default). The final total for a line must be divisible by its
quantity with no more than two decimal places. Similarly, the points
allocated to a line must be divisible by its quantity without decimals.customer_id and customer_code are mutually
exclusive; use only one.Cart Structure Summary:
total field representing the exact amount paid by the
customer for the entire cart, including taxes and applied discounts.total field representing the exact amount paid for
that specific line, including taxes and applied discounts.total field in a cart and a line should be negative if the cart
is a cart cancellation. The same applies to the quantity field within a line.international: true
field will be included in all cart responses. If both currencies are the
same, this field will not be shown.Tier 1 (Critical) — See rate limit table
| id | integer <int64> ID of the cart in form of an integer. |
| code | string Identification |
| location_id | integer <int64> ID of the location in form of an integer. |
| location_code | string Code of the location. |
| customer_id | integer <int64> ID of the customer in form of an integer. Mutually exclusive with |
| customer_code | string Alphanumeric customer code. It must be unique and existing in ours system. Mutually exclusive with |
| creation_date required | string DateTime of the creation of the cart. |
| total required | number Total amount of the purchase cart payed by the customer ( dsscounts applied, taxes included ). If the cart is a cancellation this amount should be negative. The sum of the total values of the activities should be equal to the total sales of the company. |
| original_total | number Original total amount of the purchase cart before any discount or cashback applied before evaluation of the ticket in LG. This value never changes in the different evaluations of the same ticket, and it is used to calculate the total discount applied on the ticket. |
| currency | string Code of the currency acording to the ISO 4217(It must be Capitals letters). In the absence of any information on this point, is going to be filled with the default company currency setup. |
| cashback_score_desired | number The total amount of points that you'd like to spend on the purchase, if specified a cashback array will appear on the response showing how the points were distributed qithin the cart lines. And also, the total of every line will be modifyied acording this array. Use this param or cashbacks array, but you can's use both. If you don't want to deal with specifying exactly the amount of points for the cashback but you'd like to force the maximum redemption of points available for a certain customer, you can specify "-1". (50% maximum discount by default per each line will be applied) |
| vouchers_desired | Array of arrays Deprecated Use
|
| coupons_desired | Array of arrays By default, all massive and loyalty member promotions (points and discounts) are included and applied when calculating the ticket. You can control how vouchers are applied using the |
required | Array of objects (LineActivity) Array of lines, at least one is required. |
Array of objects (Cashback) Array of cashbacks. Use this param or cashback_score_desired, but you can's use both. | |
Array of objects (Return) Array of returns. | |
Array of objects (PromotionV2) Array with applied promotions. Important: this is only an informative field, you can't apply a promotion through this field. | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
string or object Deprecated | |
| business_name | string The company's corporate name. |
| total_net | number Total amount of money paid by the customer, excluding taxes. |
| total_tax | number Total amount of taxes paid by the customer. |
| tpv_id | string Alphanumeric identifier of the PoS terminal where the cart is made. |
| staff_name | string Name of the person on the PoS terminal. |
| order_id | string Alphanumeric identifier of the order the cart belongs to. |
Array of objects (Payment) Details how the cart amount is paid. | |
object (Shipment) | |
| checkout_date | string DateTime of the checkout of the cart. |
| payment_cost | number Total amount of payment cost paid by the customer. |
| shipping_cost | number Total amount of shipping cost paid by the customer. |
| channel | string Channel from which the cart comes. |
| attributes | object Attributes allow you to store additional data on activities. Uses the JSON Schema Form standard link.
Allowed Data Types:
Unknown Properties: Properties not defined in the schema are silently discarded - they won't cause validation errors but will NOT be stored. Case Sensitivity:
Property names are case-sensitive per JSON Schema specification. If your schema defines Attributes must be single-level only with a maximum of 50 attributes and 10KB total size. Example:
|
| additional_costs | object It allows you to store additional costs associated with the cart.
Limits:
Example:
|
| apply_discounts | boolean It allows you to decide whether discounts should be applied to the cart or not. By default, discounts are applied to the cart. If you set this parameter to false, no discount will be applied to the cart, but points discount will be applied if |
| apply_points | boolean It allows you to decide whether points campaigns should be applied to the cart or not. By default, points are given to the customer according to the points campaigns configured in the platform. If you set this parameter to false, no points campaign will be given through the cart. This parameter doesn't affect the redemption of points specified through |
{- "id": 1234,
- "code": "1a2b3c4d",
- "location_id": 12,
- "location_code": "12A",
- "customer_id": 8223,
- "customer_code": "8223a",
- "creation_date": "2016-01-01T23:43:20Z",
- "total": 1234,
- "original_total": 1234,
- "currency": "EUR",
- "cashback_score_desired": 123,
- "vouchers_desired": [
- "selected"
], - "coupons_desired": [
- "selected"
], - "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "returns": [
- {
- "ticket_id": 1234,
- "ticket_code": "1a2b3c4d",
- "line_order": 1,
- "from_line_order": 3,
- "quantity": 1,
- "line_order_change": 1
}
], - "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "custom1": "custom value",
- "custom2": "custom value",
- "custom3": "custom value",
- "custom4": "custom value",
- "custom5": "custom value",
- "custom6": "custom value",
- "custom7": "custom value",
- "custom8": "custom value",
- "business_name": "SuperMarket S.L. Spain",
- "total_net": 1200,
- "total_tax": 34,
- "tpv_id": "A55",
- "staff_name": "John Doe",
- "order_id": "Order 1234A",
- "payments": [
- {
- "amount": 15,
- "type": "cash",
- "change": 5
}
], - "shipment": {
- "status": "some_status",
- "tracking_code": "some_code",
- "delivery_address": "some_address",
- "company": "some_company",
- "tracking_url": "some_url"
}, - "checkout_date": "2016-01-01T23:43:20Z",
- "payment_cost": 1.5,
- "shipping_cost": 5.5,
- "channel": "online",
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}, - "apply_discounts": true,
- "apply_points": false
}{- "id": 123456,
- "code": "ACT-123456",
- "creation_date": "2025-06-01T12:00:00Z",
- "location_id": 98765,
- "total": 100.5,
- "original_total": 150.75,
- "score": 100,
- "score_as_money": 12.65,
- "score_used": 120,
- "score_used_as_money": 12.65,
- "score_returned_from_customer": 12,
- "score_returned_from_customer_as_money": 1.25,
- "score_returned_to_customer": 12,
- "score_returned_to_customer_as_money": 1.25,
- "total_scores_coupon_applied": 116,
- "total_scores_coupon_applied_as_money": 1.16,
- "total_discount_voucher_applied": 11.2,
- "total_discount_applied": 11.2,
- "lines": [
- {
- "order": 1,
- "product_id": 345,
- "product_code": "0015SJ1L",
- "product_ean": "GHT567A",
- "total": 12.67,
- "original_total": 12.67,
- "total_cost": 9.67,
- "quantity": 1.2,
- "measurement_unit": "g",
- "total_net": 1200,
- "total_tax": 34,
- "product_name": "Soda juice 1l",
- "product_tax": 21,
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "supplier_id": 9876,
- "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99
}
}
], - "customer": [
- {
- "id": 1,
- "score": 1234,
- "score_as_money": 12.34,
- "score_available": 1204,
- "score_available_as_money": 12.04,
- "score_threshold_cashback": 1000,
- "score_threshold_cashback_as_money": 100,
- "money_threshold_cashback": 10,
- "score_to_reach_cashback": 100,
- "money_to_spend_to_reach_cashback": 0.1,
- "fraudulent": false,
- "attributes": {
- "loyalty_tier": "gold",
- "customer_score": 850,
- "newsletter_opt_in": true,
- "tags": [
- "vip",
- "premium",
- "early_adopter"
], - "preferred_store_ids": [
- 101,
- 205,
- 308
], - "interests": [
- "electronics",
- "fashion",
- "sports"
]
}
}
], - "effects": [
- {
- "rule_id": 2322,
- "line": 1,
- "rule_name": "Product Discount",
- "type": "discount",
- "effect_type": "percentage",
- "distribution_type": "individual_items",
- "select_customers": "loyalty",
- "value": 100
}, - {
- "rule_id": 2323,
- "line": -1,
- "rule_name": "Holiday Points Bonus",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "all_customers",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 2324,
- "line": 2,
- "rule_name": "Combo Meal Deal",
- "type": "discount",
- "effect_type": "combo_price",
- "distribution_type": "individual_items_pro_rata",
- "select_customers": "targeted",
- "value": 400,
- "coupon_info": {
- "voucher_id": 111,
- "voucher_code": "4344fjaa",
- "coupon_id": 122211,
- "coupon_name": "Combo Meal Deal"
}
}, - {
- "rule_id": 2325,
- "line": 3,
- "rule_name": "Cashback Offer",
- "type": "points",
- "effect_type": "ratio",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 600,
- "value_as_money": 6,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "type": "discount",
- "rule_id": 23224,
- "rule_name": "Discount 15% promo",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "effect_type": "rollback",
- "line": 6,
- "value": 400,
- "coupon_info": {
- "voucher_id": 222,
- "voucher_code": "sale190",
- "coupon_id": 12311,
- "coupon_name": "Sales discount example"
}
}, - {
- "type": "points",
- "effect_type": "rollback",
- "rule_id": 12313,
- "rule_name": "Double points promo Weekends",
- "distribution_type": "individual_items",
- "select_customers"": "targeted",
- "line": 7,
- "value": -200,
- "coupon_info": {
- "voucher_id": 223,
- "voucher_code": "doublepoints",
- "coupon_id": 12312,
- "coupon_name": "Double points campaign"
}
}
], - "rejected_campaigns": [
- {
- "rule_id": 1,
- "rule_name": "€5 total cart",
- "type": "discount",
- "error": "The campaign budget was reached",
- "coupon_info": {
- "voucher_id": 1001,
- "voucher_code": "23222",
- "coupon_id": 3222,
- "coupon_name": "€5 total cart",
- "static_code": "SALES89"
}
}
], - "invalid_coupons": [ ],
- "vouchers": [
- {
- "voucher_id": 13009014,
- "voucher_code": "13993492",
- "discount": 1267,
- "line_order": 1,
- "product_id": 2,
- "rule_id": 2,
- "coupon": {
- "id": 123,
- "key": "discountkeyreferencing internal promo",
- "name": " Discount meat 50%",
- "description": "Discount meat 50% extended description",
- "max_redemptions": 3,
- "min_money": 10.2,
- "max_money": 50.2,
- "min_units": 3,
- "max_units": 8,
- "discount": 0.2,
- "discount_type": "cash",
- "affectation": "activity"
}
}
], - "cashbacks": [
- {
- "line_order": 1,
- "score": 1234,
- "discount": 1267
}
], - "cashback_returns": [
- {
- "line_order": 1,
- "score": 1234
}
], - "scores": [
- {
- "line_order": 1,
- "score": 100,
- "loyalty_score_id": 2,
- "available_from": "2020-01-01",
- "available_to": "2021-01-01"
}
], - "vouchers_desired": [ ],
- "coupons_desired": [ ],
- "promotions": [
- {
- "promotion_id": 1234,
- "discount": 12.6,
- "line_order": 1,
- "product_id": 2
}
], - "attributes": {
- "warranty_selected": true,
- "gift_wrap": false,
- "add_on_ids": [
- 10,
- 20,
- 30
], - "special_instructions": "Handle with care",
- "product_condition": "new",
- "return_policy_applied": true
}, - "additional_costs": {
- "cost1": 1.17,
- "cost2": 2.99,
- "original_cost1": 1.5,
- "original_cost2": 3.5
}
}/custom_entities is also available as a LEGACY version of this API.
Create a new custom entity
Tier 2 (Moderate) — See rate limit table
| id | string Custom entity identifier. It must be unique. |
| customer_id | integer The numerical identifier of the owner customer. Required if customer_code is not provided. |
| customer_code | string The alphanumeric identifier of the owner customer. Required if customer_id is not provided. |
| slug required | string Custom entity definition identifier. |
| data required | object Custom entity payload. It will be validated against the schema configured for the definition with the provided slug. |
| created_at | string Custom entity date of creation. |
{- "id": "fc12345",
- "customer_id": 123456789,
- "customer_code": "code123456789",
- "slug": "fishing_course",
- "data": {
- "prey_count": 25,
- "location": "BCN"
}, - "created_at": "2023-01-01T12:00:00Z"
}{- "id": "fc12345",
- "customer_id": 123456789,
- "customer_code": "code123456789",
- "slug": "fishing_course",
- "data": {
- "prey_count": 25,
- "location": "BCN"
}, - "created_at": "2023-01-01T12:00:00Z",
- "ingested_at": "2023-11-11T12:00:00Z",
- "score": 700,
- "score_available": 200,
- "scores": [
- {
- "score": 200,
- "loyalty_score_id": 1,
- "available_from": "2023-07-10",
- "available_to": "2023-12-31"
}, - {
- "score": 500,
- "loyalty_score_id": 123,
- "available_from": "2024-01-01",
- "available_to": "2024-12-31"
}
], - "customer": {
- "code": "code123456789",
- "id": 123456789,
- "score": 700,
- "score_available": 200
}
}/scores/trigger is also available as a LEGACY version of this API.
This endpoint allows you to programmatically trigger a Points or Wallet campaign when a specific condition is fulfilled.
Customers earn points based on predefined campaigns. These rules can be applied in different scenarios, such as purchases, user sign-ups, or custom events defined by your integration. Accumulated points can later be redeemed for discounts, rewards, or coupons.
Points campaigns can be triggered either by specifying a loyalty rule ID or by using a trigger associated with one or more campaigns.
Important:
Endpoint Versions: There are two versions of this endpoint, depending on the loyalty engine in use.
Version 1: - If multiple loyalty rules are associated with the same trigger, only one rule will be executed. - The rule selection order is not guaranteed. - It is strongly recommended to use the loyalty_rule_id to ensure the correct loyalty rule is triggered.
Version 2: - If multiple loyalty rules are associated with the same trigger, all associated rules will be executed and all points will be granted if conditions are met. - To apply only one rule, you must explicitly specify the loyalty_rule_id.
Additional Considerations:
Tier 1 (Critical) — See rate limit table
| trigger required | string Slug of the trigger associated to the points campaign. |
| customer_id required | number ID of the customer. Mutually exclusive with |
| loyalty_score_id | integer <int64> Deprecated Id of the loyalty rule that you would like to trigger. Use |
| loyalty_rule_id required | integer <int64> Id of the points campaign that you would like to trigger.
It is recommended to always use |
| location_id | number Id of the trigger location. |
| location_code | string Code of the trigger location. |
| score_overwrite | number Overwrite the score given by the campaign. Only makes sense if loyalty_rule_id is provided. If no value, points associated to the campaign will be given. Maximum value allowed: 50000000' |
| comments | string Comments about the trigger transaction. |
| country | string ISO 3166-1 alpha-2 country code (It must be Capitals letters Required for Version 1 engine. For Version 2 engine, if not provided, the customer's registration location country will be used. |
{- "trigger": "manual",
- "customer_id": 10,
- "loyalty_score_id": 12,
- "score_overwrite": 30,
- "comments": "30 extra points for completing the poll"
}{- "customer_code": "string",
- "loyalty_score_id": 12,
- "score": 110,
- "score_as_money": 11,
- "customer": {
- "id": 12,
- "code": "12a",
- "score": 100,
- "score_available": 100
}, - "scores": [
- {
- "loyalty_score_id": 2222,
- "score": 100,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "loyalty_score_id": 1222,
- "score": 10,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}
], - "effects": [
- {
- "rule_id": 2222,
- "rule_name": "Manual points adjustment",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 100,
- "value_as_money": 10,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}, - {
- "rule_id": 1222,
- "rule_name": "Manual extra points for tier Gold",
- "type": "points",
- "effect_type": "direct_value",
- "distribution_type": "total",
- "select_customers": "loyalty",
- "value": 10,
- "value_as_money": 1,
- "available_from": "2025-06-01",
- "available_to": "2026-05-30"
}
]
}Tier 3 (Low) — See rate limit table
| id required | integer <int64> ID of the product in form of an integer(int64), maximum value: 9223372036854775807 |
| name required | string Name of the product |
| description | string Description of the product |
| code | string Code of the product |
| margin | number Margin percent (0 to 1) of the product without taxes |
| price | number PVP of the product with taxes |
| cost | number product cost until it reaches the warehouse |
| tax | number Tax ratio (0 to 1) of the product |
| measurement_unit | string Type of unit of the quantity. Must be one of these: ( kg, g, l, m, u ) |
| status | string Status of the product, must be one of them: active inactive Default: active |
| custom1 | string Custom value |
| custom2 | string Custom value |
| custom3 | string Custom value |
| custom4 | string Custom value |
| custom5 | string Custom value |
| custom6 | string Custom value |
| custom7 | string Custom value |
| custom8 | string Custom value |
Array of FeatureWithIdInput (object) or FeatureWithCodeInput (object) Array of features that the product belongs to. Each feature can be identified by either ID or code. |
{- "id": 1234,
- "name": "Chicken breast",
- "description": "Free run chicken breast",
- "code": "1234a",
- "margin": 0.11,
- "price": 11.99,
- "cost": 10.23,
- "tax": 0.21,
- "measurement_unit": "g",
- "status": "active",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 2,
- "taxonomy_slug": "family"
}
]
}{- "id": 1234,
- "name": "Chicken",
- "description": "Free run chicken",
- "code": "p-1code",
- "price": 11.99,
- "margin": 0.11,
- "cost": 10.23,
- "tax": 0.21,
- "status": "active",
- "measurement_unit": "g",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 1,
- "taxonomy_slug": "meat"
}, - {
- "id": 2,
- "taxonomy_slug": "fresh"
}
]
}Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 1234 ID of the product. |
{- "id": 1234,
- "name": "Chicken",
- "description": "Free run chicken",
- "code": "p-1code",
- "price": 11.99,
- "margin": 0.11,
- "cost": 10.23,
- "tax": 0.21,
- "status": "active",
- "measurement_unit": "g",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 1,
- "code": "1_abc",
- "taxonomy_slug": "meat"
}, - {
- "id": 2,
- "code": "2_def",
- "taxonomy_slug": "fresh"
}
]
}Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 1234 Id of the product |
| name | string Name of the product |
| description | string Description of the product |
| code | string Code of the product |
| margin | number Margin percent (0 to 1) of the product without taxes |
| price | number PVP of the product with taxes |
| cost | number product cost until it reaches the warehouse |
| tax | number Tax ratio (0 to 1) of the product |
| measurement_unit | string Type of unit of the quantity. Must be one of these: ( kg, g, l, m, u ) |
| status | string Status of the product, must be one of them: active inactive Default: active |
| custom1 | string Custom value |
| custom2 | string Custom value |
| custom3 | string Custom value |
| custom4 | string Custom value |
| custom5 | string Custom value |
| custom6 | string Custom value |
| custom7 | string Custom value |
| custom8 | string Custom value |
Array of FeatureWithIdInput (object) or FeatureWithCodeInput (object) Array of features that the product belongs to. Each feature can be identified by either ID or code. |
{- "name": "Chicken breast",
- "description": "Free run chicken breast",
- "code": "1234a",
- "margin": 0.11,
- "price": 11.99,
- "cost": 10.23,
- "tax": 0.21,
- "measurement_unit": "g",
- "status": "active",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 2,
- "taxonomy_slug": "family"
}
]
}{- "id": 1234,
- "name": "Chicken",
- "description": "Free run chicken",
- "code": "p-1code",
- "price": 11.99,
- "margin": 0.11,
- "cost": 10.23,
- "tax": 0.21,
- "status": "active",
- "measurement_unit": "g",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 1,
- "taxonomy_slug": "meat"
}, - {
- "id": 2,
- "taxonomy_slug": "fresh"
}
]
}Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 1234 ID of the product |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Manage the main different set of groups that you'll need to classify your products.
Tier 3 (Low) — See rate limit table
| name required | string Name of the taxonomy |
| slug required | string Slug of the taxonomy. The slug should be a short label for something, containing only letters, numbers, underscores or hyphens. |
{- "name": "Meat",
- "slug": "meat"
}{- "status": "success"
}Manage the main different set of groups that you'll need to classify your products.
Tier 3 (Low) — See rate limit table
| slug required | string Example: meat Slug of the taxonomy |
| name | string Name of the taxonomy |
{- "name": "Dairy Products"
}{- "status": "success"
}Manage the main different set of groups that you'll need to classify your products.
Tier 3 (Low) — See rate limit table
| slug required | string Example: dairy_products Slug of the taxonomy |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Manage the different values in which a product will be categorized under a certain taxonomy. Remember that everytime that you create a new feature you'll have to update every product belonging to this new feature.
Tier 3 (Low) — See rate limit table
| taxonomy_slug required | string Example: family Slug of the taxonomy |
| id required | integer <int64> ID of the feature in form of an integer |
| name required | string Name of the feature |
| slug required | string Slug of the feature. The slug should be a short label for something, containing only letters, numbers, underscores or hyphens. |
Array of objects (ParentFeature) Array of parent features. The feature will be considereded as 'belonging to' all parent features. |
{- "id": 12345,
- "name": "Chicken meat",
- "slug": "chicken_meat",
- "parent_features": [
- {
- "id": 1,
- "taxonomy_slug": "section"
}
]
}{- "status": "success"
}Manage the different values in which a product will be categorized under a certain taxonomy. Remember that everytime that you create a new feature you'll have to update every product belonging to this new feature.
Tier 3 (Low) — See rate limit table
| taxonomy_slug required | string Example: family Slug of the taxonomy |
| id required | string Example: 1234 Identifier of the feature |
| search_param | string Enum: "id" "code" Example: The property to find the feature by. It can be either Example: It is not included in the request, it will take the default value If |
| name | string Name of the feature |
Array of objects (ParentFeature) Array of parent features. The feature will be considereded as 'belonging to' all parent features. |
{- "name": "Chicken meat",
- "parent_features": [
- {
- "id": 1,
- "taxonomy_slug": "section"
}
]
}{- "status": "success"
}Manage the different values in which a product will be categorized under a certain taxonomy. Remember that everytime that you create a new feature you'll have to update every product belonging to this new feature.
Tier 3 (Low) — See rate limit table
| taxonomy_slug required | string Example: family Slug of the taxonomy |
| id required | string Example: 1234 Identifier of the feature |
| search_param | string Enum: "id" "code" Example: The property to find the feature by. It can be either 'id' or 'code'. It is not included in the request, it will take the default value 'id'. |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}id, code can´t be sent at the same time. Just one of them is allowed.Tier 3 (Low) — See rate limit table
| id | integer <int64> ID of the location in form of an integer. Mutually exclusive with |
| code | string Code of the location. Mutually exclusive with |
| name required | string Name |
| postal_code | string Postal code |
| address | string Address of the location |
| address_extra | string Extra information about the address. |
| phone | string Phone |
| country required | string Code of the location's country according to the ISO 3166-1 alpha-2 (It must be Capital letters) |
| currency | string Code of the location's currency according to the ISO 4217(It must be Capitals letters) |
| city | string City name |
| state | string State name |
string Email of the location | |
| longitude | number Longitude (gps) of the location |
| latitude | number Latitude (gps) of the location |
| status | string Status of the location, must be one of them: active inactive Default: active |
| score_exchange_id | integer <int64> ID of the score exchange |
| schedule | string Schedule details |
| custom1 | string Custom value |
| custom2 | string Custom value |
| custom3 | string Custom value |
| custom4 | string Custom value |
| custom5 | string Custom value |
| custom6 | string Custom value |
| custom7 | string Custom value |
| custom8 | string Custom value |
Array of objects (Feature) Array of features to which the location belongs to |
{- "id": 1234,
- "name": "Local number 1234",
- "postal_code": "08110",
- "address": "Joan Miró",
- "address_extra": "31",
- "phone": "678513344",
- "country": "ES",
- "currency": "EUR",
- "city": "Barcelona",
- "state": "Catalonia",
- "email": "local1234@google.es",
- "longitude": 40.68906,
- "latitude": 74.044636,
- "status": "active",
- "score_exchange_id": 12,
- "schedule": "8:00 - 20:00",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 2,
- "taxonomy_slug": "family"
}
]
}{- "id": 1234,
- "name": "Local location",
- "postal_code": "08080",
- "address": "Joan Tshu",
- "address_extra": "N1",
- "phone": "638849999",
- "country": "ES",
- "currency": "EUR",
- "city": "Madrid",
- "state": "Madrid",
- "email": "local1234@test.test",
- "longitude": 41.62366,
- "latitude": 71.0262336,
- "status": "active",
- "score_exchange_id": 15,
- "schedule": "8:00 - 20:00",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 1,
- "taxonomy_slug": "test1"
}, - {
- "id": 2,
- "taxonomy_slug": "test2"
}
]
}Tier 3 (Low) — See rate limit table
| value required | string Example: 1234,53345345B Could be an integer or a string.
|
| search_param | string Enum: "id" "code" Example: search_param=id The param field used for the location search. |
{- "id": 1234,
- "code": "53345345B",
- "name": "Local location",
- "postal_code": "08080",
- "address": "Joan Tshu",
- "address_extra": "N1",
- "phone": "638849999",
- "country": "ES",
- "currency": "EUR",
- "city": "Madrid",
- "state": "Madrid",
- "email": "local1234@test.test",
- "longitude": 41.62366,
- "latitude": 71.0262336,
- "status": "active",
- "score_exchange_id": 15,
- "schedule": "8:00 - 20:00",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 1,
- "taxonomy_slug": "test1"
}, - {
- "id": 2,
- "taxonomy_slug": "test2"
}
]
}Tier 3 (Low) — See rate limit table
| value required | string Example: 1234,53345345B Could be an integer or a string.
|
| search_param | string Enum: "id" "code" Example: search_param=id The param field used for the location search. |
| name | string Name |
| postal_code | string Postal code |
| address | string Address of the location |
| address_extra | string Extra information about the address. |
| phone | string Phone |
| country | string Code of the location's country according to the ISO 3166-1 alpha-2(It must be Capitals letters) |
| currency | string Code of the location's currency according to the ISO 4217(It must be Capitals letters) |
| city | string City name |
| state | string State name |
string Email of the location | |
| longitude | number Longitude (gps) of the location |
| latitude | number Latitude (gps) of the location |
| status | string Status of the location, must be one of them: active inactive Default: active |
| score_exchange_id | integer <int64> ID of the score exchange |
| schedule | string Schedule details |
| custom1 | string Custom value |
| custom2 | string Custom value |
| custom3 | string Custom value |
| custom4 | string Custom value |
| custom5 | string Custom value |
| custom6 | string Custom value |
| custom7 | string Custom value |
| custom8 | string Custom value |
Array of objects (Feature) Array of features to which the location belongs to |
{- "name": "Local number 1234",
- "postal_code": "08110",
- "address": "Joan Miró",
- "address_extra": "31",
- "phone": "678513344",
- "country": "ES",
- "currency": "EUR",
- "city": "Barcelona",
- "state": "Catalonia",
- "email": "local1234@google.es",
- "longitude": 40.68906,
- "latitude": 74.044636,
- "status": "active",
- "score_exchange_id": 12,
- "schedule": "8:00 - 20:00",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 2,
- "taxonomy_slug": "family"
}
]
}{- "id": 1234,
- "code": "53345345B",
- "name": "Local location",
- "postal_code": "08080",
- "address": "Joan Tshu",
- "address_extra": "N1",
- "phone": "638849999",
- "country": "ES",
- "currency": "EUR",
- "city": "Madrid",
- "state": "Madrid",
- "email": "local1234@test.test",
- "longitude": 41.62366,
- "latitude": 71.0262336,
- "status": "active",
- "score_exchange_id": 15,
- "schedule": "8:00 - 20:00",
- "custom1": "custom value 1",
- "custom2": "custom value 2",
- "custom3": "custom value 3",
- "custom4": "custom value 4",
- "custom5": "custom value 5",
- "custom6": "custom value 6",
- "custom7": "custom value 7",
- "custom8": "custom value 8",
- "features": [
- {
- "id": 1,
- "taxonomy_slug": "test1"
}, - {
- "id": 2,
- "taxonomy_slug": "test2"
}
]
}Tier 3 (Low) — See rate limit table
| value required | string Example: 1234,53345345B Could be an integer or a string.
|
| search_param | string Enum: "id" "code" Example: search_param=id The param field used for the location search. |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Manage the main different set of groups that you'll need to classify your locations.
Tier 3 (Low) — See rate limit table
| name required | string Name of the taxonomy |
| slug required | string Slug of the taxonomy. The slug should be a short label for something, containing only letters, numbers, underscores or separators. |
{- "name": "Meat",
- "slug": "meat_pub|1"
}{- "id": 1,
- "name": "Meat",
- "slug": "meat_pub|1",
- "origin": "external"
}Manage the main different set of groups that you'll need to classify your locations.
Tier 3 (Low) — See rate limit table
| slug required | string Example: meat_pub|1 Slug of the taxonomy |
| name required | string Name of the taxonomy |
{- "name": "Most visited"
}{- "status": "success"
}Manage the main different set of groups that you'll need to classify your locations.When a location taxonomy is deleted, the categories associated to it are deleted as well.
Tier 3 (Low) — See rate limit table
| slug required | string Example: meat_pub|1 Slug of the taxonomy |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}Manage the features used to classify your locations.
Tier 3 (Low) — See rate limit table
| taxonomy_slug required | string Example: region Slug of the taxonomy the feature belongs to. |
| id required | integer <int64> Unique identifier of the feature within its taxonomy. |
| name required | string Name of the feature |
{- "id": 1,
- "name": "Barcelona"
}{- "external_id": 1,
- "id": 1323542,
- "name": "Barcelona",
- "slug": "region|1",
- "taxonomy_slug": "region"
}Manage the features used to classify your locations.
Tier 3 (Low) — See rate limit table
| taxonomy_slug required | string Example: region Slug of the taxonomy the feature belongs to. |
| id required | integer <int64> Example: 1 Unique identifier of the feature within its taxonomy. |
| name required | string New name of the feature |
{- "name": "BCN"
}{- "external_id": 1,
- "id": 1323542,
- "name": "BCN",
- "slug": "region|1",
- "taxonomy_slug": "region"
}Manage the features used to classify your locations.
Tier 3 (Low) — See rate limit table
| taxonomy_slug required | string Example: region Slug of the taxonomy the feature belongs to. |
| id required | integer <int64> Example: 1 Unique identifier of the feature within its taxonomy. |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}A promotion is defining a generic discount that is applicable based on the products purchased by the customer, its applicable without requiring any action by the client. The big difference between a promotion and a coupon is that a promotion does not require the customer to present a voucher.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> ID of the promotion in form of an integer |
| name required | string Name |
| description | string Description |
| available_from | string Available from Date. |
| available_to | string Available to Date. |
| active | boolean An optional attribute to set the status of the promotion Default: true |
| discount | number Discount percentage (0 to 1) applied to the promotioned product. Default value: 0. |
| discount_type | string Type of discount applied to the promotioned product. Default value: 'percent'. Possible values: 'percent', 'cash'. |
| affectation | string Affectation of the promotion. Possible values: 'activity', 'attribute', 'product' |
| min_units | integer <int64> Minimum number of units that the customer must buy to apply the promotion. Default value: 1. |
| max_units | integer <int64> Maximum number of units that the customer can buy to apply the promotion. Default value: 1. |
| min_money | number <float> Minimum amount of money that the customer must spend to apply the promotion. Default value: 0.5 |
| max_money | number <float> Maximum amount of money that the customer can spend to apply the promotion. Default value: 10.5 |
| cumulative | boolean An optional attribute to set if the promotion is cumulative with other promotions. Default value: false |
| feature_pks | string |
| marketing_cost | number Total amount of money invested in advertising the promotion. |
| created_at | string DateTime of the creation of the promotion. |
| location_ids | Array of integers <int64> [ items <int64 > ] Array of location ids that the promotion belongs to. Specify this param only if the promotions belongs to a group of locations, if the promotion is available in all locations you can ommit this param. |
| feature_location_ids | Array of integers <int64> [ items <int64 > ] Array of location category ids that the promotion applies to. Specify this param only if the promotion apply to a group of location categories, if the promotion applies to all locations you can ommit this param. |
| product_ids | Array of integers <int64> [ items <int64 > ] Array of product ids on which the promotion is applied. Specify this param only if the promotions belongs to a group of products. |
| collective_ids | Array of integers <int64> [ items <int64 > ] Array of collective id that the promotion applies to. Specify this param only if the promotion apply to a group of collectives, if the promotion applies to all customers you can ommit this param. This attribute is recomended for Colletive asignation. |
| collective_slugs | Array of strings Array of collective slugs that the promotion applies to. Specify this param only if the promotion apply to a group of collectives, if the promotion applies to all customers you can ommit this param.Only use this attribute if no ids available in your system. |
| promotional_discount_name | string Name of the promotional type which the promotion is included. |
{- "id": 1234,
- "name": "Promotion 2x1",
- "description": "Pay one and get the second one for free",
- "available_from": "2016-01-01",
- "available_to": "2016-02-01",
- "active": true,
- "discount": 0.33,
- "marketing_cost": 35975.52,
- "created_at": "2016-01-01T12:00:00Z",
- "location_ids": [
- 1,
- 2
], - "product_ids": [
- 1,
- 2
], - "collective_ids": [
- 1,
- 2
], - "collective_slugs": [
- "employees",
- "bigfamily"
], - "promotional_discount_name": "2x1",
- "cumulative": true,
- "min_units": 2,
- "max_units": 5,
- "min_money": 0.5,
- "max_money": 10.5,
- "discount_type": "percent",
- "affectation": "product"
}{- "status": "success"
}A promotion is defining a generic discount that is applicable based on the products purchased by the customer, its applicable without requiring any action by the client. The big difference between a promotion and a coupon is that a promotion does not require the customer to present a voucher.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the promotion |
| name | string Name |
| description | string Description |
| available_from | string Available date. |
| available_to | string Available date. |
| active | boolean An optional attribute to set the status of the promotion Default: true |
| discount | number Discount percentage (0 to 1) applied to the promotioned product. |
| discount_type | string Type of discount applied to the promotioned product. Default value: 'percent'. Possible values: 'percent', 'cash'. |
| affectation | string Affectation of the promotion. Possible values: 'activity', 'attribute', 'product' |
| min_units | integer <int64> Minimum number of units that the customer must buy to apply the promotion. Default value: 1. |
| max_units | integer <int64> Maximum number of units that the customer can buy to apply the promotion. Default value: 1. |
| min_money | number <float> Minimum amount of money that the customer must spend to apply the promotion. Default value: 0.5 |
| max_money | number <float> Maximum amount of money that the customer can spend to apply the promotion. Default value: 10.5 |
| cumulative | boolean An optional attribute to set if the promotion is cumulative with other promotions. Default value: false |
| feature_pks | string |
| marketing_cost | number Total amount of money invested in advertising the promotion. |
| created_at | string Date of the creation of the promotion. |
| updated_at | string Date of the update of the promotion. |
| location_ids | Array of integers <int64> [ items <int64 > ] The complete list of location ids that this promotion belongs to. Important notice: sending this property will overwrite all previous locations with the new array you provide. If you send an empty list, it will delete all locations. |
| feature_location_ids | Array of integers <int64> [ items <int64 > ] Array of location category ids that the promotion applies to. Specify this param only if the promotion apply to a group of location categories, if the promotion applies to all locations you can ommit this param. |
| product_ids | Array of integers <int64> [ items <int64 > ] Array of product ids on which the promotion is applied. Important notice: sending this property will overwrite all previous products with the new array you provide. If you send an empty list, it will delete all products. |
| collective_ids | Array of strings Array of collective id that the promotion applies to. Specify this param only if the promotion apply to a group of collectives, if the promotion applies to all customers you can ommit this param. This attribute is recomended for Colletive asignation. |
| collective_slugs | Array of strings Array of collective slugs that the promotion applies to. Specify this param only if the promotion apply to a group of collectives, if the promotion applies to all customers you can ommit this param. Only use this attribute if no ids available in your system. |
| promotional_discount_name | string Name of the promotional type which the promotion is included. |
{- "name": "Promotion 2x1",
- "description": "Pay one and get the second one for free",
- "available_from": "2016-01-01",
- "available_to": "2016-02-01",
- "active": true,
- "discount": 0.33,
- "marketing_cost": 35975.52,
- "created_at": "2016-01-01T12:00:00Z",
- "updated_at": "2016-01-01T12:00:00Z",
- "product_ids": [
- 1,
- 2
], - "collective_ids": [
- "1",
- "2"
], - "collective_slugs": [
- "employees",
- "bigfamily"
], - "promotional_discount_name": "2x1",
- "cumulative": true,
- "min_units": 2,
- "max_units": 5,
- "min_money": 0.5,
- "max_money": 10.5,
- "discount_type": "cash",
- "affectation": "product",
- "featture_location_ids": [
- 1,
- 2
]
}{- "status": "success"
}A promotion is defining a generic discount that is applicable based on the products purchased by the customer, its applicable without requiring any action by the client. The big difference between a promotion and a coupon is that a promotion does not require the customer to present a voucher.
Tier 3 (Low) — See rate limit table
| id required | integer <int64> Example: 12 ID of the promotion |
| Content-Type required | string Value: "application/json" Example: application/json |
{- "status": "success"
}