### Get Certificate by ID Response Example (JSON) Source: https://bonusplus.pro/api/Help/Api/GET-certificate-id This is an example of the JSON response when requesting a certificate by its ID. It includes details such as the certificate's ID, name, expiration date, status, current balance, and initial balance. This format is used for both application/json and text/json content types. ```json { "id": "a7a3d87e-f1b5-4347-8f56-b0c3533e59ab", "name": "sample string 2", "expireDate": "2026-03-01T07:35:39.8270975+03:00", "status": "CAN_BE_USED", "currentBalance": 1.1, "initialBalance": 1.1 } ``` -------------------------------- ### Get Retail Sale Information (JSON Example) Source: https://bonusplus.pro/api/Help/Api/GET-retail-id This snippet demonstrates the expected JSON response format for the GET /retail/{id} endpoint. It includes details of a sale, such as ID, type, date, customer information, store details, total sum, and a list of purchased items with their respective attributes. ```json { "id": 1, "parentId": 1, "type": 0, "date": "2026-03-01T09:34:32.3657344+03:00", "customerPhone": "sample string 3", "cashierName": "sample string 4", "storeName": "sample string 5", "storeId": 1, "totalSum": 6.0, "positions": [ { "sum": 1.0, "totalSum": 2.0, "qnt": 3.0, "product": "sample string 4", "productName": "sample string 5", "discount": 6.0, "bonusDebit": 7.0, "bonusCredit": 8.0, "cat": "sample string 9", "ext": "sample string 10", "price": 1.0, "fc": 1.0 }, { "sum": 1.0, "totalSum": 2.0, "qnt": 3.0, "product": "sample string 4", "productName": "sample string 5", "discount": 6.0, "bonusDebit": 7.0, "bonusCredit": 8.0, "cat": "sample string 9", "ext": "sample string 10", "price": 1.0, "fc": 1.0 } ] } ``` -------------------------------- ### Get Account Information (JSON Response Example) Source: https://bonusplus.pro/api/Help/Api/GET-account This snippet demonstrates the expected JSON response structure for the GET /account endpoint. It includes fields for balance, tariff, username, a list of companies, and pricing for SMS and push messages. This format is used for both application/json and text/json content types. ```json { "balance": 1.0, "tariff": "sample string 2", "username": "sample string 3", "companies": [ { "id": "sample string 1", "name": "sample string 2" }, { "id": "sample string 1", "name": "sample string 2" } ], "smsPrice": 4.0, "pushPrice": 5.0 } ``` -------------------------------- ### Product Search Request Example (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-product-search Example of a JSON request body for the product search API. It specifies the stores to search within, the text to search for, and an option to exclude parent products. ```json { "stores": [ 1, 2 ], "text": "sample string 1", "withoutParent": true } ``` -------------------------------- ### Retail Back Response Example (JSON) Source: https://bonusplus.pro/api/Help/Api/PUT-retail-back Example of a JSON response body for the PUT /retail/back endpoint. It contains the returned purchase ID. ```json { "returnedPurchaseId": 1 } ``` -------------------------------- ### Customer Statistics Response Example (JSON) Source: https://bonusplus.pro/api/Help/Api/GET-customer-stat Example JSON response for the GET /customer/stat endpoint. It includes counts for total customers, gender distribution, SMS agreement status, promotion preferences, and e-card usage. ```json { "allCount": 1, "menCount": 2, "womanCount": 3, "othersCount": 4, "agreedToSMSCount": 5, "notAgreedToSMSCount": 6, "disablePromoCount": 7, "enablePromoCount": 8, "useEcardCount": 9, "useEcardMenCount": 10, "useEcardWomanCount": 11, "useEcardOthersCount": 12 } ``` -------------------------------- ### Retail Back Request Example (JSON) Source: https://bonusplus.pro/api/Help/Api/PUT-retail-back Example of a JSON request body for the PUT /retail/back endpoint. It specifies the external identifier, return sum, and internal position ID for the item being returned. ```json { "ext": "sample string 1", "sum": 2.0, "positionId": 1 } ``` -------------------------------- ### Retail Sale Request Example (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-retail Example JSON payload for initiating a retail sale via the POST /retail endpoint. It includes customer phone, items, bonus debit, external ID, tags, description, date, store, coupons, cashier, certificate status, reserve ID, and gift cards. ```json { "phone": "sample string 2", "items": [ { "sum": 1.0, "qnt": 2.0, "product": "sample string 3", "ds": 4.0, "cat": "sample string 5", "label": "d4c163ea-c45d-4382-afe3-edef2bb07b03", "ext": "sample string 6", "price": 1.0, "firstCost": 1.0, "costPrice": 1.0, "sellMode": "sample string 7" }, { "sum": 1.0, "qnt": 2.0, "product": "sample string 3", "ds": 4.0, "cat": "sample string 5", "label": "d4c163ea-c45d-4382-afe3-edef2bb07b03", "ext": "sample string 6", "price": 1.0, "firstCost": 1.0, "costPrice": 1.0, "sellMode": "sample string 7" } ], "bonusDebit": 3.0, "externalId": "sample string 4", "tags": [ 1, 2 ], "desc": "sample string 5", "date": "sample string 6", "store": "sample string 7", "coupons": [ "sample string 1", "sample string 2" ], "cashier": 1, "certificate": true, "reserveId": "sample string 9", "giftCards": [ { "id": "sample string 1", "paymentSum": 2.1 }, { "id": "sample string 1", "paymentSum": 2.1 } ] } ``` -------------------------------- ### Create Customer Request Body Example (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-customer This snippet demonstrates the structure of the request body for creating a new customer using the POST /customer API. The 'phone' field is mandatory, while others are optional. It includes various customer details such as contact information, loyalty card details, personal information, and related entities like relatives and significant dates. ```json { "phone": "sample string 1", "ean": "sample string 2", "regBonus": 3.0, "card": "sample string 4", "parentphone": "sample string 5", "fn": "sample string 6", "ln": "sample string 7", "mn": "sample string 8", "sex": "Female", "email": "sample string 9", "desc": "sample string 10", "birthDay": "sample string 11", "profileInstagram": "sample string 12", "profileVkontakte": "sample string 13", "profileOdnoklassniki": "sample string 14", "address": "sample string 15", "utmSource": "sample string 16", "relatives": [ { "birthDay": "sample string 1", "sex": "Female", "name": "sample string 2" }, { "birthDay": "sample string 1", "sex": "Female", "name": "sample string 2" } ], "significantDates": [ { "id": "e0c409be-8a4a-415d-9843-47c9c6e5d100", "significantDateId": "49aba722-8370-4bc2-b86d-b8a3d4b50957", "significantDateType": 3, "name": "sample string 4", "date": "2026-03-02T00:31:58.4734444+03:00", "sex": 1 }, { "id": "e0c409be-8a4a-415d-9843-47c9c6e5d100", "significantDateId": "49aba722-8370-4bc2-b86d-b8a3d4b50957", "significantDateType": 3, "name": "sample string 4", "date": "2026-03-02T00:31:58.4734444+03:00", "sex": 1 } ], "disablePromo": true, "storeId": "sample string 18", "store": "sample string 19", "cashierId": "sample string 20", "confirmed": true, "registrationSourceId": "sample string 22", "noRegNotification": true, "creditBonuses": true, "smsCreditBonuses": true } ``` -------------------------------- ### JSON Request Example for Message Pricing Source: https://bonusplus.pro/api/Help/Api/POST-messaging-price This snippet demonstrates the structure of a JSON request body for the /messaging/price API. It includes the message type and text, which are used to calculate the pricing. ```json { "type": 0, "text": "sample string 1" } ``` -------------------------------- ### GET /retail/{id} Source: https://bonusplus.pro/api/Help Returns information about a sale (check). ```APIDOC ## GET /retail/{id} ### Description Returns information about a specific sale (check). ### Method GET ### Endpoint /retail/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the sale (check). ### Request Example {} ### Response #### Success Response (200) - **sale_details** (object) - Details of the sale #### Response Example ```json { "sale_details": { "transaction_id": "txn-12345", "customer_phone": "123-456-7890", "total_amount": 50.00, "items": [ { "product_id": 123, "quantity": 1, "price": 50.00 } ] } } ``` ``` -------------------------------- ### GET /customer Source: https://bonusplus.pro/api/Help/Api/GET-customer_id_ean_phone Retrieves customer information based on provided parameters. At least one of 'id', 'ean', or 'phone' must be provided. ```APIDOC ## GET /customer ### Description Retrieves customer information by ID, loyalty card number, or phone number. Parameters are provided in the URI. ### Method GET ### Endpoint /customer ### Parameters #### Query Parameters - **id** (string) - Optional - Customer identifier. Format GUID. - **ean** (string) - Optional - Customer card number. Format EAN-8 or EAN13 (digits only). - **phone** (string) - Optional - Customer phone number. Minimum 11 digits required. ### Request Example ``` GET /customer?id=a1b2c3d4-e5f6-7890-1234-567890abcdef GET /customer?ean=12345678 GET /customer?phone=12345678901 ``` ### Response #### Success Response (200) - **phone** (string) - Customer phone number. - **id** (string) - Customer identifier in GUID format. - **discountCardTypeId** (int) - Type ID of the discount card. - **discountCardNumber** (string) - Discount card number. - **discountCardName** (string) - Name of the discount card (status). - **parentphone** (string) - Recommender's phone number. - **availableBonuses** (decimal) - Number of bonuses available for use. - **notActiveBonuses** (decimal) - Number of inactive bonuses. - **lastPurchaseDate** (datetime) - Date of the last purchase. - **firstPurchaseDate** (datetime) - Date of the first purchase. - **totalBonusCredit** (decimal) - Total bonuses credited. - **totalBonusDebit** (decimal) - Total bonuses debited. - **person** (PersonInfo) - Personal information. - **purchasesTotalSum** (decimal) - Total sum of purchases made. - **purchasesSumToNextCard** (decimal) - Purchase sum required for the next card (status). - **nextCardName** (string) - Name of the next card (status). - **regressEnabled** (bool) - Whether customer status can decrease (depends on loyalty program settings). - **bonusDebitDenided** (bool) - Whether bonus debiting is denied. - **nearestBonusesExpirationAmount** (decimal) - Amount of bonuses expiring soon. - **avgPurchasesTotal** (decimal) - Average purchase total. - **nearestBonusesExpirationDate** (string) - Date of the nearest bonus expiration. - **purchasesCount** (int) - Number of purchases made. - **confirmed** (bool) - True if the phone number is confirmed and the customer agreed to receive promotional messages. - **inviteCode** (string) - Invitation code (can be used to link customers via the recommendation system). - **registrationSourceId** (string) - Registration source identifier. - **baseDiscountPercent** (decimal) - Base discount percentage. - **baseBonusDebitPercent** (decimal) - Base bonus debit percentage. - **baseBonusCreditPercent** (decimal) - Base bonus credit percentage. - **telegramBotStatus** (int) - Telegram bot status. - **telegramBotRegistrationDate** (datetime) - Telegram bot registration date. - **maxBotStatus** (int) - Max bot status. - **maxBotRegistrationDate** (datetime) - Max bot registration date. - **eCardStatusID** (int) - eCard status ID. - **vkStatusID** (int) - VK status ID. - **disableAllMessages** (bool) - Disable all messages. - **isBlocked** (bool) - Whether the customer is blocked. - **archived** (bool) - Whether the customer is archived. - **multiplicityDebitBonus** (decimal) - The number of bonuses debited for a purchase must be a multiple of this parameter. #### Response Example ```json { "phone": "+79123456789", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "discountCardTypeId": 1, "discountCardNumber": "1234567890123", "discountCardName": "Gold", "parentphone": null, "availableBonuses": 150.75, "notActiveBonuses": 25.00, "lastPurchaseDate": "2023-10-26T10:00:00", "firstPurchaseDate": "2022-01-15T09:00:00", "totalBonusCredit": 500.00, "totalBonusDebit": 349.25, "person": { "firstName": "Иван", "lastName": "Петров", "middleName": "Сергеевич", "birthDate": "1990-05-20" }, "purchasesTotalSum": 15000.00, "purchasesSumToNextCard": 5000.00, "nextCardName": "Platinum", "regressEnabled": false, "bonusDebitDenided": false, "nearestBonusesExpirationAmount": 10.50, "avgPurchasesTotal": 1000.00, "nearestBonusesExpirationDate": "2023-11-30", "purchasesCount": 15, "confirmed": true, "inviteCode": "REF12345", "registrationSourceId": "WEB", "baseDiscountPercent": 5.0, "baseBonusDebitPercent": 10.0, "baseBonusCreditPercent": 5.0, "telegramBotStatus": 1, "telegramBotRegistrationDate": "2023-02-10T14:30:00", "maxBotStatus": 2, "maxBotRegistrationDate": "2023-03-15T11:00:00", "eCardStatusID": 1, "vkStatusID": 0, "disableAllMessages": false, "isBlocked": false, "archived": false, "multiplicityDebitBonus": 1.0 } ``` ``` -------------------------------- ### Update Customer Balance Response Example (JSON) Source: https://bonusplus.pro/api/Help/Api/PATCH-customer-phoneNumber-balance Example of a JSON response body after updating a customer's bonus balance. It provides details about the customer, card, bonus amounts, and transaction information. ```json { "phoneNumber": "sample string 1", "cardNumber": "sample string 2", "amount": 3.0, "activatedInDays": 1, "burnsInDays": 1, "activeBonusBalance": 4.0, "inactiveBonusBalance": 5.0, "level": 6, "transactionType": 0 } ``` -------------------------------- ### Create Certificate Response (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-certificate This snippet shows an example of the JSON response received after attempting to create a certificate. Currently, the response body is empty, indicating a successful operation or a placeholder for future response structures. ```json {} ``` -------------------------------- ### Bonus Activities Response Example (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-retail-bonusActivities This JSON object represents the response structure for bonus activities. It contains a list of bonus transactions and the total count of activities found. ```json { "bonusActivities": [ { "id": 1, "personId": 2, "purchaseId": 1, "amount": 3.0, "transactionType": 64, "receiptDate": "2026-03-01T07:35:38.6083468+03:00", "validUntil": "2026-03-01T07:35:38.6083468+03:00", "description": "sample string 6", "level": 1, "purchaseAmount": 1.0, "discountSum": 1.0, "bonusDebit": 1.0, "bonusCredit": 1.0, "cardName": "sample string 7", "storeId": 1, "cashierId": 1, "phoneNumber": "sample string 1", "remainAmount": 2.0, "cardNumber": 1, "purchaseNumber": 1, "transactionName": "sample string 3" }, { "id": 1, "personId": 2, "purchaseId": 1, "amount": 3.0, "transactionType": 64, "receiptDate": "2026-03-01T07:35:38.6083468+03:00", "validUntil": "2026-03-01T07:35:38.6083468+03:00", "description": "sample string 6", "level": 1, "purchaseAmount": 1.0, "discountSum": 1.0, "bonusDebit": 1.0, "bonusCredit": 1.0, "cardName": "sample string 7", "storeId": 1, "cashierId": 1, "phoneNumber": "sample string 1", "remainAmount": 2.0, "cardNumber": 1, "purchaseNumber": 1, "transactionName": "sample string 3" } ], "total": 1 } ``` -------------------------------- ### GET /ecard/{phoneNumber}/{validMinutes} Source: https://bonusplus.pro/api/Help Returns a link to download an electronic card. ```APIDOC ## GET /ecard/{phoneNumber}/{validMinutes} ### Description Returns a link to download an electronic card. ### Method GET ### Endpoint /ecard/{phoneNumber}/{validMinutes} ### Parameters #### Path Parameters - **phoneNumber** (string) - Required - Customer's phone number - **validMinutes** (integer) - Required - Validity period in minutes ### Request Example {} ### Response #### Success Response (200) - **download_link** (string) - URL to download the e-card #### Response Example ```json { "download_link": "https://example.com/ecard/download?token=xyz" } ``` ``` -------------------------------- ### JSON Response Example for Message Pricing Source: https://bonusplus.pro/api/Help/Api/POST-messaging-price This snippet illustrates the structure of a JSON response body from the /messaging/price API. It returns the calculated message count and the total price for the requested message. ```json { "count": 1, "price": 2.0 } ``` -------------------------------- ### Bonus Activities Filter Request Example (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-retail-bonusActivities This JSON object demonstrates the structure for filtering bonus activities. It includes parameters for date ranges, customer identification (phone, PersonsId, cardNumber), transaction type, and pagination. ```json { "creationDate": { "from": "2026-03-01T07:35:38.6083468+03:00", "to": "2026-03-01T07:35:38.6083468+03:00" }, "validUntil": { "from": "2026-03-01T07:35:38.6083468+03:00", "to": "2026-03-01T07:35:38.6083468+03:00" }, "phone": "sample string 2", "PersonsId": [ 1, 2 ], "cardNumber": "sample string 3", "transactionType": 1, "startRow": 1, "rowCount": 1, "sort": 4 } ``` -------------------------------- ### POST /customer Source: https://bonusplus.pro/api/Help Creates a new customer. ```APIDOC ## POST /customer ### Description Creates a new customer record in the system. ### Method POST ### Endpoint /customer ### Parameters #### Request Body - **name** (string) - Required - Customer's name - **phone** (string) - Required - Customer's phone number - **email** (string) - Optional - Customer's email address ### Request Example ```json { "name": "John Doe", "phone": "123-456-7890", "email": "john.doe@example.com" } ``` ### Response #### Success Response (201) - **customer_id** (integer) - The ID of the newly created customer. #### Response Example ```json { "customer_id": 12345 } ``` ``` -------------------------------- ### POST /websites/bonusplus_pro_api/CreateCustomer Source: https://bonusplus.pro/api/Help/ResourceModel_modelName=CreateCustomer Endpoint for creating a new customer. It accepts a JSON payload with customer details. ```APIDOC ## POST /websites/bonusplus_pro_api/CreateCustomer ### Description Endpoint for creating a new customer. It accepts a JSON payload with customer details. ### Method POST ### Endpoint /websites/bonusplus_pro_api/CreateCustomer ### Parameters #### Request Body - **phone** (string) - Required - Phone number of the client. Format is not important. Must contain at least 11 digits. - **ean** (string) - Optional - Client card number. EAN-8 or EAN13 format (digits only). - **regBonus** (decimal) - Optional - Number of starting bonuses. - **card** (string) - Optional - Name of the client's card (status). - **parentphone** (string) - Optional - Recommender's phone number. Format is not important. Must contain at least 11 digits. - **fn** (string) - Optional - First name. - **ln** (string) - Optional - Last name. - **mn** (string) - Optional - Middle name. - **sex** (SexEnum) - Optional - Gender. - **email** (string) - Optional - Email address. - **desc** (string) - Optional - Note. - **birthDay** (string) - Optional - Date of birth in DD.MM.YYYY format. - **profileInstagram** (string) - Optional - Link to Instagram. - **profileVkontakte** (string) - Optional - Link to VKontakte page. - **profileOdnoklassniki** (string) - Optional - Link to Odnoklassniki page. - **address** (string) - Optional - Address. - **utmSource** (string) - Optional - Advertising source. - **relatives** (Array PersonRelative) - Optional - Relatives (close ones). - **significantDates** (Array SignificantDate) - Optional - Significant dates. - **disablePromo** (bool) - Optional - Disable promotional messages. - **storeId** (string) - Optional - Store identifier. - **store** (string) - Optional - Store name. - **cashierId** (string) - Optional - Cashier identifier. - **registrationSourceId** (string) - Optional - Registration source identifier. - **noRegNotification** (bool) - Optional - Disables sending a registration message to the client. - **creditBonuses** (bool) - Optional - Accrue bonus gifts. - **smsCreditBonuses** (bool) - Optional - Send a message about bonus gifts for registration. ### Request Example ```json { "phone": "+12345678901", "ean": "12345678", "regBonus": 100.50, "card": "Gold", "parentphone": "+19876543210", "fn": "Иван", "ln": "Иванов", "mn": "Иванович", "sex": "male", "email": "ivan.ivanov@example.com", "desc": "VIP клиент", "birthDay": "01.01.1990", "profileInstagram": "https://instagram.com/ivanov", "profileVkontakte": "https://vk.com/ivanov", "profileOdnoklassniki": "https://ok.ru/ivanov", "address": "г. Москва, ул. Примерная, д. 1", "utmSource": "google_ads", "relatives": [], "significantDates": [], "disablePromo": false, "storeId": "store123", "store": "Центральный магазин", "cashierId": "cashier456", "registrationSourceId": "source789", "noRegNotification": false, "creditBonuses": true, "smsCreditBonuses": true } ``` ### Response #### Success Response (200) - **message** (string) - Description of the success message. #### Response Example ```json { "message": "Customer created successfully." } ``` ``` -------------------------------- ### E-card Download Link Response (JSON) Source: https://bonusplus.pro/api/Help/Api/GET-ecard-phoneNumber-validMinutes Example JSON response for the GET /ecard/{phoneNumber}/{validMinutes} endpoint. It contains a single field, 'url', which is a string representing the download link for the e-card. This response is typically returned after a successful request. ```json { "url": "sample string 1" } ``` -------------------------------- ### POST /product/list Source: https://bonusplus.pro/api/Help Returns a list of products based on a filter. ```APIDOC ## POST /product/list ### Description Returns a list of products based on the specified filter. The maximum number of returned products per request is 1000. ### Method POST ### Endpoint /product/list ### Parameters #### Request Body - **filter** (object) - Optional - Filter criteria - **limit** (integer) - Optional - Maximum number of products to return (default: 1000) ### Request Example ```json { "filter": { "category": "Electronics" }, "limit": 50 } ``` ### Response #### Success Response (200) - **products** (array) - List of product objects #### Response Example ```json { "products": [ { "product_id": 123, "name": "Laptop", "price": 1200.00 }, { "product_id": 456, "name": "Mouse", "price": 25.00 } ] } ``` ``` -------------------------------- ### Generate Certificate Number Response Example (JSON) Source: https://bonusplus.pro/api/Help/Api/GET-certificate-number This JSON object represents the successful response when requesting a new certificate number. It contains a single field, 'number', which holds the generated unique identifier as a string. ```json { "number": "sample string 1" } ``` -------------------------------- ### Example JSON Response for Webhook Subscription Source: https://bonusplus.pro/api/Help/Api/GET-webhook-subscription-id This snippet shows a sample JSON response for retrieving a webhook subscription. It includes all the fields defined in the WebHook_Subscription object, such as the subscription ID, creation time, event ID, URL, HTTP method, content type, and authorization details. ```json { "id": "sample string 1", "createTime": "2026-03-02T00:31:57.9735645+03:00", "eventId": "sample string 3", "url": "sample string 4", "httpMethod": "sample string 5", "contentType": "sample string 6", "authorization": "sample string 7" } ``` -------------------------------- ### POST /customer/login Source: https://bonusplus.pro/api/Help Logs a customer into their personal account. ```APIDOC ## POST /customer/login ### Description Logs a customer into their personal account. Returns customer information upon successful login. ### Method POST ### Endpoint /customer/login ### Parameters #### Request Body - **phone** (string) - Required - Customer's phone number - **password** (string) - Required - Customer's password ### Request Example ```json { "phone": "123-456-7890", "password": "password123" } ``` ### Response #### Success Response (200) - **customer_info** (object) - Customer information #### Response Example ```json { "customer_info": { "id": 12345, "name": "John Doe", "phone": "123-456-7890", "balance": 1000 } } ``` ``` -------------------------------- ### GET /webhook/subscription/{id} Source: https://bonusplus.pro/api/Help/Api/GET-webhook-subscription-id Retrieves a webhook subscription by its unique identifier. ```APIDOC ## GET /webhook/subscription/{id} ### Description Retrieves a webhook subscription by its unique identifier. ### Method GET ### Endpoint /webhook/subscription/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the webhook subscription. ### Response #### Success Response (200) - **id** (string) - The subscription identifier. - **createTime** (datetime) - The time the subscription was created. - **eventId** (string) - The identifier of the event the subscription is for. - **url** (string) - The URL of the event handler. - **httpMethod** (string) - The HTTP method to be used for event delivery. - **contentType** (string) - The 'Content-Type' header value for event delivery. - **authorization** (string) - The 'Authorization' header value for event delivery. #### Response Example ```json { "id": "sample string 1", "createTime": "2026-03-02T00:31:57.9735645+03:00", "eventId": "sample string 3", "url": "sample string 4", "httpMethod": "sample string 5", "contentType": "sample string 6", "authorization": "sample string 7" } ``` ``` -------------------------------- ### GET /certificate/{id} Source: https://bonusplus.pro/api/Help/Api/GET-certificate-id Retrieves a specific certificate using its unique identifier. ```APIDOC ## GET /certificate/{id} ### Description Retrieves a specific certificate by its ID. ### Method GET ### Endpoint /certificate/{id} ### Parameters #### Path Parameters - **id** (GUID) - Required - The unique identifier of the certificate. ### Response #### Success Response (200) - **id** (GUID) - The unique identifier of the certificate. - **name** (string) - The name of the certificate. - **expireDate** (datetime) - The expiration date of the certificate. - **status** (GiftCardStatus) - The current status of the certificate. - **currentBalance** (decimal) - The current balance of the certificate. - **initialBalance** (decimal) - The initial balance of the certificate. #### Response Example ```json { "id": "a7a3d87e-f1b5-4347-8f56-b0c3533e59ab", "name": "sample string 2", "expireDate": "2026-03-01T07:35:39.8270975+03:00", "status": "CAN_BE_USED", "currentBalance": 1.1, "initialBalance": 1.1 } ``` ``` -------------------------------- ### GET /certificate/number Source: https://bonusplus.pro/api/Help/Api/GET-certificate-number Generates a unique certificate number. This endpoint is useful for creating new certificates with distinct identifiers. ```APIDOC ## GET /certificate/number ### Description Generates a unique certificate number. ### Method GET ### Endpoint /certificate/number ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **number** (string) - The generated unique certificate number. #### Response Example ```json { "number": "sample string 1" } ``` ``` -------------------------------- ### POST /retail Source: https://bonusplus.pro/api/Help Processes a sale in BonusPlus. ```APIDOC ## POST /retail ### Description Processes a sale in the BonusPlus system. ### Method POST ### Endpoint /retail ### Parameters #### Request Body - **sale_details** (object) - Required - Details of the sale ### Request Example ```json { "sale_details": { "customer_phone": "123-456-7890", "total_amount": 50.00, "items": [ { "product_id": 123, "quantity": 1, "price": 50.00 } ] } } ``` ### Response #### Success Response (200) - **transaction_id** (string) - The ID of the transaction #### Response Example ```json { "transaction_id": "txn-12345" } ``` ``` -------------------------------- ### GET /retail/{id} Source: https://bonusplus.pro/api/Help/Api/GET-retail-id Retrieves detailed information about a specific retail sale (receipt) using its unique identifier. ```APIDOC ## GET /retail/{id} ### Description Retrieves detailed information about a specific retail sale (receipt) using its unique identifier. ### Method GET ### Endpoint /retail/{id} ### Parameters #### Path Parameters - **id** (int) - Required - The unique identifier of the sale (receipt). ### Response #### Success Response (200) - **id** (int) - The receipt number. - **parentId** (int) - The receipt number for a return transaction. - **type** (SaleType) - The type of receipt (sale or return). - **date** (datetime) - The date of the receipt. - **customerPhone** (string) - The customer's phone number. - **cashierName** (string) - The name of the cashier. - **storeName** (string) - The name of the store. - **storeId** (int) - The ID of the store. - **totalSum** (decimal) - The total sum of the receipt. - **positions** (Array of SaleItem) - The items included in the receipt. #### Response Example ```json { "id": 1, "parentId": 1, "type": 0, "date": "2026-03-01T09:34:32.3657344+03:00", "customerPhone": "sample string 3", "cashierName": "sample string 4", "storeName": "sample string 5", "storeId": 1, "totalSum": 6.0, "positions": [ { "sum": 1.0, "totalSum": 2.0, "qnt": 3.0, "product": "sample string 4", "productName": "sample string 5", "discount": 6.0, "bonusDebit": 7.0, "bonusCredit": 8.0, "cat": "sample string 9", "ext": "sample string 10", "price": 1.0, "fc": 1.0 }, { "sum": 1.0, "totalSum": 2.0, "qnt": 3.0, "product": "sample string 4", "productName": "sample string 5", "discount": 6.0, "bonusDebit": 7.0, "bonusCredit": 8.0, "cat": "sample string 9", "ext": "sample string 10", "price": 1.0, "fc": 1.0 } ] } ``` ``` -------------------------------- ### GET /ecard/{phoneNumber}/{validMinutes} Source: https://bonusplus.pro/api/Help/Api/GET-ecard-phoneNumber-validMinutes Retrieves a download link for an e-card based on the provided phone number and validity duration. ```APIDOC ## GET /ecard/{phoneNumber}/{validMinutes) ### Description Returns a download link for an electronic card. ### Method GET ### Endpoint /ecard/{phoneNumber}/{validMinutes} ### Parameters #### Path Parameters - **phoneNumber** (string) - Required - The client's phone number. The format does not matter. Must contain at least 11 digits. - **validMinutes** (decimal) - Required - The validity period of the link in minutes. ### Response #### Success Response (200) - **url** (string) - The link for downloading the electronic card. #### Response Example ```json { "url": "sample string 1" } ``` ``` -------------------------------- ### GET /account Source: https://bonusplus.pro/api/Help/Api/GET-account Retrieves information about the user's BonusPlus account, including balance, tariff, username, associated companies, and pricing for SMS and push notifications. ```APIDOC ## GET /account ### Description Retrieves information about the BonusPlus account. ### Method GET ### Endpoint /account ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **balance** (decimal) - The monetary funds in the personal account balance. - **tariff** (string) - The text description of the current tariff in the personal account. - **username** (string) - The username (login) of the personal account. - **companies** (array of DictItem) - A list of businesses (companies) associated with the account. Each company has its own loyalty program and client base. - **smsPrice** (decimal) - The cost of one SMS message. - **pushPrice** (decimal) - The cost of one push notification. #### Response Example ```json { "balance": 1.0, "tariff": "sample string 2", "username": "sample string 3", "companies": [ { "id": "sample string 1", "name": "sample string 2" }, { "id": "sample string 1", "name": "sample string 2" } ], "smsPrice": 4.0, "pushPrice": 5.0 } ``` ``` -------------------------------- ### Product Import Source: https://bonusplus.pro/api/Help/ResourceModel_modelName=ProductImport Imports a list of products into a specified store. The request body should contain an array of products and the store name. ```APIDOC ## POST /websites/bonusplus_pro_api/import/products ### Description Imports a list of products into a specified store. The request body should contain an array of products and the store name. ### Method POST ### Endpoint /websites/bonusplus_pro_api/import/products ### Parameters #### Request Body - **products** (Array[ProductTiny]) - Required - List of products to import. - **store** (string) - Required - Name of the store to import products into. ### Request Example ```json { "products": [ { "id": "123", "name": "Example Product", "price": 19.99 } ], "store": "My Online Store" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the import operation. - **message** (string) - Provides details about the import result. #### Response Example ```json { "status": "success", "message": "Products imported successfully." } ``` ``` -------------------------------- ### GET /customer/{phoneNumber}/balance/reserve/{id} Source: https://bonusplus.pro/api/Help/Api/GET-customer-phoneNumber-balance-reserve-id Retrieves information about reserved bonuses for a customer's account using their phone number and a reserve ID. ```APIDOC ## GET /customer/{phoneNumber}/balance/reserve/{id} ### Description Retrieves information about reserved bonuses for a customer's account. ### Method GET ### Endpoint /customer/{phoneNumber}/balance/reserve/{id} #### Path Parameters - **phoneNumber** (string) - Required - The phone number of the customer. - **id** (string) - Required - The ID of the reserve from the external system. ### Response #### Success Response (200) - **phone** (string) - The customer's phone number. The format does not matter. Must contain at least 11 digits. - **id** (string) - The reserve identifier. Usually, it is the document identifier (receipt, order) from the external system. Must be unique. - **amount** (decimal) - The number of bonuses. If positive, bonuses are reserved. If negative, bonuses are released from the reserve. #### Response Example ```json { "phone": "sample string 1", "id": "sample string 2", "amount": 3.0 } ``` ``` -------------------------------- ### Send Message Request Example (JSON) Source: https://bonusplus.pro/api/Help/Api/POST-customer-phoneNumber-sendMessage Example of a JSON request body for sending a message to a customer. It includes the message text and the desired route for delivery. ```json { "message": "sample string 1", "route": [ 0, 0 ] } ``` -------------------------------- ### GET /webhook/subscriptions Source: https://bonusplus.pro/api/Help/Api/GET-webhook-subscriptions Retrieves all subscriptions for all events. ```APIDOC ## GET /webhook/subscriptions ### Description Returns all subscriptions for all events. ### Method GET ### Endpoint /webhook/subscriptions ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **id** (string) - The ID of the subscription. - **createTime** (datetime) - The creation time of the subscription. - **eventId** (string) - The ID of the event the subscription applies to. - **url** (string) - The URL of the event handler. - **httpMethod** (string) - The HTTP method to be used when delivering the event. - **contentType** (string) - The value of the "Content-Type" header to be used when delivering the event. - **authorization** (string) - The value of the "Authorization" header to be used when delivering the event. #### Response Example ```json [ { "id": "sub_123abc", "createTime": "2023-10-27T10:00:00Z", "eventId": "evt_456def", "url": "https://example.com/webhook", "httpMethod": "POST", "contentType": "application/json", "authorization": "Bearer your_token" } ] ``` ```