Download OpenAPI specification:Download
API for an external loyalty program that is called by the enfore platform.
Checks the status of a loyalty program subscription based on a subscription identifier.
Subscription identifiers are scanned or manually entered codes that identify a customer or member of a loyalty program.
The enfore runtime will use this endpoint to determine whether the scanned/entered identifier represents an active loyalty program subscription or not.
There are three possible success cases:
ACTIVE
- The identifier represents an active subscription that points can be collected for.INACTIVE
- The identifier represents a subscription but that description is "inactive".
That is, no points can be collected for it.UNKNOWN
- The identifier does not match any susbcription. This implies that no points can
be collected.Note that the external loyalty program must only return a failure if there is a technical
problem. For identifiers that simply do not match any subscription, an UNKNOWN
-success
must be returned.
org-id required | string ID of the organization whose data is being accessed. |
subscription_identifier required | string The identifier to check. |
language | string <bcp47> Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
The result of the verification.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "subscription_status": "UNKNOWN",
- "points_balance": 0,
- "points_available_for_redemption": 0,
- "contact": {
- "@type": "AnonymousContactInformation",
- "name": "string",
- "contact_address": {
- "full_address": "string",
- "recipient_name": "string",
- "care_of": "string",
- "street_name": "string",
- "street_number": "string",
- "additional": "string",
- "city": "string",
- "zip": "string",
- "country_code": "AF"
}, - "contact_email": "user@example.com",
- "contact_phone": "string",
- "unique_instance_id": "string",
- "external_data": "string",
- "user_level_identifiers": [
- {
- "identifier": "string",
- "label": "string"
}
]
}, - "@type": "SubscriptionVerificationSuccess"
}
Operations related to loyalty program coupons. Includes operations to verify coupons, mark coupons as used and to restore used coupons.
Checks the status of a loyalty program coupon based on a coupon identifier.
Coupon identifiers are scanned or manually entered codes that identify a coupon/voucher of a specific loyalty program. Usually, such coupons/vouchers grant additional points based on their conditions. For example, "2x points on cat food".
The enfore runtime will use this endpoint to determine whether the scanned/entered identifier represents a coupon of the loyalty program and whether it is active or not.
There are three possible success cases:
ACTIVE
- The identifier represents an active coupon that can be used (given that
its constraints are matched).REDEEMED
- The identifier represents a coupon that has already been redeemed.EXPIRED
- The identifier represents a coupon that has already been expired.UNKNOWN_IDENTIFIER
- The identifier does not match any coupon.REDEMPTION_STATUS_UNKNOWN
- Determine the status of a loyalty program coupon.Note that the external loyalty program must only return a failure if there is a technical
problem. For identifiers that simply do not match any coupon, an UNKNOWN_IDENTIFIER
-success
must be returned.
org-id required | string ID of the organization whose data is being accessed. |
coupon_code required | string The Coupon code to check. |
subscription_identifier required | string The identifier to check. |
language | string <bcp47> Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
The result of the verification.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "status": "UNKNOWN_IDENTIFIER",
- "coupon_description": "string",
- "identifier": "string",
- "@type": "CouponVerificationSuccess"
}
org-id required | string ID of the organization whose data is being accessed. |
subscription_identifier required | string [ 1 .. 256 ] characters Subscription identifier |
selected_coupons required | Array of strings List of selected/used coupons |
language required | string <bcp47> [ 1 .. 256 ] characters Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
The result of reporting the coupons.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "subscription_identifier": "string",
- "selected_coupons": [
- "string"
], - "language": "string"
}
{- "@type": "CouponReportSuccess"
}
org-id required | string ID of the organization whose data is being accessed. |
subscription_identifier required | string [ 1 .. 256 ] characters Subscription identifier |
selected_coupons required | Array of strings List of selected/used coupons |
language required | string <bcp47> [ 1 .. 256 ] characters Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
The result of restoring the coupons.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "subscription_identifier": "string",
- "selected_coupons": [
- "string"
], - "language": "string"
}
{- "@type": "CouponReportSuccess"
}
Operations related to loyalty program points. Include operations for calculating, granting and revoking points.
org-id required | string ID of the organization whose data is being accessed. |
basket required | object (ExternalLoyaltyProgramBasket) |
language required | string <bcp47> [ 1 .. 256 ] characters Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
subscription_identifier | string [ 1 .. 256 ] characters Identifier of subscription loyalty program |
selected_coupons | Array of strings Optional list of Loyalty Program coupons that have been presented by the customer |
The result of the calculation.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "basket": {
- "evaluation_date": "2025-04-23T13:33:19Z",
- "total_gross_amount": {
- "value": 0,
- "unit": "AUD"
}, - "items": [
- {
- "identifier": "string",
- "product_id": "string",
- "sales_unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_sales_units": 0,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "options": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "extra_charges": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "lot": "string",
- "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "sales_channel": "string"
}, - "language": "string",
- "subscription_identifier": "string",
- "selected_coupons": [
- "string"
]
}
{- "calculated_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
], - "applied_coupons": [
- "string"
], - "invoice_information": [
- {
- "type": "string",
- "text": [
- "string"
]
}
], - "@type": "CalculationSuccess"
}
org-id required | string ID of the organization whose data is being accessed. |
refund_basket required | object (LoyaltyProgramRefundBasket) |
language required | string <bcp47> [ 1 .. 256 ] characters Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
subscription_identifier | string [ 1 .. 256 ] characters Identifier of subscription loyalty program |
reference_of_grant | string [ 1 .. 256 ] characters Optional reference returned by the grant call of the now refunded items |
refunded_invoice_id | string [ 1 .. 256 ] characters Technical identifier of the refunded invoice |
The result of the calculation.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
{- "refund_basket": {
- "date_of_sale": "2025-04-23T13:33:19Z",
- "date_of_refund": "2025-04-23T13:33:19Z",
- "total_gross_amount_of_refund": {
- "value": 0,
- "unit": "AUD"
}, - "total_gross_amount_of_sale": {
- "value": 0,
- "unit": "AUD"
}, - "items": [
- {
- "item_identifier": "string",
- "product_id": "string",
- "sales_unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_refunded_sales_units": 0,
- "refund_amount": {
- "value": 0,
- "unit": "AUD"
}, - "options": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "extra_charges": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "lot": "string",
- "sales_category": "string",
- "excluded_from_discounts": true,
- "sales_information": {
- "number_of_sold_sales_units": 0,
- "sales_item_amount": {
- "value": 0,
- "unit": "AUD"
}, - "granted_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
]
}, - "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "sales_channel": "string",
- "granted_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
]
}, - "language": "string",
- "subscription_identifier": "string",
- "reference_of_grant": "string",
- "refunded_invoice_id": "string"
}
{- "calculated_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
], - "applied_coupons": [
- "string"
], - "invoice_information": [
- {
- "type": "string",
- "text": [
- "string"
]
}
], - "@type": "CalculationSuccess"
}
org-id required | string ID of the organization whose data is being accessed. |
subscription_identifier required | string [ 1 .. 256 ] characters Identifier of subscription loyalty program |
points_to_grant required | Array of objects (LoyaltyPoints) The points to be granted. |
invoice_number required | string [ 1 .. 256 ] characters Invoice number |
language required | string <bcp47> [ 1 .. 256 ] characters Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
basket required | object (ExternalLoyaltyProgramBasket) |
The result of the granting.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "subscription_identifier": "string",
- "points_to_grant": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
], - "invoice_number": "string",
- "language": "string",
- "basket": {
- "evaluation_date": "2025-04-23T13:33:19Z",
- "total_gross_amount": {
- "value": 0,
- "unit": "AUD"
}, - "items": [
- {
- "identifier": "string",
- "product_id": "string",
- "sales_unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_sales_units": 0,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "options": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "extra_charges": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "lot": "string",
- "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "sales_channel": "string"
}
}
{- "reference": "string",
- "@type": "PointsGrantingSuccess"
}
org-id required | string ID of the organization whose data is being accessed. |
refund_basket required | object (LoyaltyProgramRefundBasket) |
subscription_identifier required | string [ 1 .. 256 ] characters Identifier of subscription loyalty program |
points_to_revoke required | Array of objects (LoyaltyPoints) Number of points to be revoked |
credit_memo_number required | string [ 1 .. 256 ] characters Invoice number |
refunded_invoice_number required | string [ 1 .. 256 ] characters Refunded invoice number |
language required | string <bcp47> [ 1 .. 256 ] characters Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag |
reference_of_grant | string [ 1 .. 256 ] characters Optional reference returned by the grant call of the now refunded items |
The result of the revocation.
Invalid parameters were sent by the client
Credentials missing or not sufficient
Resource(s) not found or invalid identifier
Specified data is semantically incorrect.
{- "refund_basket": {
- "date_of_sale": "2025-04-23T13:33:19Z",
- "date_of_refund": "2025-04-23T13:33:19Z",
- "total_gross_amount_of_refund": {
- "value": 0,
- "unit": "AUD"
}, - "total_gross_amount_of_sale": {
- "value": 0,
- "unit": "AUD"
}, - "items": [
- {
- "item_identifier": "string",
- "product_id": "string",
- "sales_unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_refunded_sales_units": 0,
- "refund_amount": {
- "value": 0,
- "unit": "AUD"
}, - "options": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "extra_charges": [
- {
- "identifier": "string",
- "product_id": "string",
- "unit": {
- "value": 0,
- "unit": "ENERGY_JOULES"
}, - "number_of_units": 0,
- "is_single_issue": true,
- "amount": {
- "value": 0,
- "unit": "AUD"
}, - "sales_category": "string",
- "excluded_from_discounts": true,
- "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "lot": "string",
- "sales_category": "string",
- "excluded_from_discounts": true,
- "sales_information": {
- "number_of_sold_sales_units": 0,
- "sales_item_amount": {
- "value": 0,
- "unit": "AUD"
}, - "granted_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
]
}, - "taxes": [
- "CH_STANDARD_VAT_2008"
]
}
], - "sales_channel": "string",
- "granted_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
]
}, - "subscription_identifier": "string",
- "points_to_revoke": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
], - "credit_memo_number": "string",
- "refunded_invoice_number": "string",
- "language": "string",
- "reference_of_grant": "string"
}
{- "revoked_points": [
- {
- "points": 0,
- "label": "string",
- "reference": "string",
- "item_identifier": "string"
}
], - "reference": "string",
- "@type": "PointsRevokingSuccess"
}