Utilize the TikiClient.publish method to upload receipt images to mytiki for processing.

The TikiClient.publish method is designed to handle a variety of input types, making it adaptable to different platforms and data sources. It can process results from the TikiClient.scan method, email attachments obtained via TikiClient.scrape, or any custom scanning methods implemented within your application.

Managing Long Receipts

The method efficiently manages long receipts by accepting a list of images, processing each one individually. The data extracted from all images is then aggregated.

After a receipt is uploaded, the OCR (Optical Character Recognition) technology processes it and stores the result. You can access the processed data later through the API as needed.

Example

This method accommodates different parameter types based on the platform:

  • Android: It accepts either a single Bitmap, a list of Bitmap objects for multiple images, a File representing a PDF, or a list of File objects for multiple PDFs.
  • iOS: It accepts either a single UIImage, an array of UIImage objects for multiple images, a Data object representing a PDF, or an array of Data objects for multiple PDFs.
  • Capacitor: It expects an array of base64 image strings or File objects for PDF upload.

Ensure to provide the appropriate parameter based on the platform you're working with.

// Upload one receipt
val image: Bitmap // Image captured with TikiClient.scan or other method 
await TikiClient.publish(image)

// Upload multiple receipts
val images: Array<Bitmap> // Array of images captured with TikiClient.scan or other method 
val receiptId = await TikiClient.publish(images)
// Upload one receipt
let image: UIImage // Image captured with TikiClient.scan or other method 
await TikiClient.publish(image)

// Upload multiple receipts
let images: [UImage] // Array of images captured with TikiClient.scan or other method 
let receiptId = await TikiClient.publish(images)
// Upload one receipt
let image: string = "base64ImageString" // Image captured with TikiClient.scan or other method 
await TikiClient.publish([image])

// Upload multiple receipts
let images: string[] // Array of images captured with TikiClient.scan or other method 
let receiptId = await TikiClient.publish(images)

Upon execution, this method generates a unique ID for the receipt. This ID can be used to retrieve the extracted raw data via the mytiki.com APIs.