From 8f72083cc2ccf9966635ec45d22e2f6c67487eef Mon Sep 17 00:00:00 2001 From: Valeriy Mukhtarulin Date: Thu, 15 Aug 2024 11:47:28 -0400 Subject: [PATCH 1/3] Disallow v7 api, remove models and update docs --- requirements.txt | 1 - veryfi/client.py | 103 ++++++++++++++++++----------------------------- veryfi/model.py | 31 -------------- 3 files changed, 39 insertions(+), 96 deletions(-) delete mode 100644 veryfi/model.py diff --git a/requirements.txt b/requirements.txt index 43c356c..d5c2bc9 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ requests>=2.22.0 -pydantic>=1 diff --git a/veryfi/client.py b/veryfi/client.py index d6fb728..06db584 100644 --- a/veryfi/client.py +++ b/veryfi/client.py @@ -8,7 +8,6 @@ import requests -from veryfi.model import AddLineItem, UpdateLineItem from veryfi.errors import VeryfiClientError @@ -41,7 +40,6 @@ def __init__( username, api_key, base_url=BASE_URL, - api_version=API_VERSION, timeout=API_TIMEOUT, ): self.client_id = client_id @@ -49,7 +47,7 @@ def __init__( self.username = username self.api_key = api_key self.base_url = base_url - self.api_version = api_version + self.api_version = "v8" self.versioned_url = self.base_url + self.api_version self.timeout = timeout self.headers = {} @@ -66,12 +64,11 @@ def _get_headers(self) -> Dict: "Content-Type": "application/json", "Client-Id": self.client_id, } - final_headers.update({"Authorization": f"apikey {self.username}:{self.api_key}"}) return final_headers - def _request(self, http_verb, endpoint_name, request_arguments): + def _request(self, http_verb, endpoint_name, request_arguments=None): """ Submit the HTTP request. :param http_verb: HTTP Method @@ -80,8 +77,8 @@ def _request(self, http_verb, endpoint_name, request_arguments): :return: A JSON of the response data. """ headers = self._get_headers() - api_url = "{0}/partner{1}".format(self.versioned_url, endpoint_name) - + api_url = f"{self.versioned_url}/partner{endpoint_name}" + request_arguments = request_arguments or {} if self.client_secret: timestamp = int(time.time() * 1000) signature = self._generate_signature(request_arguments, timestamp=timestamp) @@ -112,10 +109,10 @@ def _generate_signature(self, payload_params, timestamp): :param timestamp: Unix Long timestamp :return: Unique signature generated using the client_secret and the payload """ - payload = "timestamp:{}".format(timestamp) + payload = f"timestamp:{timestamp}" for key in payload_params.keys(): value = payload_params[key] - payload = "{0},{1}:{2}".format(payload, key, value) + payload = f"{payload},{key}:{value}" secret_bytes = bytes(self.client_secret, "utf-8") payload_bytes = bytes(payload, "utf-8") @@ -135,15 +132,7 @@ def get_documents( **kwargs: Dict, ): """ - Get list of documents - :param query: Search term to search for a specific document by its content. These fields will be searched: external_id, category, vendor.name, notes, invoice_number, total and ocr_text. - :param external_id: Search for documents that match your custom identifier - :param tag: Search for documents with the specified tag - :param created__gt: Search for documents with a created date greater than this one. Format YYYY-MM-DD+HH:MM:SS. Don't send both created__gt and created__gte in a single request. - :param created__gte: Search for documents with a created date greater than or equal to this one. Format YYYY-MM-DD+HH:MM:SS. Don't send both created__gt and created__gte in a single request. - :param created__lt: Search for documents with a created date greater than this one. Format YYYY-MM-DD+HH:MM:SS. Don't send both created__lt and created__lte in a single request. - :param created__lte: Search for documents with a created date less than or equal to this one. Format YYYY-MM-DD+HH:MM:SS. Don't send both created__lt and created__lte in a single request. - :param kwargs: Additional request parameters + Get list of documents. Please refer to https://docs.veryfi.com/api/receipts-invoices/search-documents/ :return: List of previously processed documents """ endpoint_name = "/documents/" @@ -173,16 +162,14 @@ def get_documents( return documents["documents"] return documents - def get_document(self, document_id): + def get_document(self, document_id, **kwargs: Dict): """ Retrieve document by ID + https://docs.veryfi.com/api/receipts-invoices/get-a-document/ :param document_id: ID of the document you'd like to retrieve :return: Data extracted from the Document """ - endpoint_name = "/documents/{}/".format(document_id) - request_arguments = {"id": document_id} - document = self._request("GET", endpoint_name, request_arguments) - return document + return self._request("GET", f"/documents/{document_id}/", kwargs) def process_document( self, @@ -192,7 +179,8 @@ def process_document( **kwargs: Dict, ): """ - Process a document and extract all the fields from it + Process a document and extract all the fields from it. + https://docs.veryfi.com/api/receipts-invoices/process-a-document/ :param file_path: Path on disk to a file to submit for data extraction :param categories: List of categories Veryfi can use to categorize the document :param delete_after_processing: Delete this document from Veryfi after data has been extracted @@ -200,7 +188,6 @@ def process_document( :return: Data extracted from the document """ - endpoint_name = "/documents/" if not categories: categories = self.CATEGORIES file_name = os.path.basename(file_path) @@ -213,8 +200,7 @@ def process_document( "auto_delete": delete_after_processing, } request_arguments.update(kwargs) - document = self._request("POST", endpoint_name, request_arguments) - return document + return self._request("POST", "/documents/", request_arguments) def process_document_url( self, @@ -228,7 +214,7 @@ def process_document_url( **kwargs: Dict, ) -> Dict: """Process Document from url and extract all the fields from it. - + https://docs.veryfi.com/api/receipts-invoices/process-a-document/ :param file_url: Required if file_urls isn't specified. Publicly accessible URL to a file, e.g. "https://cdn.example.com/receipt.jpg". :param file_urls: Required if file_url isn't specifies. List of publicly accessible URLs to multiple files, e.g. ["https://cdn.example.com/receipt1.jpg", "https://cdn.example.com/receipt2.jpg"] :param categories: List of categories to use when categorizing the document @@ -254,10 +240,11 @@ def process_document_url( return self._request("POST", endpoint_name, request_arguments) def process_w9_document_url( - self, file_url: str, file_name: Optional[str] = None, **kwargs: Dict + self, file_url: str, file_name: Optional[str] = None, **kwargs ) -> Dict: """ Process W9 Document from url and extract all the fields from it. + https://docs.veryfi.com/api/w9s/process-a-w-9/ :param file_url: Publicly accessible URL to a file, e.g. "https://cdn.example.com/receipt.jpg". :param file_name: Optional name of file, eg. receipt.jpg @@ -278,6 +265,7 @@ def process_w9_document_url( def process_w9_document(self, file_path: str, file_name: Optional[str] = None, **kwargs): """ Process W9 Document from url and extract all the fields from it. + https://docs.veryfi.com/api/w9s/process-a-w-9/ :param file_path: Path on disk to a file to submit for data extraction :param file_name: Optional name of file, eg. receipt.jpg @@ -301,15 +289,15 @@ def process_w9_document(self, file_path: str, file_name: Optional[str] = None, * def delete_document(self, document_id): """ Delete Document from Veryfi + https://docs.veryfi.com/api/receipts-invoices/delete-a-document/ :param document_id: ID of the document you'd like to delete """ - endpoint_name = f"/documents/{document_id}/" - request_arguments = {"id": document_id} - self._request("DELETE", endpoint_name, request_arguments) + self._request("DELETE", f"/documents/{document_id}/", {"id": document_id}) def update_document(self, document_id: int, **kwargs) -> Dict: """ Update data for a previously processed document, including almost any field like `vendor`, `date`, `notes` and etc. + https://docs.veryfi.com/api/receipts-invoices/update-a-document/ ```veryfi_client.update_document(id, date="2021-01-01", notes="look what I did")``` @@ -318,97 +306,86 @@ def update_document(self, document_id: int, **kwargs) -> Dict: :return: A document json with updated fields, if fields are writable. Otherwise a document with unchanged fields. """ - endpoint_name = f"/documents/{document_id}/" - - return self._request("PUT", endpoint_name, kwargs) + return self._request("PUT", f"/documents/{document_id}/", kwargs) def get_line_items(self, document_id): """ Retrieve all line items for a document. + https://docs.veryfi.com/api/receipts-invoices/get-document-line-items/ :param document_id: ID of the document you'd like to retrieve :return: List of line items extracted from the document """ - endpoint_name = f"/documents/{document_id}/line-items/" - request_arguments = {} - line_items = self._request("GET", endpoint_name, request_arguments) - return line_items + return self._request("GET", f"/documents/{document_id}/line-items/") def get_line_item(self, document_id, line_item_id): """ Retrieve a line item for existing document by ID. + https://docs.veryfi.com/api/receipts-invoices/get-a-line-item/ :param document_id: ID of the document you'd like to retrieve :param line_item_id: ID of the line item you'd like to retrieve :return: Line item extracted from the document """ - endpoint_name = f"/documents/{document_id}/line-items/{line_item_id}" - request_arguments = {} - line_items = self._request("GET", endpoint_name, request_arguments) - return line_items + return self._request("GET", f"/documents/{document_id}/line-items/{line_item_id}") def add_line_item(self, document_id: int, payload: Dict) -> Dict: """ Add a new line item on an existing document. + https://docs.veryfi.com/api/receipts-invoices/create-a-line-item/ :param document_id: ID of the document you'd like to update :param payload: line item object to add :return: Added line item data """ - endpoint_name = f"/documents/{document_id}/line-items/" - request_arguments = AddLineItem(**payload).dict(exclude_none=True) - return self._request("POST", endpoint_name, request_arguments) + return self._request("POST", f"/documents/{document_id}/line-items/", payload) def update_line_item(self, document_id: int, line_item_id: int, payload: Dict) -> Dict: """ Update an existing line item on an existing document. + https://docs.veryfi.com/api/receipts-invoices/update-a-line-item/ :param document_id: ID of the document you'd like to update :param line_item_id: ID of the line item you'd like to update :param payload: line item object to update :return: Line item data with updated fields, if fields are writable. Otherwise line item data with unchanged fields. """ - endpoint_name = f"/documents/{document_id}/line-items/{line_item_id}" - request_arguments = UpdateLineItem(**payload).dict(exclude_none=True) - return self._request("PUT", endpoint_name, request_arguments) + return self._request("PUT", f"/documents/{document_id}/line-items/{line_item_id}", payload) def delete_line_items(self, document_id): """ Delete all line items on an existing document. + https://docs.veryfi.com/api/receipts-invoices/delete-all-document-line-items/ :param document_id: ID of the document you'd like to delete """ - endpoint_name = f"/documents/{document_id}/line-items/" - request_arguments = {} - self._request("DELETE", endpoint_name, request_arguments) + self._request("DELETE", f"/documents/{document_id}/line-items/") def delete_line_item(self, document_id, line_item_id): """ Delete an existing line item on an existing document. + https://docs.veryfi.com/api/receipts-invoices/delete-a-line-item/ + :param document_id: ID of the document you'd like to delete :param line_item_id: ID of the line item you'd like to delete """ - endpoint_name = f"/documents/{document_id}/line-items/{line_item_id}" - request_arguments = {} - self._request("DELETE", endpoint_name, request_arguments) + self._request("DELETE", f"/documents/{document_id}/line-items/{line_item_id}") def add_tag(self, document_id, tag_name): """ Add a new tag on an existing document. + https://docs.veryfi.com/api/receipts-invoices/add-a-tag-to-a-document/ :param document_id: ID of the document you'd like to update :param tag_name: name of the new tag :return: Added tag data """ - endpoint_name = f"/documents/{document_id}/tags/" - request_arguments = {"name": tag_name} - return self._request("PUT", endpoint_name, request_arguments) + return self._request("PUT", f"/documents/{document_id}/tags/", {"name": tag_name}) def replace_tags(self, document_id, tags): """ Replace multiple tags on an existing document. + https://docs.veryfi.com/api/receipts-invoices/update-a-document/ :param document_id: ID of the document you'd like to update :param tags: array of strings :return: Added tags data """ - endpoint_name = f"/documents/{document_id}/" - request_arguments = {"tags": tags} - return self._request("PUT", endpoint_name, request_arguments) + return self._request("PUT", f"/documents/{document_id}/", {"tags": tags}) def add_tags(self, document_id, tags): """ @@ -417,6 +394,4 @@ def add_tags(self, document_id, tags): :param tags: array of strings :return: Added tags data """ - endpoint_name = f"/documents/{document_id}/tags/" - request_arguments = {"tags": tags} - return self._request("POST", endpoint_name, request_arguments) + return self._request("POST", f"/documents/{document_id}/tags/", {"tags": tags}) diff --git a/veryfi/model.py b/veryfi/model.py deleted file mode 100644 index 45c6b11..0000000 --- a/veryfi/model.py +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Optional -from pydantic import BaseModel - - -class SharedLineItem(BaseModel): - sku: Optional[str] = None - category: Optional[str] = None - tax: Optional[float] = None - price: Optional[float] = None - unit_of_measure: Optional[str] = None - quantity: Optional[float] = None - upc: Optional[str] = None - tax_rate: Optional[float] = None - discount_rate: Optional[float] = None - start_date: Optional[str] = None - end_date: Optional[str] = None - hsn: Optional[str] = None - section: Optional[str] = None - weight: Optional[str] = None - - -class AddLineItem(SharedLineItem): - order: int - description: str - total: float - - -class UpdateLineItem(SharedLineItem): - order: Optional[int] = None - description: Optional[str] = None - total: Optional[float] = None From a202c7b962876c08be5a4f3eaac4a4b7bec2b3ab Mon Sep 17 00:00:00 2001 From: Valeriy Mukhtarulin Date: Thu, 15 Aug 2024 11:58:17 -0400 Subject: [PATCH 2/3] Remoev python 3.7 and 3.8 support --- .github/workflows/release-pypi.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/update-docs.yml | 2 +- Pipfile | 2 +- README.md | 3092 +++++++++++++++++++++++++++- setup.cfg | 2 - tox.ini | 6 +- 7 files changed, 3007 insertions(+), 101 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 63e325e..bd5985d 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [3.7] + python-version: [3.9] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e115a7f..0b95357 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, '3.10', 3.11, 3.12] + python-version: [3.9, '3.10', 3.11, 3.12] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 0ea412a..4b6ad8f 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8] + python-version: [3.9] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/Pipfile b/Pipfile index e2d80e4..0d48f86 100644 --- a/Pipfile +++ b/Pipfile @@ -16,7 +16,7 @@ tox = "*" requests = "*" [requires] -python_version = "3.8" +python_version = "3.9" [pipenv] allow_prereleases = true diff --git a/README.md b/README.md index 0024bc9..2cdc863 100755 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ https://veryfi.github.io/veryfi-python/reference/veryfi/ **veryfi** is a Python module for communicating with the [Veryfi OCR API](https://veryfi.com/api/) +https://docs.veryfi.com + ## Installation Install from PyPi using [pip](http://www.pip-installer.org/en/latest/), a @@ -47,98 +49,3006 @@ response = veryfi_client.process_document(file_path, categories=categories) response # or with url -response = veryfi_client.process_document_url(url, external_id=some_id) +response = veryfi_client.process_document_url(url, external_id=some_id, confidence_details=True, bounding_boxes=True) response ->>> {"abn_number": "", - "account_number": "", - "bill_to_address": "130 INTERSTATE BLVD, SUIT 21\nNASHEVILLE, NC 28806", - "bill_to_name": "FAST ROOFING COMPANY, LLC", - "card_number": "", - "category": "Hardware Supplies", - "currency_code": "USD", - "date": "2019-08-01 00:00:00", - "due_date": "2019-09-01", - "discount": 0, - "external_id": "", - "id": 28933541012, - "img_thumbnail_url": "https://scdn.veryfi.com/documents/5rb8d5q0-3ae0-4f55-a54b-c01a553ab2da_t.jpg", - "img_url": "https://scdn.veryfi.com/documents/5rb8d5q0-3ae0-4f55-a54b-c01a553ab2da.pdf", - "invoice_number": "1234568", - "line_items": [ - { - "date": "", - "description": "SFTY TAGS LCKED OUT 250BX 426NS", - "discount": 0, - "order": 1, - "price": 200.0, - "quantity": 1, - "reference": "", - "sku": "PTW-901444", - "tax": 0, - "tax_rate": 0, - "total": 200.00, - "type": "purchase", - "unit_of_measure": "pc" - }, - { - "date": "", - "description": "WEDGE ANCHOR. PLATED", - "discount": 0, - "order": 2, - "price": 3.75, - "quantity": 100, - "reference": "", - "sku": "WA-12-414", - "tax": 0, - "tax_rate": 0, - "total": 375.00, - "unit_of_measure": "pc" - }, - - { - "date": "", - "description": "SYP #2 KD-HT UNTREATED", - "discount": 0, - "order": 9, - "price": 11.49, - "quantity": 1, - "reference": "", - "sku": "WE-27517", - "tax": 0, - "tax_rate": 0, - "total": 11.49, - "unit_of_measure": "pc" - } - ], - "ocr_text": "\nACE\nThe helpful place.\nAce Hardware\t\t\t\t\t\tINVOICE\n5726.....", - "payment_display_name": "", - "payment_terms": "", - "payment_type": "", - "purchase_order_number": "", - "reference_number": "VBAJD-32541", - "shipping": 0, - "subtotal": 586.49, - "tax": 41.05, - "tax_lines": [{ - "name": "state tax", - "rate": 7.0, - "total": 41.05 - }], - "tip": 0, - "total": 627.54, - "vat_number": "", - "vendor": { - "address": "5726 Memorial Blvd, Saint George, SC 29477", - "name": "Hutto Ace Hardware", - "raw_name": "Ace Hardware", - "phone_number": "(843) 563-4012", - "vendor_logo": "https://cdn.veryfi.com/logos/us/953982859.png", - "vendor_type": "hardware stores" - }, - "vendor_vat_number": "", - "vendor_iban": "", - "vendor_bank_number": "", - "vendor_bank_name": "" +>>> { + "account_number": { + "bounding_box": [ + 0, + 0.4543, + 0.9355, + 0.7466, + 0.9512 + ], + "bounding_region": [ + 0.4543, + 0.9355, + 0.7466, + 0.9355, + 0.7466, + 0.9512, + 0.4543, + 0.9512 + ], + "ocr_score": 0.94, + "rotation": 0, + "score": 0.94, + "value": "0053" + }, + "accounting_entry_type": "debit", + "barcodes": [ + { + "bounding_region": [ + 0.0347, + 0.7637, + 0.0389, + 0.7937, + 0.9716, + 0.7848, + 0.9685, + 0.7551 + ], + "data": "032962247822205240330000002760", + "type": "ITF" + } + ], + "bill_to": { + "address": { + "score": 1.0, + "value": null + }, + "email": { + "score": 1.0, + "value": null + }, + "name": { + "score": 1.0, + "value": null + }, + "parsed_address": null, + "phone_number": { + "score": 1.0, + "value": null + }, + "reg_number": { + "score": 1.0, + "value": null + }, + "vat_number": { + "score": 1.0, + "value": null + } + }, + "cashback": { + "score": 0.96, + "value": null + }, + "category": { + "score": 0.92, + "value": "Personal Care" + }, + "confidence_details": true, + "created_date": "2024-08-15 15:56:56", + "currency_code": { + "score": 0.95, + "value": "USD" + }, + "custom_fields": {}, + "date": { + "bounding_box": [ + 0, + 0.5332, + 0.1168, + 0.7573, + 0.131 + ], + "bounding_region": [ + 0.5332, + 0.1168, + 0.7573, + 0.1168, + 0.7573, + 0.131, + 0.5332, + 0.131 + ], + "rotation": 0, + "score": 0.99, + "value": "2022-05-24 13:10:00" + }, + "default_category": { + "score": 0.48, + "value": "Job Supplies" + }, + "delivery_date": { + "score": 1.0, + "value": null + }, + "delivery_note_number": { + "score": 1.0, + "value": null + }, + "discount": { + "bounding_box": [ + 0, + 0.7656, + 0.8789, + 0.8823, + 0.8906 + ], + "bounding_region": [ + 0.7656, + 0.8789, + 0.8823, + 0.8789, + 0.8823, + 0.8906, + 0.7656, + 0.8906 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.96, + "value": 1.2 + }, + "document_reference_number": { + "bounding_box": [ + 0, + 0.2944, + 0.7461, + 0.8286, + 0.7627 + ], + "bounding_region": [ + 0.2944, + 0.7461, + 0.8286, + 0.7461, + 0.8286, + 0.7627, + 0.2944, + 0.7627 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.96, + "value": "0329-6224-7823-2205-2403" + }, + "document_title": { + "score": 1.0, + "value": null + }, + "document_type": { + "score": 0.97, + "value": "receipt" + }, + "due_date": { + "score": 1.0, + "value": null + }, + "duplicate_of": null, + "exch_rate": 1.0, + "external_id": null, + "final_balance": { + "score": 0.8, + "value": null + }, + "guest_count": { + "score": 1.0, + "value": null + }, + "id": 233760836, + "img_blur": false, + "img_file_name": "233760836.jpg", + "img_thumbnail_url": "https://scdn.veryfi.com/receipts/6d8fd9e253f4d483/03ac8d91-ac56-4ca5-9113-c82c1db15ef1/thumbnail.jpg?Expires=1723738322&Signature=ZlTxeWEFCglMMKmSyTt9a8YPF2wdVzYQVhHvNr~uvfhzJ~A3ohFi2iTK2sjZDcFmhS8ntzxJWMM8txzVpzRUVjDoYuuMPSAZSgXZZGBsBAyOord8jgP829tl03aGZdXjDP0n8hbowSEi9ArIFGIbzEpW-jqcqpD1bFSgBrDu4Vqjur8jxUQfzL1NSigOKmMfZKCxGGsFazJ1UGqS1ITNI82MsMHmdjT8W5bYmZ-N11RmRI1q4r61IP6gQyhCrBUqxdO8ETnNVsjahKyo7cImOO-c6I-lEeYpkx5X0DjjRdzgjkZy96aMmT8kpKpEWH2Y92VqYc0IIaPDvH8ril3Qjg__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ", + "img_url": "https://scdn.veryfi.com/receipts/6d8fd9e253f4d483/03ac8d91-ac56-4ca5-9113-c82c1db15ef1/8b660bea-d59f-461f-baf1-519a22921307.jpg?Expires=1723738322&Signature=RuYVND23aNyT0K6PhtV4hZLc4tbVyi0INiz9GK2sodnynAVnR4JFIcHl~0Rko4mDncTzX33AcENF9vuY1CrzR~YR5EmhgxppdYp7bsivndA49tmC66WylB~6~rYPTewLZ5VbPDOjJeenCxrBYof9rGRkiNE-WVI088giSyzYvrB0NNR3Go8Mpxu~jDddMqXkajckHFgYf4-wpk-ybMD~GcziI8XF00qiahgpuY5mgSmUKlX0K5Y9P-o6B9pBx4iJ56Di4o5BxPr54dbzILnj4jX2hTsOcjvHDdZSLLbDfvLvMdDE~fFfylzShYJkwTFIu8qCpAdcs0hyB1DcdjKP3Q__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ", + "incoterms": { + "score": 1.0, + "value": null + }, + "insurance": { + "score": 1.0, + "value": null + }, + "invoice_number": { + "bounding_box": [ + 0, + 0.2482, + 0.1201, + 0.3438, + 0.1334 + ], + "bounding_region": [ + 0.2482, + 0.1201, + 0.3437, + 0.1201, + 0.3437, + 0.1334, + 0.2482, + 0.1334 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.99, + "value": "4782" + }, + "is_approved": false, + "is_blurry": [ + false + ], + "is_document": true, + "is_duplicate": false, + "is_money_in": { + "score": 0.9, + "value": false + }, + "license_plate_number": { + "score": 1.0, + "value": null + }, + "line_items": [ + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "RED BULL ENRGY DRNK CNS 8.4OZ 6PK", + "discount": 1.2, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "RED BULL ENRGY DRNK CNS 8.4OZ 6PK", + "hsn": null, + "id": 1041755555, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": "RED BULL ENERGY DRINK CNS 8.4OZ 6PK", + "order": 0, + "price": 9.99, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "61126943157", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "RED BULL ENRGY DRNK CNS 8.4OZ 6PK\n611269431578.79 SALE\nREGULAR PRICE 9.99\nMYWALGREENS SAVINGS 1.20\nRETURN VALUE 8.79", + "total": 8.79, + "type": "alcohol", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "CA REDMP VAL", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "CA REDMP VAL", + "hsn": null, + "id": 1041755556, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 1, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "00000007211", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "CA REDMP VAL\n00000007211\t\t0.30", + "total": 0.3, + "type": "fee", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "COCA COLA MINICAN 7.5Z 6PK", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "COCA COLA MINICAN 7.5Z 6PK", + "hsn": null, + "id": 1041755557, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 2, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "04900006101", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "COCA COLA MINICAN 7.5Z 6PK\n049000061014.99 SALE\nRETURN VALUE 4.99", + "total": 4.99, + "type": "food", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "CA REDMP VAL", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "CA REDMP VAL", + "hsn": null, + "id": 1041755558, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 3, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "00000007211", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "CA REDMP VAL\n00000007211\t\t0.30", + "total": 0.3, + "type": "fee", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "NAB OREO CKIES C/PK 5.25OZ WHSE", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "NAB OREO CKIES C/PK 5.25OZ WHSE", + "hsn": null, + "id": 1041755559, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 4, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "04400000749", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "NAB OREO CKIES C/PK 5.25OZ WHSE\n04400000749\t\t2.69\nRETURN VALUE 2.69", + "total": 2.69, + "type": "food", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "DORITOS NACHO", + "discount": null, + "discount_price": 2.19, + "discount_rate": null, + "end_date": null, + "full_description": "DORITOS NACHO", + "hsn": null, + "id": 1041755560, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 5, + "price": 2.0, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "02840032505", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "DORITOS NACHO\n02840032505\t\t2.00\n1 @ 2.19 or 2/4.00\nRETURN VALUE 2.00", + "total": 2.0, + "type": "food", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "F/LAYS REGULAR 2.63OZ", + "discount": null, + "discount_price": 2.19, + "discount_rate": null, + "end_date": null, + "full_description": "F/LAYS REGULAR 2.63OZ", + "hsn": null, + "id": 1041755561, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 6, + "price": 2.0, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "02840032382", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "F/LAYS REGULAR 2.63OZ\n02840032382\t\t2.00\n1 @ 2.19 or 2/4.00\nRETURN VALUE 2.00", + "total": 2.0, + "type": "food", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "SCOTCH BRITE H/D KITCHN SPONGE 3S", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "SCOTCH BRITE H/D KITCHN SPONGE 3S", + "hsn": null, + "id": 1041755562, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": "SCOTCH BRITE H/D KITCHEN SPONGE 3S", + "order": 7, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "02120057235", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "SCOTCH BRITE H/D KITCHN SPONGE 3S\n021200572354.79\nRETURN VALUE 4.79", + "total": 4.79, + "type": "product", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "PALMOLIVE DISH OXI POWER 10OZ", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "PALMOLIVE DISH OXI POWER 10OZ", + "hsn": null, + "id": 1041755563, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 8, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": "03500000168", + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "PALMOLIVE DISH OXI POWER\t10OZ\n035000001681.49\nRETURN VALUE 1.49", + "total": 1.49, + "type": "product", + "unit_of_measure": null, + "upc": null, + "weight": null + }, + { + "category": "Personal Care", + "country_of_origin": null, + "custom_fields": {}, + "date": null, + "description": "SHOPPING BAG FEE", + "discount": null, + "discount_price": null, + "discount_rate": null, + "end_date": null, + "full_description": "SHOPPING BAG FEE", + "hsn": null, + "id": 1041755564, + "lot": null, + "manufacturer": null, + "net_total": null, + "normalized_description": null, + "order": 9, + "price": null, + "quantity": 1.0, + "reference": null, + "section": null, + "sku": null, + "start_date": null, + "subtotal": null, + "tags": [], + "tax": null, + "tax_code": null, + "tax_rate": null, + "text": "SHOPPING BAG FEE\t0.25", + "total": 0.25, + "type": "fee", + "unit_of_measure": null, + "upc": null, + "weight": null + } + ], + "line_items_with_scores": [ + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0326, + 0.1411, + 0.7573, + 0.1592 + ], + "bounding_region": [ + 0.0325, + 0.146, + 0.7573, + 0.1401, + 0.7574, + 0.1541, + 0.0326, + 0.16 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.96, + "value": "RED BULL ENRGY DRNK CNS 8.4OZ 6PK" + }, + "discount": { + "bounding_box": [ + 0, + 0.5615, + 0.1785, + 0.6489, + 0.1909 + ], + "bounding_region": [ + 0.5615, + 0.1785, + 0.6489, + 0.1785, + 0.6489, + 0.1909, + 0.5615, + 0.1909 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.99, + "value": 1.2 + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0326, + 0.1411, + 0.7573, + 0.1592 + ], + "bounding_region": [ + 0.0325, + 0.146, + 0.7573, + 0.1401, + 0.7574, + 0.1541, + 0.0326, + 0.16 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.96, + "value": "RED BULL ENRGY DRNK CNS 8.4OZ 6PK" + }, + "hsn": { + "value": null + }, + "id": 1041755555, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": "RED BULL ENERGY DRINK CNS 8.4OZ 6PK" + }, + "order": 0, + "price": { + "bounding_box": [ + 0, + 0.4258, + 0.1681, + 0.5195, + 0.1803 + ], + "bounding_region": [ + 0.4258, + 0.1681, + 0.5195, + 0.1681, + 0.5195, + 0.1803, + 0.4258, + 0.1803 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.99, + "value": 9.99 + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1209, + 0.1571, + 0.365, + 0.1699 + ], + "bounding_region": [ + 0.1209, + 0.1571, + 0.365, + 0.1571, + 0.365, + 0.1699, + 0.1209, + 0.1699 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.91, + "value": "61126943157" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "RED BULL ENRGY DRNK CNS 8.4OZ 6PK\n611269431578.79 SALE\nREGULAR PRICE 9.99\nMYWALGREENS SAVINGS 1.20\nRETURN VALUE 8.79", + "total": { + "bounding_box": [ + 0, + 0.7319, + 0.1523, + 0.8223, + 0.1646 + ], + "bounding_region": [ + 0.7319, + 0.1523, + 0.8223, + 0.1523, + 0.8223, + 0.1646, + 0.7319, + 0.1646 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.97, + "value": 8.79 + }, + "type": "alcohol", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0337, + 0.2069, + 0.3008, + 0.2206 + ], + "bounding_region": [ + 0.0336, + 0.2078, + 0.3008, + 0.2066, + 0.3008, + 0.2196, + 0.0337, + 0.2208 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.86, + "value": "CA REDMP VAL" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0337, + 0.2069, + 0.3008, + 0.2206 + ], + "bounding_region": [ + 0.0336, + 0.2078, + 0.3008, + 0.2066, + 0.3008, + 0.2196, + 0.0337, + 0.2208 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.86, + "value": "CA REDMP VAL" + }, + "hsn": { + "value": null + }, + "id": 1041755556, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 1, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1209, + 0.2185, + 0.365, + 0.2312 + ], + "bounding_region": [ + 0.1209, + 0.2185, + 0.365, + 0.2185, + 0.365, + 0.2312, + 0.1209, + 0.2312 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.88, + "value": "00000007211" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "CA REDMP VAL\n00000007211\t\t0.30", + "total": { + "bounding_box": [ + 0, + 0.7329, + 0.2141, + 0.8232, + 0.2253 + ], + "bounding_region": [ + 0.7329, + 0.2141, + 0.8232, + 0.2141, + 0.8232, + 0.2253, + 0.7329, + 0.2253 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.68, + "value": 0.3 + }, + "type": "fee", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0347, + 0.2283, + 0.6055, + 0.2452 + ], + "bounding_region": [ + 0.0346, + 0.2313, + 0.6055, + 0.2271, + 0.6056, + 0.2417, + 0.0347, + 0.2459 + ], + "ocr_score": 0.99, + "rotation": 0, + "score": 0.88, + "value": "COCA COLA MINICAN 7.5Z 6PK" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0347, + 0.2283, + 0.6055, + 0.2452 + ], + "bounding_region": [ + 0.0346, + 0.2313, + 0.6055, + 0.2271, + 0.6056, + 0.2417, + 0.0347, + 0.2459 + ], + "ocr_score": 0.99, + "rotation": 0, + "score": 0.88, + "value": "COCA COLA MINICAN 7.5Z 6PK" + }, + "hsn": { + "value": null + }, + "id": 1041755557, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 2, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1219, + 0.2428, + 0.366, + 0.2556 + ], + "bounding_region": [ + 0.1219, + 0.2428, + 0.366, + 0.2428, + 0.366, + 0.2556, + 0.1219, + 0.2556 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.91, + "value": "04900006101" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "COCA COLA MINICAN 7.5Z 6PK\n049000061014.99 SALE\nRETURN VALUE 4.99", + "total": { + "bounding_box": [ + 0, + 0.731, + 0.238, + 0.8203, + 0.2496 + ], + "bounding_region": [ + 0.731, + 0.238, + 0.8203, + 0.238, + 0.8203, + 0.2496, + 0.731, + 0.2496 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.93, + "value": 4.99 + }, + "type": "food", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0347, + 0.2683, + 0.3008, + 0.281 + ], + "bounding_region": [ + 0.0347, + 0.269, + 0.3008, + 0.268, + 0.3008, + 0.2802, + 0.0347, + 0.2812 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.85, + "value": "CA REDMP VAL" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0347, + 0.2683, + 0.3008, + 0.281 + ], + "bounding_region": [ + 0.0347, + 0.269, + 0.3008, + 0.268, + 0.3008, + 0.2802, + 0.0347, + 0.2812 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.85, + "value": "CA REDMP VAL" + }, + "hsn": { + "value": null + }, + "id": 1041755558, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 3, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1219, + 0.2791, + 0.366, + 0.2927 + ], + "bounding_region": [ + 0.1219, + 0.2791, + 0.366, + 0.2791, + 0.366, + 0.2927, + 0.1219, + 0.2927 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.86, + "value": "00000007211" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "CA REDMP VAL\n00000007211\t\t0.30", + "total": { + "bounding_box": [ + 0, + 0.73, + 0.2742, + 0.8257, + 0.2861 + ], + "bounding_region": [ + 0.73, + 0.2742, + 0.8257, + 0.2742, + 0.8257, + 0.2861, + 0.73, + 0.2861 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.66, + "value": 0.3 + }, + "type": "fee", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0368, + 0.2864, + 0.7593, + 0.3069 + ], + "bounding_region": [ + 0.0367, + 0.2915, + 0.7593, + 0.2856, + 0.7594, + 0.3016, + 0.0368, + 0.3075 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.91, + "value": "NAB OREO CKIES C/PK 5.25OZ WHSE" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0368, + 0.2864, + 0.7593, + 0.3069 + ], + "bounding_region": [ + 0.0367, + 0.2915, + 0.7593, + 0.2856, + 0.7594, + 0.3016, + 0.0368, + 0.3075 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.91, + "value": "NAB OREO CKIES C/PK 5.25OZ WHSE" + }, + "hsn": { + "value": null + }, + "id": 1041755559, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 4, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1241, + 0.3035, + 0.366, + 0.3164 + ], + "bounding_region": [ + 0.1241, + 0.3164, + 0.1241, + 0.3035, + 0.366, + 0.3035, + 0.366, + 0.3164 + ], + "ocr_score": 0.99, + "rotation": 0, + "score": 0.89, + "value": "04400000749" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "NAB OREO CKIES C/PK 5.25OZ WHSE\n04400000749\t\t2.69\nRETURN VALUE 2.69", + "total": { + "bounding_box": [ + 0, + 0.731, + 0.2991, + 0.8213, + 0.3101 + ], + "bounding_region": [ + 0.731, + 0.2991, + 0.8213, + 0.2991, + 0.8213, + 0.3101, + 0.731, + 0.3101 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.71, + "value": 2.69 + }, + "type": "food", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0358, + 0.3281, + 0.324, + 0.3411 + ], + "bounding_region": [ + 0.0357, + 0.3289, + 0.324, + 0.3277, + 0.324, + 0.3405, + 0.0358, + 0.3417 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.97, + "value": "DORITOS NACHO" + }, + "discount": { + "value": null + }, + "discount_price": { + "bounding_box": [ + 0, + 0.2083, + 0.3518, + 0.2998, + 0.364 + ], + "bounding_region": [ + 0.2083, + 0.3518, + 0.2998, + 0.3518, + 0.2998, + 0.364, + 0.2083, + 0.364 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.96, + "value": 2.19 + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0358, + 0.3281, + 0.324, + 0.3411 + ], + "bounding_region": [ + 0.0357, + 0.3289, + 0.324, + 0.3277, + 0.324, + 0.3405, + 0.0358, + 0.3417 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.97, + "value": "DORITOS NACHO" + }, + "hsn": { + "value": null + }, + "id": 1041755560, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 5, + "price": { + "bounding_box": [ + 0, + 0.3838, + 0.3499, + 0.5176, + 0.3623 + ], + "bounding_region": [ + 0.3838, + 0.3499, + 0.5176, + 0.3499, + 0.5176, + 0.3623, + 0.3838, + 0.3623 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.98, + "value": 2.0 + }, + "quantity": { + "bounding_box": [ + 0, + 0.1272, + 0.3535, + 0.1472, + 0.365 + ], + "bounding_region": [ + 0.1272, + 0.3535, + 0.1472, + 0.3535, + 0.1472, + 0.365, + 0.1272, + 0.365 + ], + "ocr_score": 0.94, + "rotation": 0, + "score": 0.97, + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1241, + 0.3394, + 0.3679, + 0.3525 + ], + "bounding_region": [ + 0.1241, + 0.3525, + 0.1241, + 0.3394, + 0.3679, + 0.3394, + 0.3679, + 0.3525 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.96, + "value": "02840032505" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "DORITOS NACHO\n02840032505\t\t2.00\n1 @ 2.19 or 2/4.00\nRETURN VALUE 2.00", + "total": { + "bounding_box": [ + 0, + 0.7319, + 0.3347, + 0.8232, + 0.3472 + ], + "bounding_region": [ + 0.7319, + 0.3347, + 0.8232, + 0.3347, + 0.8232, + 0.3472, + 0.7319, + 0.3472 + ], + "ocr_score": 0.99, + "rotation": 0, + "score": 0.94, + "value": 2.0 + }, + "type": "food", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0399, + 0.3738, + 0.4963, + 0.3904 + ], + "bounding_region": [ + 0.0398, + 0.3763, + 0.4963, + 0.3724, + 0.4965, + 0.3877, + 0.04, + 0.3915 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.95, + "value": "F/LAYS REGULAR 2.63OZ" + }, + "discount": { + "value": null + }, + "discount_price": { + "bounding_box": [ + 0, + 0.2092, + 0.3994, + 0.3008, + 0.4119 + ], + "bounding_region": [ + 0.2092, + 0.3994, + 0.3008, + 0.3994, + 0.3008, + 0.4119, + 0.2092, + 0.4119 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.95, + "value": 2.19 + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0399, + 0.3738, + 0.4963, + 0.3904 + ], + "bounding_region": [ + 0.0398, + 0.3763, + 0.4963, + 0.3724, + 0.4965, + 0.3877, + 0.04, + 0.3915 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.95, + "value": "F/LAYS REGULAR 2.63OZ" + }, + "hsn": { + "value": null + }, + "id": 1041755561, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 6, + "price": { + "bounding_box": [ + 0, + 0.3828, + 0.3975, + 0.5176, + 0.4104 + ], + "bounding_region": [ + 0.3828, + 0.3975, + 0.5176, + 0.3975, + 0.5176, + 0.4104, + 0.3828, + 0.4104 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.98, + "value": 2.0 + }, + "quantity": { + "bounding_box": [ + 0, + 0.1283, + 0.4011, + 0.1483, + 0.4126 + ], + "bounding_region": [ + 0.1283, + 0.4011, + 0.1483, + 0.4011, + 0.1483, + 0.4126, + 0.1283, + 0.4126 + ], + "ocr_score": 0.95, + "rotation": 0, + "score": 0.96, + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1241, + 0.3877, + 0.3679, + 0.4006 + ], + "bounding_region": [ + 0.1241, + 0.4006, + 0.1241, + 0.3877, + 0.3679, + 0.3877, + 0.3679, + 0.4006 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.95, + "value": "02840032382" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "F/LAYS REGULAR 2.63OZ\n02840032382\t\t2.00\n1 @ 2.19 or 2/4.00\nRETURN VALUE 2.00", + "total": { + "bounding_box": [ + 0, + 0.7319, + 0.3833, + 0.8232, + 0.3953 + ], + "bounding_region": [ + 0.7319, + 0.3833, + 0.8232, + 0.3833, + 0.8232, + 0.3953, + 0.7319, + 0.3953 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.92, + "value": 2.0 + }, + "type": "food", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0378, + 0.4199, + 0.7549, + 0.4382 + ], + "bounding_region": [ + 0.0377, + 0.4245, + 0.7549, + 0.4184, + 0.755, + 0.4333, + 0.0379, + 0.4394 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.91, + "value": "SCOTCH BRITE H/D KITCHN SPONGE 3S" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0378, + 0.4199, + 0.7549, + 0.4382 + ], + "bounding_region": [ + 0.0377, + 0.4245, + 0.7549, + 0.4184, + 0.755, + 0.4333, + 0.0379, + 0.4394 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 0.91, + "value": "SCOTCH BRITE H/D KITCHN SPONGE 3S" + }, + "hsn": { + "value": null + }, + "id": 1041755562, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": "SCOTCH BRITE H/D KITCHEN SPONGE 3S" + }, + "order": 7, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1241, + 0.4346, + 0.3669, + 0.4485 + ], + "bounding_region": [ + 0.1241, + 0.4346, + 0.3669, + 0.4346, + 0.3669, + 0.4485, + 0.1241, + 0.4485 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.87, + "value": "02120057235" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "SCOTCH BRITE H/D KITCHN SPONGE 3S\n021200572354.79\nRETURN VALUE 4.79", + "total": { + "bounding_box": [ + 0, + 0.73, + 0.4314, + 0.8193, + 0.4429 + ], + "bounding_region": [ + 0.73, + 0.4314, + 0.8193, + 0.4314, + 0.8193, + 0.4429, + 0.73, + 0.4429 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.88, + "value": 4.79 + }, + "type": "product", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0378, + 0.4536, + 0.7583, + 0.4744 + ], + "bounding_region": [ + 0.0377, + 0.4595, + 0.7583, + 0.4528, + 0.7584, + 0.4695, + 0.0379, + 0.4762 + ], + "ocr_score": 0.92, + "rotation": 0, + "score": 0.6, + "value": "PALMOLIVE DISH OXI POWER 10OZ" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0378, + 0.4536, + 0.7583, + 0.4744 + ], + "bounding_region": [ + 0.0377, + 0.4595, + 0.7583, + 0.4528, + 0.7584, + 0.4695, + 0.0379, + 0.4762 + ], + "ocr_score": 0.92, + "rotation": 0, + "score": 0.6, + "value": "PALMOLIVE DISH OXI POWER 10OZ" + }, + "hsn": { + "value": null + }, + "id": 1041755563, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 8, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "bounding_box": [ + 0, + 0.1251, + 0.4712, + 0.366, + 0.4841 + ], + "bounding_region": [ + 0.1251, + 0.4712, + 0.366, + 0.4712, + 0.366, + 0.4841, + 0.1251, + 0.4841 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.73, + "value": "03500000168" + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "PALMOLIVE DISH OXI POWER\t10OZ\n035000001681.49\nRETURN VALUE 1.49", + "total": { + "bounding_box": [ + 0, + 0.7349, + 0.4675, + 0.8203, + 0.4788 + ], + "bounding_region": [ + 0.7349, + 0.4675, + 0.8203, + 0.4675, + 0.8203, + 0.4788, + 0.7349, + 0.4788 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.67, + "value": 1.49 + }, + "type": "product", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + }, + { + "category": { + "value": "Personal Care" + }, + "country_of_origin": { + "value": null + }, + "custom_fields": {}, + "date": { + "value": null + }, + "description": { + "bounding_box": [ + 0, + 0.0368, + 0.4951, + 0.3911, + 0.5098 + ], + "bounding_region": [ + 0.0367, + 0.4966, + 0.3911, + 0.4948, + 0.3912, + 0.5089, + 0.0368, + 0.5107 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.75, + "value": "SHOPPING BAG FEE" + }, + "discount": { + "value": null + }, + "discount_price": { + "value": null + }, + "discount_rate": { + "value": null + }, + "end_date": { + "value": null + }, + "full_description": { + "bounding_box": [ + 0, + 0.0368, + 0.4951, + 0.3911, + 0.5098 + ], + "bounding_region": [ + 0.0367, + 0.4966, + 0.3911, + 0.4948, + 0.3912, + 0.5089, + 0.0368, + 0.5107 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.75, + "value": "SHOPPING BAG FEE" + }, + "hsn": { + "value": null + }, + "id": 1041755564, + "lot": { + "value": null + }, + "manufacturer": { + "value": null + }, + "net_total": { + "value": null + }, + "normalized_description": { + "value": null + }, + "order": 9, + "price": { + "value": null + }, + "quantity": { + "value": 1.0 + }, + "reference": { + "value": null + }, + "section": { + "value": null + }, + "sku": { + "value": null + }, + "start_date": { + "value": null + }, + "subtotal": { + "value": null + }, + "tags": [], + "tax": { + "value": null + }, + "tax_code": { + "value": null + }, + "tax_rate": { + "value": null + }, + "text": "SHOPPING BAG FEE\t0.25", + "total": { + "bounding_box": [ + 0, + 0.7319, + 0.4915, + 0.8223, + 0.5029 + ], + "bounding_region": [ + 0.7319, + 0.4915, + 0.8223, + 0.4915, + 0.8223, + 0.5029, + 0.7319, + 0.5029 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.72, + "value": 0.25 + }, + "type": "fee", + "unit_of_measure": { + "value": null + }, + "upc": { + "value": null + }, + "weight": { + "value": null + } + } + ], + "meta": { + "duplicates": [], + "fraud": { + "attribution": null, + "color": "green", + "custom_types": [], + "decision": "Not Fraud", + "images": [], + "pages": [], + "score": 0.5, + "submissions": {}, + "types": [], + "version": null + }, + "handwritten_fields": [], + "language": [ + { + "score": 0.7, + "value": "en" + } + ], + "owner": "ocr_api", + "pages": [ + { + "height": 3373, + "language": [ + { + "score": 0.7, + "value": "en" + } + ], + "screenshot": { + "score": 0.9300000071525574, + "type": null + }, + "width": 951 + } + ], + "processed_pages": 1, + "source": "api", + "source_documents": [ + { + "height": 3373, + "size_kb": 2399, + "width": 951 + } + ], + "total_pages": 1, + "warnings": [ + { + "message": "Line item SKU #00000007211 repeats on lines 2, 4", + "type": "line_item_repeats" + }, + { + "message": "Line item Description \"CA REDMP VAL\" repeats on lines 2, 4", + "type": "line_item_repeats" + } + ] + }, + "model": "2.45.0", + "notes": null, + "ocr_text": "Walgreens\n#03296 191 E 3RD AVE\nSAN MATEO, CA 94401\n\t650-342-2723\n117\t4782 0022 05/24/2022 1:10 PM\nRED BULL ENRGY DRNK CNS 8.4OZ 6PK\n61126943157\tA\t8.79 SALE\nREGULAR PRICE 9.99\nMYWALGREENS SAVINGS 1.20\nRETURN VALUE 8.79\nCA REDMP VAL\n00000007211\t\t0.30\nCOCA COLA MINICAN 7.5Z 6PK\n04900006101\tA\t4.99 SALE\nRETURN VALUE 4.99\nCA REDMP VAL\n00000007211\t\t0.30\nNAB OREO CKIES C/PK 5.25OZ WHSE\n04400000749\t\t2.69\nRETURN VALUE 2.69\nDORITOS NACHO\n02840032505\t\t2.00\n1 @ 2.19 or 2/4.00\nRETURN VALUE 2.00\nF/LAYS REGULAR 2.63OZ\n02840032382\t\t2.00\n1 @ 2.19 or 2/4.00\nRETURN VALUE 2.00\nSCOTCH BRITE H/D KITCHN SPONGE 3S\n02120057235\tA\t4.79\nRETURN VALUE 4.79\nPALMOLIVE DISH OXI POWER\t10OZ\n03500000168\tA\t1.49\nRETURN VALUE 1.49\nSHOPPING BAG FEE\t0.25\nSUBTOTAL\t\t27.60\nSALES TAX A=9.625%\t1.93\nTOTAL\t\t29.53\nVISA ACCT 1850\t29.53\nAUTH CODE\t\t798553\nCHANGE\t\t.00\n\nMYWALGREENS SAVINGS\tof\t1.20\nTHANK YOU FOR SHOPPING AT WALGREENS\nREDEEM $1 WALGREENS CASH REWARDS ON YOUR\nNEXT PURCHASE! WALGREENS CASH REWARDS\nCANNOT BE REDEEMED ON SOME ITEMS. FOR\nFULL DETAILS SEE MYWALGREENS.COM\nRFN# 0329-6224-7823-2205-2403\n\n*****\nmyW\nTOTAL SAVINGS\t\t$1.20\nSAVINGS VALUE\t\t4%\n$1.40 W CASH REWARDS AVAILABLE\nmyWalgreens ACCT # *********0053\n\t008\nOPENING BALANCE\t\t$1.14\nEARNED THIS VISIT\t\t$0.26\nCLOSING BALANCE\t\t$1.40", + "order_date": { + "score": 1.0, + "value": null + }, + "payment": { + "card_number": { + "bounding_box": [ + 0, + 0.345, + 0.5664, + 0.4333, + 0.5786 + ], + "bounding_region": [ + 0.345, + 0.5664, + 0.4333, + 0.5664, + 0.4333, + 0.5786, + 0.345, + 0.5786 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.99, + "value": "1850" + }, + "display_name": "Visa ***1850", + "terms": { + "score": 1.0, + "value": null + }, + "type": { + "score": 0.97, + "value": "visa" + } + }, + "pdf_url": "https://scdn.veryfi.com/receipts/6d8fd9e253f4d483/03ac8d91-ac56-4ca5-9113-c82c1db15ef1/cd0d6131-01fb-48a6-a055-2c33a2eede97.pdf?Expires=1723738322&Signature=ThI1hqFLt8i02SKZh~1zAktWh-ha5RYN~xJE8-tbFtBP40xwBAvf7gPETI3aJtFHDT~FIqVobhvnWUS70qv3g~bf5ednGVv-A8NW8bpz1iAga~wWsPqg6F-hR6JGv4qOX4O0hUEAkW-owgj2Ny5wXpJfykJiMXKvVkGSEGXxyHQ9Sjwo-hh9dBk-~MBkpFiOLgcA1yxh7njzDJM~SFppePVp9VlmRqRnmuKlIp-G2y7OeMslJqypsCJdtyr4N6qU3L5I6jq4xF8PlkVmsByRPytFoxwXka3UfAB8xhxIB23epuHybOY6NTnP8TFxjBJ8fn50wEJP-SzMFrgBi6bCaA__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ", + "previous_balance": { + "score": 0.88, + "value": null + }, + "purchase_order_number": { + "score": 1.0, + "value": null + }, + "reference_number": "VCBFH-60836", + "rounding": { + "score": 1.0, + "value": null + }, + "server_name": { + "score": 1.0, + "value": null + }, + "service_end_date": { + "score": 1.0, + "value": null + }, + "service_start_date": { + "score": 1.0, + "value": null + }, + "ship_date": { + "score": 1.0, + "value": null + }, + "ship_to": { + "address": { + "score": 1.0, + "value": null + }, + "name": { + "score": 1.0, + "value": null + }, + "parsed_address": null + }, + "shipping": { + "score": 1.0, + "value": null + }, + "status": "processed", + "store_number": { + "bounding_box": [ + 0, + 0.2744, + 0.0699, + 0.408, + 0.0821 + ], + "bounding_region": [ + 0.2744, + 0.0699, + 0.408, + 0.0699, + 0.408, + 0.0821, + 0.2744, + 0.0821 + ], + "ocr_score": 0.97, + "rotation": 0, + "score": 0.98, + "value": "03296" + }, + "subtotal": { + "bounding_box": [ + 0, + 0.71, + 0.5151, + 0.8232, + 0.5273 + ], + "bounding_region": [ + 0.71, + 0.5151, + 0.8232, + 0.5151, + 0.8232, + 0.5273, + 0.71, + 0.5273 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 0.99, + "value": 27.6 + }, + "tags": [], + "tax": { + "bounding_box": [ + 0, + 0.7349, + 0.5278, + 0.8223, + 0.5386 + ], + "bounding_region": [ + 0.7349, + 0.5278, + 0.8223, + 0.5278, + 0.8223, + 0.5386, + 0.7349, + 0.5386 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 1.0, + "value": 1.93 + }, + "tax_lines": [ + { + "base": null, + "code": "A", + "name": null, + "order": 0, + "rate": 9.625, + "total": 1.93, + "total_inclusive": null + } + ], + "tax_lines_with_scores": [ + { + "base": { + "value": null + }, + "code": { + "bounding_box": [ + 0, + 0.3396, + 0.5293, + 0.5205, + 0.543 + ], + "bounding_region": [ + 0.3396, + 0.543, + 0.3396, + 0.5293, + 0.5205, + 0.5293, + 0.5205, + 0.543 + ], + "ocr_score": 0.8, + "rotation": 0, + "score": 1.0, + "value": "A" + }, + "name": { + "value": null + }, + "order": 0, + "rate": { + "bounding_box": [ + 0, + 0.3396, + 0.5293, + 0.5205, + 0.543 + ], + "bounding_region": [ + 0.3396, + 0.543, + 0.3396, + 0.5293, + 0.5205, + 0.5293, + 0.5205, + 0.543 + ], + "ocr_score": 0.8, + "rotation": 0, + "score": 1.0, + "value": 9.625 + }, + "total": { + "bounding_box": [ + 0, + 0.7349, + 0.5278, + 0.8223, + 0.5386 + ], + "bounding_region": [ + 0.7349, + 0.5278, + 0.8223, + 0.5278, + 0.8223, + 0.5386, + 0.7349, + 0.5386 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 1.0, + "value": 1.93 + }, + "total_inclusive": { + "value": null + } + } + ], + "total": { + "bounding_box": [ + 0, + 0.71, + 0.5518, + 0.8203, + 0.562 + ], + "bounding_region": [ + 0.71, + 0.5518, + 0.8203, + 0.5518, + 0.8203, + 0.562, + 0.71, + 0.562 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 1.0, + "value": 29.53 + }, + "total_pages": 1, + "total_quantity": { + "score": 1.0, + "value": null + }, + "total_weight": { + "score": 1.0, + "value": null + }, + "tracking_number": { + "score": 1.0, + "value": null + }, + "tracking_numbers": [ + { + "score": 1.0, + "value": null + } + ], + "updated_date": "2024-08-15 15:57:03", + "vending_person": { + "score": 1.0, + "value": null + }, + "vending_person_number": { + "score": 1.0, + "value": null + }, + "vendor": { + "abn_number": { + "score": 1.0, + "value": null + }, + "account_currency": { + "score": 1.0, + "value": null + }, + "account_number": { + "score": 1.0, + "value": null + }, + "address": { + "value": "191 E 3rd Ave, San Mateo, CA 94401, US" + }, + "bank_breakdown": [ + {} + ], + "bank_name": { + "score": 1.0, + "value": null + }, + "bank_number": { + "score": 1.0, + "value": null + }, + "bank_swift": { + "score": 1.0, + "value": null + }, + "biller_code": { + "score": 1.0, + "value": null + }, + "category": { + "value": "drugstores, convenience stores, cosmetics & beauty supply" + }, + "country_code": { + "score": 0.97, + "value": "US" + }, + "email": { + "score": 1.0, + "value": null + }, + "external_id": null, + "external_ids": [ + { + "id": "dkERnKgR9jkDSwuF1xFkyg", + "source": "yelp" + } + ], + "fax_number": { + "score": 1.0, + "value": null + }, + "iban": { + "score": 1.0, + "value": null + }, + "lat": 37.565083, + "lng": -122.323544, + "logo": "https://cdn.veryfi.com/logos/us/126568182.jpeg", + "map_url": "https://www.google.com/maps/search/?api=1&query=Walgreens+191+E+3rd+Ave,+San+Mateo,+CA+94401,+US", + "name": { + "rotation": 0, + "score": 0.98, + "value": "Walgreens" + }, + "order_number": { + "score": 1.0, + "value": null + }, + "phone_number": { + "bounding_box": [ + 0, + 0.3628, + 0.0937, + 0.6265, + 0.1068 + ], + "bounding_region": [ + 0.3628, + 0.0937, + 0.6265, + 0.0937, + 0.6265, + 0.1068, + 0.3628, + 0.1068 + ], + "ocr_score": 1.0, + "rotation": 0, + "score": 1.0, + "value": "650-342-2723" + }, + "raw_address": { + "bounding_box": [ + 0, + 0.2734, + 0.0682, + 0.7148, + 0.0958 + ], + "bounding_region": [ + 0.2733, + 0.0703, + 0.7148, + 0.0678, + 0.715, + 0.0939, + 0.2734, + 0.0964 + ], + "ocr_score": 0.99, + "rotation": 0, + "score": 0.99, + "value": "191 E 3RD AVE\nSAN MATEO, CA 94401" + }, + "raw_name": { + "bounding_box": [ + 0, + 0.6016, + 0.6582, + 0.7993, + 0.6724 + ], + "bounding_region": [ + 0.6016, + 0.6582, + 0.7993, + 0.6582, + 0.7993, + 0.6724, + 0.6016, + 0.6724 + ], + "ocr_score": 0.98, + "rotation": 0, + "score": 1.0, + "value": "WALGREENS" + }, + "reg_number": { + "score": 1.0, + "value": null + }, + "type": { + "value": "drugstores, convenience stores, cosmetics & beauty supply" + }, + "vat_number": { + "score": 1.0, + "value": null + }, + "web": { + "score": 0.81, + "value": null + } + }, + "vendors": [ + { + "rotation": 0, + "score": 0.98, + "value": "Walgreens" + } + ], + "vin_number": { + "score": 1.0, + "value": null + }, + "warnings": [], + "weights": [ + { + "score": 1.0, + "value": null + } + ] } ``` diff --git a/setup.cfg b/setup.cfg index dfef831..0eba05a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -8,8 +8,6 @@ url = https://github.com/veryfi/veryfi-python license = MIT classifiers = Development Status :: 5 - Production/Stable - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: Implementation :: CPython diff --git a/tox.ini b/tox.ini index 40c9b51..46bd383 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,11 @@ [tox] -envlist = py37, py38, py39, py310, py311, py312, report +envlist = py39, py310, py311, py312, report skipsdist = true skip_install = true -basepython = py37 +basepython = py39 [gh-actions] python = - 3.7: py37 - 3.8: py38, report 3.9: py39 3.10: py310 3.11: py311 From 338e3d8258fe06b45607168df55a565e5b37df6e Mon Sep 17 00:00:00 2001 From: Valeriy Mukhtarulin Date: Thu, 15 Aug 2024 12:02:09 -0400 Subject: [PATCH 3/3] Fix test --- tests/test_line_items.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/test_line_items.py b/tests/test_line_items.py index f3b4743..07ac3e7 100644 --- a/tests/test_line_items.py +++ b/tests/test_line_items.py @@ -1,12 +1,10 @@ -import pytest import responses from veryfi import * -@pytest.mark.parametrize("client_secret", [None, "s"]) @responses.activate -def test_line_items(client_secret): +def test_line_items(): mock_doc_id = 1 mock_line_item_id = 1 mock_resp = { @@ -29,7 +27,7 @@ def test_line_items(client_secret): } ], } - client = Client(client_id="v", client_secret=client_secret, username="o", api_key="c") + client = Client(client_id="v", client_secret=None, username="o", api_key="c") responses.add( responses.GET, f"{client.versioned_url}/partner/documents/{mock_doc_id}/line-items/", @@ -80,10 +78,6 @@ def test_line_items(client_secret): json=mock_resp["line_items"][0], status=200, ) - with pytest.raises(Exception): - client.add_line_item(mock_doc_id, {"order": 1}) - with pytest.raises(Exception): - client.add_line_item(mock_doc_id, {"order": 1, "description": "foo"}) assert ( client.add_line_item(mock_doc_id, {"order": 1, "description": "foo", "total": 1.0})