### Carthage Cartfile Configuration Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/README.md Example Cartfile entry for integrating the binary framework. ```text binary "https://raw.githubusercontent.com/BlinkReceipt/blinkreceipt-ios/master/BlinkReceiptStatic.json" ~> 1.27 ``` -------------------------------- ### Import BlinkReceipt SDK Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/index.html Import the BlinkReceipt SDK at the top of your AppDelegate.m file. Use BlinkReceiptStatic for Carthage or standalone installations. ```objective-c #import ``` ```objective-c #import ``` -------------------------------- ### CocoaPods Podfile Configuration Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/README.md Example Podfile configuration requiring the private BlinkReceipt spec repository. ```ruby #You must include this additional source as the BlinkReceipt pod is hosted in a private spec repository source 'https://github.com/BlinkReceipt/PodSpecRepo.git' source 'https://cdn.cocoapods.org/' platform :ios, '15.0' target 'YourTarget' do use_frameworks! pod 'BlinkReceipt', '~> 1.27' end ``` -------------------------------- ### Start Prepackaged Scanning Experience Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/index.html Initiate the SDK's prepackaged scanning experience from an IBAction handler. Ensure your view controller conforms to BRScanResultsDelegate. ```objective-c - (IBAction)btnTouched:(id)sender { BRScanOptions *scanOptions = [BRScanOptions new]; [[BRScanManager sharedManager] startStaticCameraFromController:self cameraType:BRCameraUXStandard scanOptions:scanOptions withDelegate:self]; } ``` -------------------------------- ### Start Enhanced Camera Controller Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/enhanced-camera-ux.html Initiates the camera scan session using the enhanced UX configuration. ```Objective-C - (IBAction)btnTouched:(id)sender { BRScanOptions *scanOptions = [BRScanOptions new]; [[BRScanManager sharedManager] startStaticCameraFromController:self cameraType:BRCameraUXEnhanced scanOptions:scanOptions withDelegate:self]; } ``` -------------------------------- ### Start Custom Camera (Modal) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Initiates a scanning session using a custom subclass of BRCameraViewController, presented modally. ```APIDOC ## POST /startCustomCamera ### Description Initiates a scanning session using your own subclass of `BRCameraViewController` which is presented as modal from the supplied `UIViewController`. ### Method POST ### Endpoint /startCustomCamera ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **customController** (BRCameraViewController) - Required - Your custom subclass of `BRCameraViewController`. - **viewController** (UIViewController) - Required - The parent view controller from which to display the camera controller modally. - **scanOptions** (BRScanOptions) - Optional - An instance of `BRScanOptions` specifying options for this scanning session. - **delegate** (NSObject) - Required - An instance conforming to `BRScanResultsDelegate`. ### Request Example ```json { "customController": "", "viewController": "", "scanOptions": { "": "" }, "delegate": "" } ``` ### Response #### Success Response (200) This method does not return a value directly. Results are delivered to the delegate. #### Response Example None ``` -------------------------------- ### Start Enhanced Camera UX - Objective-C Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/enhanced-camera-ux.html Initiates the enhanced static camera interface. Ensure BRScanOptions are configured as needed. The delegate will receive scan results. ```objective-c - (IBAction)btnTouched:(id)sender { BRScanOptions *scanOptions = [BRScanOptions new]; [[BRScanManager sharedManager] startStaticCameraFromController:self cameraType:BRCameraUXEnhanced scanOptions:scanOptions withDelegate:self]; } ``` -------------------------------- ### Start Static Camera Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Initiates a static camera scanning experience where the user appears to be snapping static photos. ```APIDOC ## POST /startStaticCamera ### Description Initiates a static camera scanning experience (in which the user appears to be snapping static photos). ### Method POST ### Endpoint /startStaticCamera ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **viewController** (UIViewController) - Required - The parent view controller from which to display the camera controller modally. - **cameraType** (BRCameraType) - Required - User can choose to use standard (old) or enhanced (latest) camera UI. - **scanOptions** (BRScanOptions) - Optional - An instance of `BRScanOptions` specifying options for this scanning session. - **delegate** (NSObject) - Required - An instance conforming to `BRScanResultsDelegate`. ### Request Example ```json { "viewController": "", "cameraType": "standard" or "enhanced", "scanOptions": { "": "" }, "delegate": "" } ``` ### Response #### Success Response (200) This method does not return a value directly. Results are delivered to the delegate. #### Response Example None ``` -------------------------------- ### Initialize and Use BRScanManager Source: https://context7.com/blinkreceipt/blinkreceipt-ios/llms.txt Use the BRScanManager singleton to configure credentials, start camera sessions, or process existing images. ```swift import BlinkReceipt // Initialize SDK with license key BRScanManager.shared().licenseKey = "YOUR_LICENSE_KEY" BRScanManager.shared().prodIntelKey = "YOUR_PRODUCT_INTELLIGENCE_KEY" // Configure scan options let scanOptions = BRScanOptions() scanOptions.retailerId = .walmart scanOptions.countryCode = "US" scanOptions.detectDuplicates = true // Start scanning with built-in camera BRScanManager.shared().startStaticCamera( from: self, scanOptions: scanOptions, with: self ) // Or scan existing images let images = [UIImage(named: "receipt1")!, UIImage(named: "receipt2")!] BRScanManager.shared().scan(images, scanOptions: scanOptions) { scanResults in guard let results = scanResults else { return } print("Merchant: \(results.retailerId.value)") print("Total: \(results.total?.value ?? 0)") print("Products: \(results.products?.count ?? 0)") } ``` -------------------------------- ### GET /getPromotions Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Retrieves targeted and general promotions for the current user. ```APIDOC ## GET /getPromotions ### Description Retrieves targeted and general promotions for current user. ### Method GET ### Endpoint `/getPromotions` ### Response #### Success Response (200) - **promos** (Array) - An array of promotion info objects for the current user. ``` -------------------------------- ### Start Custom Camera Modally Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Initiates a scanning session using a custom BRCameraViewController subclass presented modally from a parent view controller. ```Objective-C - (void)startCustomCamera:(nonnull BRCameraViewController *)customController fromController:(nonnull UIViewController *)viewController scanOptions:(nullable BRScanOptions *)scanOptions withDelegate:(nonnull NSObject *)delegate; ``` ```Swift func startCustomCamera(_ customController: BRCameraViewController, from viewController: UIViewController, scanOptions: BRScanOptions?, with delegate: any BRScanResultsDelegate) ``` -------------------------------- ### Start a Survey with Prepackaged Controller Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/surveys.html Initiate a survey using the prepackaged controller. Pass a BRSurvey object to be displayed. The completion block is called upon survey completion or cancellation. ```objective-c -[BRScanManager startSurvey:fromViewController:withCompletion:] ``` -------------------------------- ### Get Promotions (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Retrieve targeted and general promotions for the current user asynchronously. Returns an optional array of promotion info objects. ```Swift func promotions() async -> [BRPromotionInfo]? ``` -------------------------------- ### Get Promotions (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Retrieve targeted and general promotions for the current user. The completion handler is invoked with an array of promotion info objects. ```Objective-C - (void)getPromotionsWithCompletion: (nonnull void (^)(NSArray *_Nullable))completion; ``` -------------------------------- ### Start a Scan Session with a Custom Controller Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/custom-camera-controller.html Initiates a scan session using a custom camera controller instance. Ensure the controller is properly instantiated before calling this method. ```objective-c MyCameraController *cameraController = [MyCameraController new]; //or instantiate from storyboard [[BRScanManager sharedManager] startCustomCamera:cameraController fromController:self scanOptions:scanOptions withDelegate:self]; ``` -------------------------------- ### BRSurvey Start Date Property Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRSurvey.html Objective-C declaration for the survey's start date, which can be nil. Swift equivalent is also provided. ```Objective-C @property (nonatomic, strong, readonly, nullable) NSDate *startDate; ``` ```Swift var startDate: Date? { get } ``` -------------------------------- ### Start Static Camera Scan (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Initiates a static camera scanning experience. Use this when the user appears to be snapping static photos. Requires a parent view controller, camera type, optional scan options, and a delegate for results. ```objective-c - (void) startStaticCameraFromController:(nonnull UIViewController *)viewController cameraType:(BRCameraType)cameraType scanOptions:(nullable BRScanOptions *)scanOptions withDelegate: (nonnull NSObject *)delegate; ``` -------------------------------- ### Start Custom Camera Scan (Modal) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Initiates a scanning session using a custom subclass of BRCameraViewController. This custom controller is presented modally from a provided view controller. ```APIDOC ## POST /api/scan/custom/modal ### Description Initiates a scanning session using your own subclass of `[BRCameraViewController](../Classes/BRCameraViewController.html)` which is presented as modal from the supplied `UIViewController`. ### Method POST ### Endpoint /api/scan/custom/modal ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **customController** (BRCameraViewController) - Required - Your custom subclass of `[BRCameraViewController](../Classes/BRCameraViewController.html)`. - **viewController** (UIViewController) - Required - The parent view controller from which to display the camera controller modally. - **scanOptions** (BRScanOptions) - Optional - An instance of `[BRScanOptions](../Classes/BRScanOptions.html)` specifying options for this scanning session. - **delegate** (NSObject) - Required - An instance conforming to `[BRScanResultsDelegate](../Protocols/BRScanResultsDelegate.html)`. ### Request Example ```json { "customController": "", "viewController": "", "scanOptions": { "": "" }, "delegate": "" } ``` ### Response #### Success Response (200) This method does not return a value directly. Results are delivered to the delegate. #### Response Example None ``` -------------------------------- ### Start Custom Scan Session with BRCameraViewController Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/custom-camera-controller.html Use this method to begin a scan session with your custom camera controller. Ensure you have instantiated your custom controller and provided necessary parameters like the presenting controller, scan options, and a delegate. ```objective-c MyCameraController *cameraController = [MyCameraController new]; //or instantiate from storyboard [[BRScanManager sharedManager] startCustomCamera:cameraController fromController:self scanOptions:scanOptions withDelegate:self]; ``` -------------------------------- ### Start Static Camera Scan (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Initiates a static camera scanning experience. Use this when the user appears to be snapping static photos. Requires a parent view controller, camera type, optional scan options, and a delegate for results. ```swift func startStaticCamera(from viewController: UIViewController, cameraType: BRCameraType, scanOptions: BRScanOptions?, with delegate: any BRScanResultsDelegate) ``` -------------------------------- ### Start Static Camera Scan Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Initiates a static camera scanning experience where the user appears to be snapping static photos. This method presents a camera view controller modally. ```APIDOC ## POST /api/scan/static ### Description Initiates a static camera scanning experience (in which the user appears to be snapping static photos). ### Method POST ### Endpoint /api/scan/static ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **viewController** (UIViewController) - Required - The parent view controller from which to display the camera controller modally. - **cameraType** (BRCameraType) - Required - User can choose to use standard (old) or enhanced (latest) camera UI. - **scanOptions** (BRScanOptions) - Optional - An instance of `[BRScanOptions](../Classes/BRScanOptions.html)` specifying options for this scanning session. - **delegate** (NSObject) - Required - An instance conforming to `[BRScanResultsDelegate](../Protocols/BRScanResultsDelegate.html)`. ### Request Example ```json { "viewController": "", "cameraType": "standard" | "enhanced", "scanOptions": { "": "" }, "delegate": "" } ``` ### Response #### Success Response (200) This method does not return a value directly. Results are delivered to the delegate. #### Response Example None ``` -------------------------------- ### Handle Lighting Condition Callback Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRCameraViewController.html Implement this method to receive updates on the current lighting condition detected by the camera. No specific setup is required beyond conforming to the delegate protocol. ```Objective-C - (void)didGetLightingCondition:(BRLightingCondition)lightingCondition; ``` ```Swift func didGet(_ lightingCondition: BRLightingCondition) ``` -------------------------------- ### Start Custom Camera Scan (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Initiates a scanning session using a custom subclass of BRCameraViewController. This custom controller is presented modally from the supplied UIViewController. Requires the custom controller, parent view controller, optional scan options, and a delegate. ```objective-c - (void)startCustomCamera:(nonnull BRCameraViewController *)customController fromController:(nonnull UIViewController *)viewController scanOptions:(nullable BRScanOptions *)scanOptions withDelegate:(nonnull NSObject *)delegate; ``` -------------------------------- ### Start Receipt Correction (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Begins the receipt correction flow for a receipt stored on disk. The completion callback is invoked when the flow ends. ```objective-c - (void)startReceiptCorrection:(nonnull NSString *)blinkReceiptId fromViewController:(nonnull UIViewController *)vc withCountryCode:(nullable NSString *)countryCode withCustomFont:(nullable UIFont *)customFont withCompletion: (nullable void (^)(BRScanResults *_Nullable, NSError *_Nullable))completion; ``` -------------------------------- ### Start Custom Camera Scan (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Initiates a scanning session using a custom subclass of BRCameraViewController. This custom controller is presented modally from the supplied UIViewController. Requires the custom controller, parent view controller, optional scan options, and a delegate. ```swift func startCustomCamera(_ customController: BRCameraViewController, from viewController: UIViewController, scanOptions: BRScanOptions?, with delegate: any BRScanResultsDelegate) ``` -------------------------------- ### Start Receipt Correction (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Begins the receipt correction flow for a receipt stored on disk. This function is asynchronous and throws errors on failure. ```swift func startReceiptCorrection(_ blinkReceiptId: String, from vc: UIViewController, withCountryCode countryCode: String?, withCustomFont customFont: UIFont?) async throws -> BRScanResults ``` -------------------------------- ### BRCameraViewController - didGetLightingCondition: Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRCameraViewController.html When `[BRScanOptions.manualTorchControl](../Classes/BRScanOptions.html#/c:objc(cs)BRScanOptions(py)manualTorchControl)` is enabled, this callback will indicate to the client VC if the SDK detects a new lighting condition. Note: Lighting is assumed to start in `BRLightingConditionTerrible`, so there will never be a callback with that passed as a parameter, rather we only upgrade the lighting to `BRLightingConditionLow` or `BRLightingConditionGood`. ```APIDOC ## didGetLightingCondition: ### Description When `[BRScanOptions.manualTorchControl](../Classes/BRScanOptions.html#/c:objc(cs)BRScanOptions(py)manualTorchControl)` is enabled, this callback will indicate to the client VC if the SDK detects a new lighting condition. Note: Lighting is assumed to start in `BRLightingConditionTerrible`, so there will never be a callback with that passed as a parameter, rather we only upgrade the lighting to `BRLightingConditionLow` or `BRLightingConditionGood`. ### Method Objective-C: - (void)didGetLightingCondition:(BRLightingCondition)lightingCondition; Swift: func didGetLightingCondition(_ lightingCondition: BRLightingCondition) ### Parameters - **lightingCondition** (BRLightingCondition) - The newly detected lighting condition. Possible values are `BRLightingConditionLow` or `BRLightingConditionGood`. ``` -------------------------------- ### BRErrorScanInProgress Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Enums/BRErrorCodes.html Indicates that a scan is currently in progress and cannot be interrupted or started again. ```APIDOC ## BRErrorScanInProgress ### Description This error code signifies that a scanning operation is already active, and a new scan cannot be initiated until the current one is completed or cancelled. ### Declaration #### Objective-C ```objectivec BRErrorScanInProgress ``` #### Swift ```swift case scanInProgress = 4 ``` ``` -------------------------------- ### GET /getSurveys Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Retrieves surveys available for the current user. ```APIDOC ## GET /getSurveys ### Description Retrieves surveys for current user. ### Method GET ### Endpoint `/getSurveys` ### Response #### Success Response (200) - **surveys** (Array) - An array of survey objects for the current user. ``` -------------------------------- ### startSurvey Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Displays a given survey using the prepackaged flow. ```APIDOC ## startSurvey ### Description Displays a given survey using the prepackaged flow. ### Parameters - **survey** (BRSurvey) - The survey to display. - **viewController** (UIViewController) - The view controller from which to display the survey. - **completion** (void (^)(BOOL)) - Callback invoked after the user has completed or cancelled the survey. ### Response - **cancelled** (BOOL) - Whether the user cancelled the survey or not. ``` -------------------------------- ### GET /getResultsForReceiptCorrection Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Retrieves scan results for a specific receipt, allowing for user corrections. ```APIDOC ## GET /getResultsForReceiptCorrection ### Description Retrieve results from disk or remotely for a specific receipt for custom user corrections flow. ### Method GET ### Endpoint `/getResultsForReceiptCorrection` ### Parameters #### Query Parameters - **blinkReceiptId** (string) - Required - The receipt id to load from disk. ### Response #### Success Response (200) - **results** (BRScanResults) - The scan results associated with this `blinkReceiptId`. - **images** (Array) - The images associated with this `blinkReceiptId`. ``` -------------------------------- ### Get loyalty member number Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanResults.html Retrieves the loyalty member number detected on the receipt, if available. ```Objective-C @property (nonatomic, strong, readonly) NSString *memberNumber; ``` ```Swift var memberNumber: String! { get } ``` -------------------------------- ### POST /startCustomCamera Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/custom-camera-controller.html Initiates a scan session using a custom camera controller implementation. ```APIDOC ## [METHOD] startCustomCamera ### Description Begins a scan session with a custom controller instance. ### Parameters - **cameraController** (MyCameraController) - Required - The custom camera controller instance. - **fromController** (UIViewController) - Required - The presenting view controller. - **scanOptions** (ScanOptions) - Required - Configuration options for the scan. - **withDelegate** (id) - Required - The delegate to receive scan events. ### Request Example MyCameraController *cameraController = [MyCameraController new]; [[BRScanManager sharedManager] startCustomCamera:cameraController fromController:self scanOptions:scanOptions withDelegate:self]; ``` -------------------------------- ### Get Next Question Index Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRSurveyQuestion.html Objective-C method to retrieve the index of the next question in a survey flow. Returns -1 if there are no more questions. ```Objective-C - (NSInteger)getNextQuestionIndex; ``` -------------------------------- ### Configure and Validate Promotions Source: https://context7.com/blinkreceipt/blinkreceipt-ios/llms.txt Enable promotion validation by setting `validatePromotions` to `true` and providing an array of promotion slugs in `BRScanOptions`. The `didFinishScanning` callback can then be used to check which promotions were qualified. ```swift // Configure promotion validation let scanOptions = BRScanOptions() scanOptions.validatePromotions = true scanOptions.promotionSlugs = ["summer-sale-2024", "bogo-special"] BRScanManager.shared().startStaticCamera( from: self, scanOptions: scanOptions, with: self ) // Check promotion results func didFinishScanning(_ cameraVC: UIViewController!, with results: BRScanResults!) { cameraVC.dismiss(animated: true) // Check promotion qualification if let promotions = results.promotions { for promo in promotions { let slug = promo.slug let qualified = promo.isQualified if let qualifiedProducts = promo.qualifiedProducts { for product in qualifiedProducts { print("Qualified: \(product.productDescription?.value ?? "")") } } print("Promotion '\(slug ?? "")' qualified: \(qualified)") } } } ``` -------------------------------- ### Start Receipt Correction Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Begins the receipt correction flow for a receipt stored on disk. This method is used to allow users to correct scanned receipt information. ```APIDOC ## POST /api/receipts/{blinkReceiptId}/correct ### Description Initiates the receipt correction flow for a previously scanned receipt. ### Method POST ### Endpoint /api/receipts/{blinkReceiptId}/correct ### Parameters #### Path Parameters - **blinkReceiptId** (string) - Required - The ID of the receipt to correct. This ID must be within the `daysToStoreReceiptData` period. #### Query Parameters - **countryCode** (string) - Optional - The current country, which aids in barcode scanning. - **customFont** (UIFont) - Optional - A custom font to style all elements within the correction flow. #### Request Body None ### Request Example (No request body, parameters are in path and query) ### Response #### Success Response (200) - **scanResults** (object) - If the correction flow is successful, this object contains the parsed receipt results. - **error** (object) - If the correction flow fails, this indicates the reason. #### Response Example ```json { "scanResults": { "merchantName": "Corrected Store", "totalAmount": 120.75, "currency": "USD" }, "error": null } ``` ``` -------------------------------- ### BRMissedEarningsBaseViewController Methods Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRMissedEarningsBaseViewController.html Methods for handling barcode detection, UPC lookup, and camera torch control. ```APIDOC ## BRMissedEarningsBaseViewController Methods ### didDetectBarcode: Override this method to be notified when a barcode is detected. Supports 12 digit and 6 digit UPC’s. #### Declaration Objective-C ```objc - (void)didDetectBarcode:(nonnull NSString *)barcode; ``` Swift ```swift func didDetectBarcode(_ barcode: String) ``` ### lookupUPC:withCompletion: Perform server lookup of this UPC. #### Declaration Objective-C ```objc - (void)lookupUPC:(nonnull NSString *)upc withCompletion:(nonnull void (^)(BRMissedEarningsLookupResult, NSDictionary *_Nonnull))completion; ``` Swift ```swift func lookupUPC(_ upc: String) async -> (BRMissedEarningsLookupResult, [AnyHashable : Any]) ``` #### Parameters `_completion_` This callback is invoked when the lookup completes (or fails) * `BRMissedEarningsLookupResult lookupResult` - The status of the lookup indicating whether the supplied UPC participates in the program, does not participate, was not found, or if the lookup failed * `NSDictionary *productInfo` - If the UPC was found, this dictionary contains information about the product. The keys are: `productName`, `brand`, `image_url`, and `brand_participates`, which is a boolean indicating whether this product’s brand is part of the program. This helps identify scenarios where some products in a brand participate in the program, but the provided UPC does not. Additionally a `message` key which can contain a custom message for a given product ### setTorch: Toggle the status of the torch. #### Declaration Objective-C ```objc - (void)setTorch:(BOOL)torchOn; ``` Swift ```swift func setTorch(_ torchOn: Bool) ``` #### Parameters `_torchOn_` Whether to turn the torch on or off ### restartCaptureSession When a barcode is found, the capture session is automatically paused. Invoke this method to restart the capture session afterwards. #### Declaration Objective-C ```objc - (void)restartCaptureSession; ``` Swift ```swift func restartCaptureSession() ``` ``` -------------------------------- ### Get Next Question Index (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRSurveyQuestion.html Swift method to determine the index of the subsequent survey question. A return value of -1 signifies the end of the survey. ```Swift func getNextQuestionIndex() -> Int ``` -------------------------------- ### Get Member Number (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve the loyalty member number detected on the receipt, if available. This property requires the BlinkReceipt SDK to be integrated and used for processing. ```Swift var memberNumber: String! { get } ``` -------------------------------- ### Get Member Number (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve the loyalty member number detected on the receipt, if available. This property requires the BlinkReceipt SDK to be integrated and used for processing. ```Objective-C @property (nonatomic, strong, readonly) NSString *memberNumber; ``` -------------------------------- ### Get Cashback Amount (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve the float value representing the cashback amount detected on the receipt. This property is accessible once the SDK has processed the receipt data. ```Swift var cashback: Float { get } ``` -------------------------------- ### BRScanManager - SDK Initialization and Scanning Source: https://context7.com/blinkreceipt/blinkreceipt-ios/llms.txt The BRScanManager singleton is the primary interface for initializing the SDK with credentials and initiating scanning sessions using either the built-in camera or existing images. ```APIDOC ## BRScanManager ### Description Primary interface for initializing the SDK, configuring API credentials, and starting scanning sessions. ### Methods - **shared()**: Returns the singleton instance of BRScanManager. - **startStaticCamera(from:scanOptions:with:)**: Starts a scanning session using the built-in camera controller. - **scan(images:scanOptions:completion:)**: Processes an array of existing images for data extraction. ### Configuration Properties - **licenseKey** (String) - Required - The SDK license key. - **prodIntelKey** (String) - Optional - The product intelligence key for advanced data matching. ``` -------------------------------- ### Get Cashback Amount (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve the float value representing the cashback amount detected on the receipt. This property is accessible once the SDK has processed the receipt data. ```Objective-C @property (nonatomic, readonly) float cashback; ``` -------------------------------- ### BRPromotionInfo Class Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRPromotionInfo.html Represents information about a promotion retrieved for the current user. ```APIDOC ## BRPromotionInfo Class ### Description Represents information about a promotion retrieved for the current user. ### Properties #### slug The promotion slug from the PVP dashboard. - **slug** (String) - Readonly - The promotion slug from the PVP dashboard. #### targeted Whether this promotion is targeted to this user or not. - **targeted** (Boolean) - Readonly - Whether this promotion is targeted to this user or not. ``` -------------------------------- ### Retrieve Preliminary Scan Results Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRCameraViewController.html Invokes processing to get current scan results. The callback should return a boolean indicating if the results are sufficient to end the session. ```Objective-C - (void)getPreliminaryResults:(BOOL (^)(BRScanResults *))callback; ``` ```Swift func getPreliminaryResults(_ callback: ((BRScanResults?) -> Bool)!) ``` -------------------------------- ### startReceiptCorrection Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Begins the receipt correction flow for a receipt stored on disk. ```APIDOC ## startReceiptCorrection ### Description Begin the receipt correction flow for a receipt stored on disk. ### Parameters - **blinkReceiptId** (NSString) - Required - The receipt id of a receipt scanned within daysToStoreReceiptData days - **vc** (UIViewController) - Required - The view controller from which to show this modal - **countryCode** (NSString) - Optional - Current country (helps with barcode scanning) - **customFont** (UIFont) - Optional - Pass a non-null UIFont to style all elements in this flow - **completion** (void (^)(BRScanResults *, NSError *)) - Optional - Callback invoked when the correction flow ends ``` -------------------------------- ### Configure View Background Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/custom-camera-controller.html Set the view background to transparent to ensure the camera preview is visible. ```objective-c - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor clearColor]; } ``` -------------------------------- ### Display survey using prepackaged flow Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Displays a survey from a specified view controller. The completion handler indicates whether the user cancelled the survey. ```Objective-C - (void)startSurvey:(nonnull BRSurvey *)survey fromViewController:(nonnull UIViewController *)viewController withCompletion:(nullable void (^)(BOOL))completion; ``` ```Swift func start(_ survey: BRSurvey, from viewController: UIViewController) async -> Bool ``` -------------------------------- ### Get Raw Basket Text (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Access a string containing raw product data results from the receipt. This property is available after the BlinkReceipt SDK has processed the receipt. ```Swift var rawBasketText: String! { get } ``` -------------------------------- ### Get Raw Basket Text (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Access a string containing raw product data results from the receipt. This property is available after the BlinkReceipt SDK has processed the receipt. ```Objective-C @property (nonatomic, strong, readonly) NSString *rawBasketText; ``` -------------------------------- ### BRProduct Image URL Declaration Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRProduct.html Provides the URL for the product thumbnail. The size of the thumbnail may vary. ```Objective-C @property (nonatomic, strong, readonly) NSString *imgUrl; ``` ```Swift var imgUrl: String! { get } ``` -------------------------------- ### Get Shipments Array (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve an array of BRShipment objects representing all shipments found within an order. This property requires the BlinkReceipt SDK to be properly integrated. ```Swift var shipments: [BRShipment]! { get } ``` -------------------------------- ### Get Shipments Array (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve an array of BRShipment objects representing all shipments found within an order. This property requires the BlinkReceipt SDK to be properly integrated. ```Objective-C @property (nonatomic, strong, readonly) NSArray *shipments; ``` -------------------------------- ### Configure returnSubproducts Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanOptions.html Enables the inclusion of subproducts in the BRProduct.subProducts array. ```Objective-C @property (nonatomic) BOOL returnSubproducts; ``` ```Swift var returnSubproducts: Bool { get set } ``` -------------------------------- ### lookupUPC:withCompletion: Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRMissedEarningsBaseViewController.html Performs a server lookup for a given UPC to determine program participation and retrieve product information. ```APIDOC ## lookupUPC:withCompletion: ### Description Perform server lookup of a specific UPC to check if it participates in the missed earnings program. ### Parameters #### Path Parameters - **upc** (NSString) - Required - The UPC string to look up. - **completion** (void(^)(BRMissedEarningsLookupResult, NSDictionary *)) - Required - Callback invoked when the lookup completes or fails. ### Response #### Success Response (Callback Parameters) - **lookupResult** (BRMissedEarningsLookupResult) - The status of the lookup (participates, does not participate, not found, or failed). - **productInfo** (NSDictionary) - Contains product details if found, including: productName, brand, image_url, brand_participates (boolean), and message. ``` -------------------------------- ### Swift Package Manager Repository URL Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/README.md The URL to be used when adding the package in Xcode. ```shell https://github.com/blinkreceipt/blinkreceipt-ios/ ``` -------------------------------- ### Get Combined Raw Text (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Obtain a string representing the cumulative set of raw scan results. This property is available after the BlinkReceipt SDK has been initialized and used for scanning. ```Swift var combinedRawText: String! { get } ``` -------------------------------- ### Displaying Custom Survey UI Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/surveys.html Build a custom UI by iterating through BRSurvey.questions. Display question text from the text property and use appropriate controls based on question type. ```objective-c BRSurvey.questions ``` ```objective-c BRSurveyQuestion.text ``` -------------------------------- ### Get Combined Raw Text (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Obtain a string representing the cumulative set of raw scan results. This property is available after the BlinkReceipt SDK has been initialized and used for scanning. ```Objective-C @property (nonatomic, strong, readonly) NSString *combinedRawText; ``` -------------------------------- ### BRCoupon Class Methods Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRCoupon.html Provides details on the `friendlyNameForCouponType:` class method for converting coupon types to user-friendly strings. ```APIDOC ## Class Method: friendlyNameForCouponType: ### Description Convert a coupon type to a user-friendly string. ### Method Objective-C: `+ (NSString *)friendlyNameForCouponType:(BRCouponType)type;` Swift: `class func friendlyName(for type: BRCouponType) -> String!` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **String** - A user-friendly string representation of the coupon type. #### Response Example None ``` -------------------------------- ### Configuration Properties Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRMissedEarningsBaseViewController.html Properties for configuring the behavior of the barcode scanner. ```APIDOC ## scanningRegion - **Type**: CGRect - **Description**: Restricts the region in which barcodes are detected, specified as percentages of the view size. Default is (0.0, 0.0, 1.0, 1.0). ## countryCode - **Type**: NSString - **Description**: Specifies the country code to help the SDK determine the correct barcode length to detect. ``` -------------------------------- ### Get Results for Receipt Correction (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Retrieve scan results for a specific receipt ID asynchronously, allowing for custom user corrections. Returns scan results and associated images. ```Swift func results(forReceiptCorrection blinkReceiptId: String) async -> (BRScanResults?, [UIImage]) ``` -------------------------------- ### Subclass BRCameraViewController Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/custom-camera-controller.html Create a custom camera controller by inheriting from BRCameraViewController. ```objective-c #import @interface MyCameraController : BRCameraViewController ``` -------------------------------- ### Get Raw Trip Footer Text (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Access a string containing raw trip results found at the bottom of the receipt. This property is available once the BlinkReceipt SDK has processed the receipt. ```Swift var rawTripFooterText: String! { get } ``` -------------------------------- ### Get Raw Trip Footer Text (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Access a string containing raw trip results found at the bottom of the receipt. This property is available once the BlinkReceipt SDK has processed the receipt. ```Objective-C @property (nonatomic, strong, readonly) NSString *rawTripFooterText; ``` -------------------------------- ### Set License Key Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/index.html Set your license key for the BlinkReceipt SDK within the applicationDidFinishLaunching: method of your AppDelegate. ```objective-c [BRScanManager sharedManager].licenseKey = @"YOUR-LICENSE-KEY"; ``` -------------------------------- ### BRProduct Possible Products Declaration Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRProduct.html An array of possible products returned when an exact product match cannot be determined. Each possible product will have only product intelligence properties populated. ```Objective-C @property (nonatomic, strong, readonly) NSArray *possibleProducts; ``` ```Swift var possibleProducts: [BRProduct]! { get } ``` -------------------------------- ### Get Raw Trip Header Text (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve a string containing raw trip results found at the top of the receipt. This property is populated after the BlinkReceipt SDK processes the receipt data. ```Swift var rawTripHeaderText: String! { get } ``` -------------------------------- ### Retrieve User Promotions Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Fetches targeted and general promotions available for the current user. ```Objective-C - (void)getPromotionsWithCompletion: (nonnull void (^)(NSArray *_Nullable))completion; ``` ```Swift func promotions() async -> [BRPromotionInfo]? ``` -------------------------------- ### Get Raw Trip Header Text (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Retrieve a string containing raw trip results found at the top of the receipt. This property is populated after the BlinkReceipt SDK processes the receipt data. ```Objective-C @property (nonatomic, strong, readonly) NSString *rawTripHeaderText; ``` -------------------------------- ### Set Activation Date for Promotion (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Sets the date a user activated a specific promotion for purchase validation. ```swift func setActivationDate(_ activationDate: Date, forPromotion promotionSlug: String) ``` -------------------------------- ### Check if E-receipt is Valid (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Use this property to determine if the identified message is a valid e-receipt or a related message, as opposed to marketing content. No specific setup is required beyond integrating the SDK. ```Swift var ereceiptIsValid: Bool { get } ``` -------------------------------- ### BRProduct Class Reference Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRProduct.html Reference documentation for the BRProduct class. ```APIDOC ## BRProduct Class Reference ### Description Describes one product on a receipt. ### Objective-C ```objc @interface BRProduct : NSObject @end ``` ### Swift ```swift class BRProduct : NSObject, BRSerializable ``` ### Source [Show on GitHub](https://github.com/BlinkReceipt/blinkreceipt-ios/tree/1.66.1/BlinkReceipt.xcframework/ios-arm64/BlinkReceipt.framework/Headers/BRProduct.h#L18-L251) ``` -------------------------------- ### Check if E-receipt is Valid (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Use this property to determine if the identified message is a valid e-receipt or a related message, as opposed to marketing content. No specific setup is required beyond integrating the SDK. ```Objective-C @property (nonatomic, readonly) BOOL ereceiptIsValid; ``` -------------------------------- ### Get Additional Fees (Swift) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Access additional fees or charges for an e-receipt, such as tips or bag fees. This property returns a dictionary where keys are fee names and values are their amounts as strings. Ensure the SDK is integrated. ```Swift var ereceiptAdditionalFees: [String : String]! { get } ``` -------------------------------- ### BRMissedEarningsBaseViewController Methods Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRMissedEarningsBaseViewController.html Methods available in the BRMissedEarningsBaseViewController class. ```APIDOC ## BRMissedEarningsBaseViewController Methods ### didDetectBarcode Override this method to be notified when a barcode is detected. Supports 12 digit and 6 digit UPC's. - **Parameters**: - **barcode** (NSString) - The detected barcode string. ### lookupUPC Perform server lookup of this UPC. - **Parameters**: - **upc** (NSString) - The UPC to look up. - **completion** (void(^)(BRMissedEarningsLookupResult lookupResult, NSDictionary *productInfo)) - This callback is invoked when the lookup completes (or fails). - `lookupResult` (BRMissedEarningsLookupResult) - The status of the lookup indicating whether the supplied UPC participates in the program, does not participate, was not found, or if the lookup failed. - `productInfo` (NSDictionary *) - If the UPC was found, this dictionary contains information about the product. The keys are: `productName`, `brand`, `image_url`, and `brand_participates`, which is a boolean indicating whether this product's brand is part of the program. This helps identify scenarios where some products in a brand participate in the program, but the provided UPC does not. Additionally a `message` key which can contain a custom message for a given product. ### toggleTorch Toggle the status of the torch. ``` -------------------------------- ### Get Additional Fees (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanResults.html Access additional fees or charges for an e-receipt, such as tips or bag fees. This property returns a dictionary where keys are fee names and values are their amounts as strings. Ensure the SDK is integrated. ```Objective-C @property (nonatomic, strong, readonly) NSDictionary *ereceiptAdditionalFees; ``` -------------------------------- ### Set Activation Date for Promotion (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanManager.html Sets the date a user activated a specific promotion for purchase validation. ```objective-c - (void)setActivationDate:(nonnull NSDate *)activationDate forPromotion:(nonnull NSString *)promotionSlug; ``` -------------------------------- ### Get Results for Receipt Correction (Objective-C) Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRScanManager.html Retrieve scan results for a specific receipt ID, either from disk or remotely, to allow for custom user corrections. The completion handler is invoked with scan results and associated images. ```Objective-C - (void)getResultsForReceiptCorrection:(nonnull NSString *)blinkReceiptId withCompletion: (nonnull void (^)(BRScanResults *_Nullable, NSArray *_Nonnull))completion; ``` -------------------------------- ### BRProductAdditionalLine Class Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRProductAdditionalLine.html This snippet provides the Objective-C and Swift definitions for the BRProductAdditionalLine class. ```APIDOC ## BRProductAdditionalLine Class Reference ### Description Represents an additional line of text attached to a product. ### Objective-C ```objectivec @interface BRProductAdditionalLine : NSObject @end ``` ### Swift ```swift class BRProductAdditionalLine : NSObject, BRSerializable ``` ### Source [Show on GitHub](https://github.com/BlinkReceipt/blinkreceipt-ios/tree/1.66.1/BlinkReceipt.xcframework/ios-arm64/BlinkReceipt.framework/Headers/BRProductAdditionalLine.h#L17-L40) ``` -------------------------------- ### Lighting Condition Callback Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRCameraViewController.html Callback method to receive lighting condition updates. ```APIDOC ## Objective-C ```objc - (void)didGetLightingCondition:(BRLightingCondition)lightingCondition; ``` ## Swift ```swift func didGet(_ lightingCondition: BRLightingCondition) ``` ### Parameters `_lightingCondition_` (BRLightingCondition) - The new lighting condition. ``` -------------------------------- ### Configure enableDynamicTextSizing Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRScanOptions.html Controls dynamic text sizing behavior. ```Objective-C @property (nonatomic) BOOL enableDynamicTextSizing; ``` ```Swift var enableDynamicTextSizing: Bool { get set } ``` -------------------------------- ### didGetLightingCondition Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/docsets/BlinkReceipt_iOS_SDK.docset/Contents/Resources/Documents/Classes/BRCameraViewController.html Callback method to receive updates on the current lighting condition detected by the camera. ```APIDOC ## didGetLightingCondition ### Description Override this method to receive a callback when the lighting condition changes. ### Parameters #### Parameters - **lightingCondition** (BRLightingCondition) - Required - The new lighting condition. ``` -------------------------------- ### BRPromotion Properties Source: https://github.com/blinkreceipt/blinkreceipt-ios/blob/master/docs/Classes/BRPromotion.html This section describes the properties of the BRPromotion class, which represents a promotion that may have qualified for a receipt. ```APIDOC ## BRPromotion Properties ### Description The `BRPromotion` class represents a promotion that may have qualified for a receipt. It contains information about the promotion itself, its reward, and details about why it qualified or failed to qualify. ### Properties * **slug** (String) - Identifies which promotion qualified. * **rewardValue** (Float) - The reward value for this promotion. * **rewardCurrency** (String) - The reward currency for this promotion. * **errorCode** (Integer) - Error code for failure to qualify. * **errorMessage** (String) - Error message for failure to qualify. * **relatedProductIndexes** (Array) - If this promotion qualified, this property contains the indexes of the products in the `BRScanResults.products` array which caused this promotion to qualify. * **qualifications** (Array>) - If this promotion qualified, this property contains an array of each instance of qualification, and each instance is an array containing the indexes of the products in the `BRScanResults.products` array which caused this promotion to qualify. * **qualifiedProductLists** (Array) - If this promotion qualified, this property contains an array of each qualified product along with its index in the main `products` result structure and any product groups it is part of. ```