Update a Document
PUT/api/v7/partner/documents/:document_id
Update a previously processed document. Since Veryfi's Machine Learning models undergo frequent training, changes that are made to processed documents are used during these training sessions and eventually help improve the accuracy of data extraction.
Request
Path Parameters
ID of the document.
- application/json
Body
required
Document update options.
- Array [
- ]
Name of the Bill To contact
Address of the Bill To contact
Category for the document
Date on invoice/bill/receipt in YYYY-MM-DD HH:MM:SS format
Date on invoice/bill/receipt in YYYY-MM-DD HH:MM:SS format
Invoice number
line_items object[]
List Of Line Items
The category is taken from the line item with the same SKU and/or description. Otherwise from the root category
field.
Possible values: [BV
, SI
, FR
, BR
, CF
, DO
, GS
, MT
, NC
, MZ
, SJ
, TW
, DM
, AS
, EG
, RW
, CY
, KG
, KW
, GL
, EE
, MV
, KI
, NF
, TH
, SY
, MC
, FM
, SK
, GQ
, MK
, GA
, TV
, PR
, DE
, SL
, CN
, AU
, NI
, MW
, NE
, UG
, LT
, VG
, SZ
, KM
, MU
, HM
, AE
, EC
, AQ
, PT
, SN
, NL
, CG
, BZ
, IQ
, VU
, MR
, AI
, TN
, BH
, BL
, MS
, TC
, JE
, HR
, NU
, CH
, TL
, VE
, AG
, MQ
, CC
, BD
, TK
, YT
, IS
, QA
, SE
, PG
, PM
, TT
, PF
, BI
, IM
, FJ
, GT
, UZ
, CL
, BS
, SC
, AR
, KE
, MN
, LS
, KR
, PK
, KN
, YE
, KZ
, KH
, GE
, MD
, CX
, NA
, UY
, BO
, TR
, ID
, SO
, CV
, FO
, RS
, CU
, LA
, LR
, PN
, JP
, AL
, NP
, TM
, LK
, AD
, BB
, GI
, NO
, RO
, FK
, RU
, GN
, DJ
, AW
, MA
, SB
, CM
, GP
, LC
, VI
, MP
, FI
, GU
, SA
, SG
, WS
, ET
, CR
, AM
, GY
, LY
, AF
, GR
, VC
, PH
, ST
, OM
, GM
, KP
, TJ
, BJ
, JM
, AT
, VA
, PY
, CK
, HK
, MF
, IO
, UA
, MY
, HT
, TG
, SV
, NG
, ZA
, PE
, BW
, NZ
, PS
, AN
, BM
, WF
, UM
, IR
, DZ
, TD
, TZ
, IE
, SR
, GB
, BE
, DK
, LI
, SH
, GH
, GW
, ML
, TF
, GD
, IL
, JO
, BF
, CD
, LU
, PW
, SM
, ER
, AZ
, BG
, CA
, KY
, IT
, PA
, GF
, MX
, AX
, EH
, MM
, CO
, MH
, CI
, ZM
, LV
, MO
, NR
, BA
, GG
, TO
, HN
, ES
, SD
, PL
, IN
, HU
, ZW
, CZ
, ME
, US
, BT
, VN
, BY
, LB
, RE
, AO
, MG
, BN
]
The country of manufacture, production, design, or brand origin where the product comes from.
The date found on the document and associated with the line item in ISO 8601 format.
The product or service's extracted name or description excluding date and price.
The discount percentage that was applied to the line item.
The amount deducted from the total price for the line item.
A service end date identified for the line item. An end date could be a flight arrival date or hotel departure date in ISO 8601 format.
The Harmonized System Nomenclature (HSN) found for the line item.
The batch or lot number for the line item.
The unit price for the line item.
The amount or number of units for the line item. This value is computable.
A grouping indicated by formatted text on the receipt or invoice.
The Stock Keeping Unit (SKU) is the unique code associated with the product for the line item.
A service start date identified for the line item. A start date could be a flight departure date or hotel arrival date in ISO 8601 format.
The classification of goods and services for tax purposes for the line item.
The name of the manufacturer of the product for the line item.
The percent at which the individual or corporation is taxed.
The amount at which the individual or corporation is taxed for the product on this line item.
The total price for this line item. This value is computable.
New, added 2023-07-10. The total of a set of numbers that will later be added to another set of numbers, such as tip and tax. This value is computable.
Possible values: [room
, tax
, parking
, service
, fee
, delivery
, product
, food
, alcohol
, tobacco
, transportation
, fuel
, refund
, discount
, payment
, giftcard
]
The classification of the product. The line type predicted by Veryfi, e.g. food
.
The unit of measurement for this line item.
The Universal Product Code (UPC), European Article Number (EAN), or Global Trade Item Number (GTIN) found for the line item on this document will be placed in this field.
The weight of the item for the line item. Usually found on logistic invoices.
Subtotal on the document
Tax on the document
Tip/gratuity on the document
Total on the document
vendor object
Vendor Address
Vendor Email
Vendor external id
Vendor Name
Optional custom document identifier. Use this if you would like to assign your own ID to documents
Responses
- 200
- default
Document.
- 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": [
{}
]
}