### cURL Example: Admin Login Source: https://apidocs.openloyalty.io/index Example of how to log in as an administrator using cURL to obtain a JWT token. ```curl curl {HOST}/api/admin/login_check \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Accept: application/json, text/plain, */*' \ --data-binary '{"username":"admin","password":"password"}' ``` -------------------------------- ### Campaign Creation Response Source: https://apidocs.openloyalty.io/index Example JSON response after successfully creating a campaign. ```JSON { "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf" } ``` -------------------------------- ### cURL Example: Accessing Protected Resource Source: https://apidocs.openloyalty.io/index Example of how to access a protected API resource using a JWT token obtained from the login process. ```curl curl {HOST}/api/{storeCode}/analytics/members \ -H 'Accept: application/json' \ -H 'Content-type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...' \ ``` -------------------------------- ### Campaign Data Structure Example Source: https://apidocs.openloyalty.io/index An example JSON structure representing a campaign, including its properties like name, description, type, triggers, activity periods, rules, filters, limits, labels, translations, and visibility settings. ```JSON { "items": [ { "name": "string", "description": "string", "type": "direct", "trigger": "transaction", "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf", "activity": { "startsAt": "2019-08-24T14:15:22Z", "endsAt": "2019-08-24T14:15:22Z" }, "active": true, "createdAt": "2019-08-24T14:15:22Z", "displayOrder": 1, "rules": [ { "name": "string", "description": "string", "conditions": [ { "operator": "string", "data": [ "string" ], "attribute": "string" } ], "effects": [ { "effect": "string", "pointsRule": "string" } ] } ], "transactionItemsFilters": [ { "code": "string", "name": "string", "filters": [ { "value": { "field": "sku" }, "condition": { "operator": "eq", "value": "string" } } ] } ], "limits": { "points": { "interval": { "type": "days", "value": 0 }, "value": 0.1 }, "pointsPerMember": { "interval": { "type": "days", "value": 0 }, "value": 0.1 }, "executionsPerMember": { "interval": { "type": "days", "value": 0 }, "value": 0.1 } }, "labels": [ { "key": "string", "value": "string" } ], "translations": [ { "name": "string", "description": "string", "id": 0, "locale": "string" } ], "limitUsages": { "points": { "currentValue": 0.1, "limitValue": 0.1, "remaining": 0.1, "interval": { "type": "calendarHours", "value": 0 } } }, "visibility": { "target": "segment", "tiers": [ "string" ], "segments": [ "string" ] } } ], "total": { "all": 0, "filtered": 0, "estimated": true } } ``` -------------------------------- ### Member Creation Response Sample Source: https://apidocs.openloyalty.io/index Example of a successful response after creating a member, containing the new customer ID and email. ```JSON { "customerId": "00000000-0000-0000-0000-000000000000", "email": "user@example.com" } ``` -------------------------------- ### Campaign Creation Payload Source: https://apidocs.openloyalty.io/index Example JSON payload for creating a new campaign, including trigger strategies, audience, rules, limits, and translations. ```JSON { "campaign": { "triggerStrategy": { "type": "birthday", "executionSchedule": { "dayOfWeek": [ 0 ], "dayOfMonth": [ 1 ] } }, "visibility": { "target": "segment", "tiers": [ "string" ], "segments": [ "string" ] }, "audience": { "target": "segment", "tiers": [ "string" ], "segments": [ "string" ] }, "rules": [ { "name": "string", "description": "string", "target": "self", "effects": [ { "effect": "give_points", "pointsRule": null, "walletCode": "string", "unitsLockRule": { "lockStrategy": "expression", "expression": "string" }, "unitsExpirationRule": { "expirationStrategy": "expression", "expression": "string" }, "rewardId": "f3304536-f1ed-45d4-a070-e157c3a09001", "couponValueRule": "string", "customAttributeKey": "string", "customAttributeValueRule": "string" } ], "conditions": [ { "attribute": "string", "operator": "expression", "data": null } ] } ], "transactionItemsFilters": [ { "code": "string", "name": "string", "filters": [ { "value": { "field": "sku" }, "condition": { "operator": "eq", "value": "string" } } ] } ], "limits": { "points": { "interval": { "type": "days", "value": 0 }, "value": 0.1 }, "pointsPerMember": { "interval": { "type": "days", "value": 0 }, "value": 0.1 }, "executionsPerMember": { "interval": { "type": "days", "value": 0 }, "value": 0.1 } }, "type": "direct", "trigger": "transaction", "event": "string", "activity": { "startsAt": "2024-09-17 00:00+02:00", "endsAt": "2024-09-17 00:00+02:00" }, "displayOrder": 1, "active": true, "labels": [ { "key": "string", "value": "string" } ], "memberFilter": { "strategy": null }, "translations": { "en": { "name": "string", "description": "string" }, "pl": { "name": "string", "description": "string" } } } } ``` -------------------------------- ### Response Samples Source: https://apidocs.openloyalty.io/index Provides examples of possible HTTP response codes and the structure of a JSON response containing billable member, transaction, and event data per month. ```JSON { "billableMembers": 10000, "billableTransactions": 9000, "billableEvents": 8500, "billableMembersPerMonth": { "2023-08-01": 1000, "2023-07-01": 1000, "2023-06-01": 1000, "2023-05-01": 1000, "2023-04-01": 1000, "2023-03-01": 1000, "2023-02-01": 1000, "2023-01-01": 1000, "2022-12-01": 1000, "2022-11-01": 1000, "2022-10-01": 0, "2022-09-01": 0 }, "billableTransactionsPerMonth": { "2023-08-01": 1000, "2023-07-01": 1000, "2023-06-01": 1000, "2023-05-01": 1000, "2023-04-01": 1000, "2023-03-01": 1000, "2023-02-01": 1000, "2023-01-01": 1000, "2022-12-01": 1000, "2022-11-01": 0, "2022-10-01": 0, "2022-09-01": 0 }, "billableEventsPerMonth": { "2023-08-01": 950, "2023-07-01": 850, "2023-06-01": 750, "2023-05-01": 650, "2023-04-01": 550, "2023-03-01": 450, "2023-02-01": 350, "2023-01-01": 250, "2022-12-01": 150, "2022-11-01": 50, "2022-10-01": 0, "2022-09-01": 0 } } ``` -------------------------------- ### Achievement Payload Example Source: https://apidocs.openloyalty.io/index Provides a JSON payload example for creating or updating an achievement, including translations, activity rules, active status, and limits. ```JSON { "achievement": { "translations": { "en": {}, "es": {} }, "activity": { "operator": "is_after" }, "active": true, "rules": [ { "trigger": "transaction", "type": "direct", "completeRule": { "period": { "type": {}, "consecutive": 0 }, "periodGoal": 0, "uniqueAttribute": "string" }, "limit": { "value": 0, "interval": { "type": "calendarHours", "value": 0 } }, "translations": { "en": { "name": "string", "description": "string" } }, "aggregation": { "rule": "string", "type": "string" }, "conditions": [ { "attribute": "string", "operator": "expression" } ], "event": "string", "uniqueReferee": true } ], "limit": { "value": 0, "interval": { "type": "calendarHours", "value": 0 } } } } ``` -------------------------------- ### Achievement Patch Payload Example Source: https://apidocs.openloyalty.io/index Provides a JSON payload example for patching an achievement, including specific rule updates and translations. ```JSON { "achievement": { "translations": { "en": {}, "es": {} }, "activity": { "operator": "is_after" }, "active": true, "rules": [ { "achievementRuleId": "string", "translations": { "en": {} } } ], "limit": { "value": 0, "interval": { "type": "calendarHours", "value": 0 } } } } ``` -------------------------------- ### Campaign Creation Request Payload Source: https://apidocs.openloyalty.io/index Example JSON payload for creating a new campaign, including trigger strategies, audience targeting, rules, limits, and localization. ```json { "campaign": { "triggerStrategy": { "type": "birthday", "executionSchedule": { "dayOfWeek": [ 0 ], "dayOfMonth": [ 1 ] } }, "visibility": { "target": "segment", "tiers": [ "string" ], "segments": [ "string" ] }, "audience": { "target": "segment", "tiers": [ "string" ], "segments": [ "string" ] }, "rules": [ { "name": "string", "description": "string", "target": "self", "effects": [ { "effect": "give_points", "pointsRule": null, "walletCode": "string", "unitsLockRule": { "lockStrategy": "expression", "expression": "string" }, "unitsExpirationRule": { "expirationStrategy": "expression", "expression": "string" }, "rewardId": "f3304536-f1ed-45d4-a070-e157c3a09001", "couponValueRule": "string", "customAttributeKey": "string", "customAttributeValueRule": "string" } ], "conditions": [ { "attribute": "string", "operator": "expression", "data": null } ] } ], "limits": { "points": { "interval": { "type": "days", "value": 0 }, "value": 0.1 }, "pointsPerMember": { "interval": { "type": "days", "value": 0 }, "value": 0.1 }, "executionsPerMember": { "interval": { "type": "days", "value": 0 }, "value": 0.1 } }, "type": "direct", "trigger": "achievement", "activity": { "startsAt": "2024-09-17 00:00+02:00", "endsAt": "2024-09-17 00:00+02:00" }, "displayOrder": 1, "active": true, "labels": [ { "key": "string", "value": "string" } ], "translations": { "en": { "name": "string", "description": "string" }, "pl": { "name": "string", "description": "string" } }, "achievementId": "c5e7ec91-68c9-46a0-b0b4-d1de83d6fabd" } } ``` -------------------------------- ### Bulk Action API Source: https://apidocs.openloyalty.io/index Endpoints for managing bulk actions, including creating, retrieving lists, and getting details of bulk action items. ```APIDOC Bulk Action: - postCreate bulk action: Creates a new bulk action. - getGet bulk actions: Retrieves a list of bulk actions. - getGet bulk action items: Retrieves items for a bulk action. ``` -------------------------------- ### Get Bulk Actions Source: https://apidocs.openloyalty.io/index Retrieves a list of bulk actions for a specified store. Supports filtering by type and pagination/sorting. ```APIDOC GET /api/{storeCode}/bulkAction http://openloyalty.localhost/api/{storeCode}/bulkAction Authorizations: _Bearer_ _token_ Path Parameters: storeCode (string, required): Store code. Query Parameters: type (string, Enum: "cancelTransfers" "activateTransfers" "expireTransfers"): Bulk Action Type. requestedAt (string, ): Date and time when the action was requested by admin. _page (integer, >= 1, Default: 1): Number of page with results, starts from 1. _itemsOnPage (integer, [1 .. 50], Default: 10): Items on one page. _orderBy (object, Example: _orderBy[fieldName]=desc): Sorting order. Possible values: "asc" (Ascending), "desc" (Descending). Responses: **200**: Success. **400**: Bad request. **403**: Forbidden. **404**: Not found. ``` -------------------------------- ### API Response Samples Source: https://apidocs.openloyalty.io/index Provides examples of JSON responses for different HTTP status codes (400, 403, 404) encountered during API interactions. These samples illustrate the structure of error messages and validation failures. ```APIDOC { "code": 400, "message": "Validation failed", "errors": [ { "message": "string", "parameters": null, "plural": null, "code": "string", "path": "string" } ] } ``` -------------------------------- ### OpenLoyalty API Documentation Source: https://apidocs.openloyalty.io/index This section details various OpenLoyalty API operations, including getting referral lists and setting member passwords. It covers endpoints, parameters, request/response schemas, and authorization requirements. ```APIDOC ## Get referrals list get/api/{storeCode}/referral http://openloyalty.localhost/api/{storeCode}/referral Integration This method returns a list of referrals Members in the system. If sorting is not chosen, the rows will be returned in an unspecified order. To sort a result, use an `_orderBy` parameter in query. ##### Authorizations: _Bearer_ _token_ ##### path Parameters storeCoderequired | string Store code ---|--- ##### query Parameters referralId | string referrerId | string referrerName | string referrerToken | string refereeId | string refereeName | string createdAt | string _page | integer >= 1 Default: 1 Example: _page=1 Number of page with results, starts from 1 _itemsOnPage | integer [ 1 .. 50 ] Default: 10 Example: _itemsOnPage=25 Items on one page _orderBy | object Example: _orderBy[fieldName]=desc Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A ### Responses **200** List of referrals **400** Bad request. **401** Unauthorized **403** Forbidden. ### Response samples * 200 * 400 * 401 * 403 Content type application/json Copy Expand all Collapse all `{ * "items": [ * { * "referralId": "0ad51cad-89ed-462c-988b-731c378bf26f", * "referrerId": "23ef66d0-7f25-4763-b652-182b2f24d19f", * "referrerName": "string", * "referrerToken": "string", * "refereeId": "e62c5d7e-9835-41b8-88b3-a437e8d7bd07", * "refereeName": "string", * "createdAt": "2019-08-24T14:15:22Z" } ], * "total": { * "all": 0, * "filtered": 0, * "estimated": true } }` ## Add the member’s password post/api/{storeCode}/member/{member}/password http://openloyalty.localhost/api/{storeCode}/member/{member}/password Management This method allows assigning a password to a specific Member. ##### Authorizations: _Bearer_ _token_ ##### path Parameters memberrequired | string[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{...Show pattern ---|--- storeCoderequired | string Store code ##### Request Body schema: application/json plainPasswordrequired | string ---|--- ### Responses **204** Success. No content. **400** Bad request. **403** Forbidden. **404** Not found. ### Request samples * Payload Content type application/json Copy `{ * "plainPassword": "pa$$word" }` ### Response samples * 400 * 403 * 404 Content type application/json Copy Expand all Collapse all `{ * "code": 400, * "message": "Validation failed", * "errors": [ * { * "message": "string", * "parameters": null, * "plural": null, * "code": "string", * "path": "string" } ] }` ``` -------------------------------- ### Error Response Example Source: https://apidocs.openloyalty.io/index Illustrates a typical JSON response for a bad request (400) or validation failure, detailing the error code, message, and specific error fields. ```JSON { "code": 400, "message": "Validation failed", "errors": [ { "message": "string", "parameters": null, "plural": null, "code": "string", "path": "string" } ] } ``` -------------------------------- ### Settings API Source: https://apidocs.openloyalty.io/index Provides endpoints for managing various settings within the OpenLoyalty system, including activation configurations and available choices for tenant settings. ```APIDOC Get activation configuration: GET /api/{storeCode}/settings/activation Description: Returns the current activation configuration (e.g., required method for activation). Authorizations: Bearer token Path Parameters: storeCode (required, string): Store code Responses: 200: Return activation configuration. {"required": true, "method": "string"} 404: Not found. Get available options for the tenant: GET /api/{storeCode}/settings/choices/{type} Description: Returns a list of available options for settings based on the selected type. Authorizations: Bearer token Path Parameters: type (required, string): Enum: "currency", "country", "availableFrontendTranslations", "availablePointExpireAfter", "identificationMethods", "issuedRewardStatus", "language", "timezone". Choices type. storeCode (required, string): Store code Responses: 200: {"choices": [{"property1": "string", "property2": "string"}]} 403: Forbidden. 404: Not found. Get available options: GET /api/settings/choices/{type} Description: Returns a list of available options for settings based on the selected type (global). Authorizations: Bearer token Path Parameters: type (required, string): Enum: "currency", "country", "availableFrontendTranslations", "availablePointExpireAfter", "identificationMethods", "issuedRewardStatus", "language", "timezone". Choices type. Responses: 200: {"choices": [{"property1": "string", "property2": "string"}]} 403: Forbidden. 404: Not found. ``` -------------------------------- ### Export - Get Export Details Source: https://apidocs.openloyalty.io/index Retrieves details for an export. This endpoint is part of the export functionality. ```APIDOC GET /api/{storeCode}/export/{export} **Description:** Retrieves details for an export. **Authorizations:** Bearer token **Path Parameters:** - `storeCode` (string, required): Store code - `export` (string, required): The export identifier ``` -------------------------------- ### Open Loyalty API Documentation Source: https://apidocs.openloyalty.io/index This section details the Open Loyalty API, focusing on bulk actions and campaign management. It includes endpoint definitions, request parameters, response schemas, and authorization details. ```APIDOC Bulk Action Items: GET /api/{storeCode}/bulkAction/{bulkActionId}/item Description: Retrieves a list of items associated with a specific bulk action. Authorizations: Bearer token Path Parameters: storeCode (string, required): The store code. bulkActionId (string, required, uuid): The ID of the bulk action. Query Parameters: objectToProcessId (string, uuid): Filter by object to process ID. createdAt (string, date-time): Filter by creation timestamp. updatedAt (string, date-time): Filter by update timestamp. status (string, Enum: "queued", "inprogress", "completed", "failed", "error"): Filter by status. _page (integer, >= 1, Default: 1): Page number for results. _itemsOnPage (integer, [1..50], Default: 10): Number of items per page. _orderBy (object, Example: _orderBy[fieldName]=desc): Sorting order (asc/desc). Responses: 200: Successful response with a list of bulk action items. 400: Bad request. 403: Forbidden. 404: Not found. Response Sample (200): { "items": [ { "bulkActionItemId": "a50ff854-a8e3-4a74-87d8-1141bfd722b4", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "status": "queued", "type": "cancelTransfers", "objectToProcessId": "string", "message": "string" } ], "total": { "all": 0, "filtered": 0, "estimated": true } } Campaign Management: GET /api/{storeCode}/campaign/{campaign} Description: Retrieves detailed information about a specific campaign. Authorizations: Bearer token Path Parameters: storeCode (string, required): The store code. campaign (string, required, uuid): The campaign ID. Responses: 200: Campaign details. 401: Unauthorized. 403: Forbidden. 404: Not found. ``` -------------------------------- ### API Documentation for Campaign Management Source: https://apidocs.openloyalty.io/index This section details the API endpoints for managing campaigns. It includes the method for creating a new campaign, specifying request parameters, request body schemas, and possible responses. ```APIDOC Add a new campaign post/api/{storeCode}/campaign http://openloyalty.localhost/api/{storeCode}/campaign Management This method allows creating a new Campaign. Authorizations: _Bearer_ _token_ path Parameters storeCoderequired | string Store code Request Body schema: application/json One of CampaignAchievementCampaignRedemptionCampaignMultiReferralCampaignLeaderboardCampaign campaignrequired | object Responses 200 Return created campaign ID. 400 Bad request. 401 Unauthorized 403 Forbidden. 404 Not found. ``` -------------------------------- ### Export API Source: https://apidocs.openloyalty.io/index Endpoints for managing data exports, including creating, retrieving lists, downloading, and getting export details. ```APIDOC Export: - getGet export details: Retrieves details of an export. - getDownload an export: Downloads an export. - getGet exports lists: Retrieves a list of exports. - postCreate an export: Creates a new export. ``` -------------------------------- ### Resend Activation Code Response Sample (Forbidden) Source: https://apidocs.openloyalty.io/index Example of a forbidden response when attempting to resend an activation code for a specific member. ```JSON { "code": 403, "message": "Forbidden." } ``` -------------------------------- ### Transaction Response Sample (200 OK) Source: https://apidocs.openloyalty.io/index Example of a successful response (HTTP 200 OK) when retrieving a list of transactions. It includes details about each transaction, such as gross value, customer data, items, and header information. ```APIDOC { "items": [ { "grossValue": 3, "metrics": [ { "name": "string", "value": 1, "calculatedAt": null } ], "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "customerData": { "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "email": "example@example.com", "name": "string", "nip": "string", "phone": "string", "loyaltyCardNumber": "string", "address": { "street": "string", "address1": "string", "address2": "string", "postal": "string", "city": "string", "province": "string", "country": "string" } }, "items": [ { "name": "string", "quantity": 0, "highPrecisionQuantity": 1.125, "grossValue": 1, "category": "string", "labels": [ { "key": "string", "value": "string" } ], "maker": "string", "sku": "string" } ], "header": { "documentNumber": "string", "documentType": "sell", "linkedDocumentNumber": "string", "purchasedAt": "2019-08-24T14:15:22Z", "purchasePlace": "string", "excludedDeliverySKUs": [ null ], "excludedSKUs": [ null ], "excludedCategories": [ null ], "labels": [ null ] }, "matched": true, "currency": "string", "pointsEarned": 0, "unitsDeducted": 0, "channelId": "5f6d08bc-455a-4532-98b8-19e2cee51160", "channelName": "string", "assignedToCustomerAt": "2019-08-24T14:15:22Z" } ], "total": { "all": 0, "filtered": 0, "estimated": true } } ``` -------------------------------- ### Request Activation Code Response Sample (Error) Source: https://apidocs.openloyalty.io/index Example of an error response when requesting an activation code, indicating a validation failure. ```JSON { "code": 400, "message": "Validation failed", "errors": [ { "message": "string", "parameters": null, "plural": null, "code": "string", "path": "string" } ] } ``` -------------------------------- ### OpenLoyalty Settings API Source: https://apidocs.openloyalty.io/index This section details the API endpoints for managing settings within OpenLoyalty. It includes operations for retrieving all settings, configuring settings, and partially updating settings. Each operation specifies the HTTP method, endpoint, required authorizations, path parameters, query parameters, request body schemas, and possible responses with their descriptions and sample payloads. ```APIDOC GET /api/{storeCode}/settings - Returns all system settings. - If sorting is not chosen, the rows will be returned in an unspecified order. To sort a result, use an `_orderBy` parameter in query. - Authorizations: Bearer token - Path Parameters: - storeCode (string, required): Store code - Query Parameters: - public (boolean) - Responses: - 200: Successful response with settings. - 403: Forbidden. - 404: Not found. - Response Sample (200): { "settings": [ { "property1": "string", "property2": "string" } ] } ``` ```APIDOC POST /api/{storeCode}/settings - Configures system settings. - Authorizations: Bearer token - Path Parameters: - storeCode (string, required): Store code - Request Body Schema (application/json): - settings (object): - programName (string) - programUrl (string) - allowCustomersProfileEdits (boolean) - expirePointsNotificationDays (integer) - expireCouponsNotificationDays (integer) - expireLevelsNotificationDays (integer) - customersIdentificationConfigurations (array of null) - tierAssignType (string, e.g., "points") - tierWalletCode (string) - excludeDeliveryCostsFromTierAssignment (boolean) - excludedDeliverySKUs (array of string) - excludedLevelSKUs (array of string) - excludedLevelCategories (array of string) - levelDowngradeMode (string, e.g., "none") - levelDowngradeDays (integer) - levelDowngradeBase (string, e.g., "none") - levelResetPointsOnDowngrade (boolean) - accountActivationRequired (boolean) - identificationMethod (string, e.g., "email") - timezone (string, e.g., "Europe/Warsaw") - rewardWalletCode (string) - activeMember (object): - transactionInXDays (integer) - customEventsInXDays (object): - days (integer) - allEvents (boolean) - eventTypes (array of string) - operator (string, e.g., "and") - Responses: - 200: Granted settings. - 400: Bad request. - 403: Forbidden. - 404: Not found. - Response Sample (200): { "settings": [ { "property1": "string", "property2": "string" } ] } ``` ```APIDOC PATCH /api/{storeCode}/settings - Partially updates system settings. - Authorizations: Bearer token - Path Parameters: - storeCode (string, required): Store code - Request Body Schema (application/json): - settings (object): Same schema as POST, allowing partial updates. - Responses: - 200: Returned when successful. - 400: Bad request. - 403: Forbidden. - 404: Not found. - Response Sample (200): { "settings": [ { "property1": "string", "property2": "string" } ] } ``` -------------------------------- ### Get Reward's Image Source: https://apidocs.openloyalty.io/index Fetches the photo associated with a specific reward. Requires the store code, reward ID, and photo ID. ```APIDOC GET /api/{storeCode}/reward/{reward}/photo/{photoId} Path Parameters: storeCode: string. Store code. reward: string . Reward ID. photoId: string. Photo ID. Authorizations: Bearer token Responses: 200: Returned when successful 404: Not found. ``` -------------------------------- ### Open Loyalty API Documentation Source: https://apidocs.openloyalty.io/index This section details the Open Loyalty API endpoints for managing channels and custom events. It includes information on request methods, parameters, request bodies, and response samples for various operations. ```APIDOC Add a channel: POST /api/{storeCode}/channel http://openloyalty.localhost/api/{storeCode}/channel Description: Allows creating a new Sales Channel in the system. Authorizations: Bearer token Path Parameters: storeCode (string, required): Store code Request Body schema (application/json): channel (object, required): CreateChannelFormType name (string) identifier (string) description (string) Responses: 200: Returned when successful 400: Bad request. 401: Unauthorized 403: Forbidden. Request samples (Payload): { "channel": { "name": "string", "identifier": "string", "description": "string" } } Response samples (200): { "channelId": "00000000-0000-0000-0000-000000000000" } Get custom event schema: GET /api/{storeCode}/customEvent/schema/{customEventSchema} http://openloyalty.localhost/api/{storeCode}/customEvent/schema/{customEventSchema} Description: Returns detailed information about specific Custom Event Schema in the system. Authorizations: Bearer token Path Parameters: storeCode (string, required): Store code customEventSchema (string, required): Custom Event Schema Responses: 200: Returned when successful 401: Unauthorized 403: Forbidden. 404: Not found. Response samples (200): { "eventType": "string", "name": "string", "schema": {}, "active": true, "createdAt": "2019-08-24T14:15:22Z" } Update custom event schema configuration: PUT /api/{storeCode}/customEvent/schema/{customEventSchema} http://openloyalty.localhost/api/{storeCode}/customEvent/schema/{customEventSchema} Description: Allows updating a specific Custom Event Schema. Authorizations: Bearer token Path Parameters: storeCode (string, required): Store code customEventSchema (string, required): Custom Event Schema Request Body schema (application/json): customEventSchema (object): schema: fields: - type (string) - description (string) - name (string) name (string) active: isActive (boolean) Responses: 204: Success. No content. 400: Bad request. 401: Unauthorized 403: Forbidden. Request samples (Payload): { "customEventSchema": { "schema": { "fields": [ { "type": "text", "description": "string", "name": "string" } ] }, "name": "string", "active": { "isActive": true } } } Response samples (400): { "code": 400, "message": "Validation failed", "errors": [ { "message": "string", "parameters": null, "plural": null, "code": "string", "path": "string" } ] } Get custom event schema list: GET /api/{storeCode}/customEvent/schema http://openloyalty.localhost/api/{storeCode}/customEvent/schema Description: Returns a complete list of the Custom Event Schemas that exist in the system. If sorting is not chosen, the rows will be returned in an unspecified order. To sort a result, use an _orderBy parameter in query. Authorizations: Bearer token Path Parameters: storeCode (string, required): Store code Query Parameters: eventType (string) name (string) active (boolean) _page (integer >= 1, Default: 1): Number of page with results, starts from 1 _itemsOnPage (integer [ 1 .. 50 ], Default: 10): Items on one page _orderBy (object, Example: _orderBy[fieldName]=desc): Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: asc - Ascending, from A to Z; desc - Descending, from Z to A ``` -------------------------------- ### Get Transactions List Source: https://apidocs.openloyalty.io/index Retrieves a list of all transactions in the system. Supports filtering, sorting, and pagination. Requires a store code and Bearer token for authorization. ```APIDOC get/api/{storeCode}/transaction http://openloyalty.localhost/api/{storeCode}/transaction Authorizations: _Bearer_ _token_ Path Parameters: storeCode: string (required) - Store code Query Parameters: transactionId: string customerData:customerId: string customerData:loyaltyCardNumber: string customerData:name: string customerData:email: string customerData:phone: string customerData:nip: string customerId: string header:documentType: string header:documentNumber: string - Specifies the document number used in the transaction. header:linkedDocumentNumber: string - Used only for return transactions and refers to the original ‘sell’ document. header:purchasePlace: string channelId: string header:purchasedAt: string grossValue: number matched: boolean header:labels: string - Labels using pattern e.g. (key1;value1),(key2;value2),... items:labels: string - Labels using pattern e.g. (key1;value1),(key2;value2),... items:category: string items:sku: string items:maker: string _page: integer >= 1 (Default: 1) - Number of page with results, starts from 1 _itemsOnPage: integer [ 1 .. 50 ] (Default: 10) - Items on one page _orderBy: object (Example: _orderBy[fieldName]=desc) - Sorting order. Supports 'asc' and 'desc'. Responses: 200: List of transactions 400: Bad request. 403: Forbidden. ```