Process a Document
POST/api/v7/partner/documents
Process a document and extract all the fields from it.
Request
- multipart/form-data
- application/json
Body
Body
Optional file name.
Base64 encoded file. Required if file_url
or file_urls
isn't specified.
Publicly accessible URL. Required if file_urls
or file_data
isn't specified.
List of publicly accessible URLs to multiple files. Required if file_url
or file_data
isn't specified.
List of categories, if you would like to use your own list and it’s different from the default one.
When sending a long document to Veryfi for processing, this parameter controls how many pages of the document will be read and processed, starting from page 1.
Flag that tells Veryfi whether boost mode should be enabled. When set to 1
, Veryfi will skip data enrichment steps, but will process the document faster. Default value is 0
.
Delete this document from Veryfi after data has been extracted. Default value is 0
.
Use this if you would like to assign your own ID to documents.
Switch to enable asynchronous processing mode. Default value is 0
. Click here for more details.
Flag that tells Veryfi whether vendor's address should be parsed into their own components such as street address, city, country, state, etc.
Responses
- 201
- default
Processed document response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
ABN Number (Australian Business Number)
Account Number
Bill To Address
Bill To Name
Bill To VAT Number
Card Number
Cashback
Category
Created Date
Currency Code
Date
Delivery Date
Discount
Document Reference Number
Document Title
Document Type
Due Date
Duplicated Document ID
External ID
Document ID
Image File Name
Image Thumbnail URL
Image URL
Insurance
Invoice Number
Is Duplicated
1 if refund or credit note
line_items object[]
List Of Line Items
Date
Description
Discount
Discount Rate
ID
Order
Price
Quantity
Reference Number
Section
Stock Keeping Unit (SKU)
Tax
Tax Rate
Text
Total
Type
Unit Of Measure
Notes
OCR Text
Order Date
Payment Display Name
Payment Terms
Payment Type
Phone Number
Purchase Order Number
Rounding Number
Service End Date
Service Start Date
Shipping Date
Shipping Address
Shipping Recipient
Shipping
Store Number
Subtotal
Tax
tax_lines object[]
Tax Lines Breakdown
Tax Base
Tax Name
Tax Rate %
Tax Total
Tip
Total
Total Weight
Tracking Number
Updated Date
VAT Number
vendor object
Vendor Address
Vendor Category
Vendor Email
Vendor Fax Number
Vendor Name
parsed_address object
The settlement including cities, towns, villages, hamlets, localities, etc.
The sovereign nations and their dependent territories, anything with an ISO-3166 code.
The postal code used for mail sorting
A first-level administrative division. Scotland, Northern Ireland, Wales, and England in the UK are mapped to "state" as well
A sum of house_number
road, building, unit.
The venue name e.g. "Brooklyn Academy of Music", and building names e.g. "Empire State Building".
Usually refers to the external (street-facing) building number. In some countries this may be a compound, hyphenated number, which also includes an apartment number, or a block number (a la Japan).
Street name(s)
An apartment, unit, office, lot, or other secondary unit designator.
The expressions indicating a floor number e.g. "3rd Floor", "Ground Floor", etc.
Numbered/lettered staircase
Numbered/lettered entrance
The post office box, typically found in non-physical (mail-only) addresses.
An unofficial neighborhood name like "Harlem", "South Bronx", or "Crown Heights".
The boroughs or districts within a city that serve some official purpose e.g. "Brooklyn" or "Hackney" or "Bratislava IV".
Named islands e.g. "Maui"
Usually a second-level administrative division or county.
Informal subdivision of a country without any political status.
Only used for appending "West Indies" after the country name, a pattern frequently used in the English-speaking Caribbean e.g. "Jamaica, West Indies".
Vendor Phone Number
Vendor Raw Name
Vendor Logo
Vendor Registration Number
Vendor Type
Vendor Web
Vendor Account Number
Vendor Bank Name
Vendor Bank Number
Vendor Bank Swift
International Bank Account Number (IBAN)
{
"abn_number": "",
"account_number": "",
"bill_to_address": "2 Court Square\nNew York, NY 12210",
"bill_to_name": "John Smith",
"bill_to_vat_number": "",
"card_number": "7373",
"cashback": 7.66,
"category": "Meals & Entertainment",
"created": "2021-08-05 17:24:48",
"currency_code": "USD",
"date": "2021-08-05 10:24:48",
"delivery_date": "",
"discount": 7.66,
"document_reference_number": "",
"document_title": "INVOICE",
"document_type": "invoice",
"due_date": "",
"duplicate_of": "",
"external_id": "",
"id": "",
"img_file_name": "8247b18a-41f0-443c-bbf4-10814385e097.pdf",
"img_thumbnail_url": "https://scdn.veryfi.com/receipts/470e7ab9-3084-4d05-b840-885383a2c22e/thumbnail.jpg?Expires=1628185188&Signature=cnyZCF~GnF2TkizYWObnGuNDhmkCsRl5-XoVymoalJFjJCrQKmq7RbpS6RCUnt60aVlPiT1uJeQJXG4eyZOg~FfJc5-ieC0gkqAFhh9vCRjzph15niTfq0mKg23nOu3YR8BJcWBfPfEL8k3FEqFERsvUBNddvfCkfx9JoMlq9ATNBQLxkK4lJPF4vMcFpkiCStOEt0MDJM80NbgPAqZEAQuDzygaiy8owaGiOVIj0h0ZMzLHNPzf5flGYqK6D2LvGRZlEIESavULk1Eug7tuG1DiqxTaDDxDbBGUCDb9ZIaKQAsPXzoEHUExB3J61q-B5KTFJSNch1okMe6sT9fzpQ__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ",
"img_url": "https://scdn.veryfi.com/receipts/470e7ab9-3084-4d05-b840-885383a2c22e/8247b18a-41f0-443c-bbf4-10814385e097.pdf?Expires=1628185188&Signature=OAaTOHH3KQYlj9pPA0fO50VjQSC8hnJJVvyJZwiGbK-wLw76UF5tWm0XtD5Htp2xx0vXbqJINIT7joyLA1dik01qDprgUbuXfcGamPUgJ6xcLOBKBF855bpFepK0Jdr-x9aGnx4EER7Z~CxUgvrv99cuFGuMab2s9gr0DwXHgLTCzVMZ2dOhbbvR8Yw8ADddzoOSPkwc~3PBB6AGla8cTQmSO0EWlq87rPaXWRrOnqnHwv5RqLWzVpODWVLeBYYudE2ZlaO~U7ftHzc0llKl3kffn4hElaDd5a7VoN0V9yKrGa1cCgRyYmFy9qtGsn3XPZutgnnzkB-~p6y0CUr7Zg__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ",
"insurance": 0,
"invoice_number": "",
"is_duplicate": 0,
"is_money_in": 0,
"line_items": [
{
"date": "2021-11-25 16:20:12",
"description": "98 Meat Pty Xchz",
"discount": 0,
"discount_rate": 0,
"id": 75788890,
"order": 1,
"price": 12.5,
"quantity": 1,
"reference": "",
"section": "",
"sku": "038902058959",
"tax": 7.66,
"tax_rate": 7.66,
"text": "GINGER CARROT SOUP",
"total": 88.2,
"type": "food",
"unit_of_measure": ""
}
],
"notes": "",
"ocr_text": "2004-10-31\\n\\t8:21 PM\\nYOUR GUEST NUMBER IS\\n98\\nIN-N-OUT BURGER LAS VEGAS EASTERN\\n2004-10-31\\t\\t8:21 PM\\n165 1 5 98\\nCashier: SAM\\nGUEST #: 98\\nCounter-Eat in\\n\\t2.65\\nDbDb\\t\\t88.20\\n98 Meat Pty Xchz\\n\\t90.85\\nCounter-Eat In\\t\\t6.81\\nTAX 7.50%\\t\\t97.66\\nAmount Due\\n\\t$97.66\\nCASH TENDER\\t\\t$.00\\nChange\\n2004-10-31\\t\\t8:21 PM\\nTHANK YOU!",
"order_date": "",
"payment_display_name": "Visa",
"payment_terms": "15 days",
"payment_type": "visa",
"phone_number": "61784074851",
"purchase_order_number": "2312/2019",
"rounding": 0,
"service_end_date": "",
"service_start_date": "",
"ship_date": "",
"ship_to_address": "3787 Pineview Drive\nCambridge, MA 12210",
"ship_to_name": "John Smith",
"shipping": 0,
"store_number": "",
"subtotal": 97.66,
"tax": 12.5,
"tax_lines": [
{
"base": 1.11,
"name": "SALE",
"rate": 1.11,
"total": 2.22
}
],
"tip": 12.5,
"total": 97.66,
"total_weight": "",
"tracking_number": "",
"updated": "2021-08-05 17:24:48",
"vat_number": "",
"vendor": {
"address": "1912 Harvest Lane\nNew York, NY 12210",
"category": "Fast Food",
"email": "",
"fax_number": "",
"name": "In-n-out Burger",
"parsed_address": {
"city": "Round Rock",
"country": "United States",
"postcode": "78681",
"state": "TX",
"street_address": "2500, Hoppe Trl At Wolle Ln",
"house": "string",
"house_number": "string",
"road": "string",
"unit": "string",
"level": "string",
"staircase": "string",
"entrance": "string",
"po_box": "string",
"suburb": "string",
"city_district": "string",
"island": "string",
"state_district": "string",
"country_region": "string",
"world_region": "string"
},
"phone_number": "165 1 5 98",
"raw_name": "In-N-Out Burger",
"vendor_logo": "https://cdn.veryfi.com/logos/us/949103001.png",
"vendor_reg_number": "",
"vendor_type": "Fast Food",
"web": ""
},
"vendor_account_number": "",
"vendor_bank_name": "",
"vendor_bank_number": "",
"vendor_bank_swift": "",
"vendor_iban": ""
}
Operation Status
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [fail
, ok
]
{
"status": "fail",
"error": "string",
"message": "string",
"details": [
{}
]
}