Skip to main content

Update a Line Item

PUT 

/api/v8/partner/documents/:document_id/line-items/:line_item_id

Veryfi's Update a Document by ID endpoint allows you to change a Document that Veryfi's Machine Learning models have already processed. This feature will enable users to update Documents previously processed by Veryfi to ensure data extraction accuracy. Updating a Document is especially useful for correcting mistakes and updating information over time. By changing a processed Document, Veryfi's Machine Learning models can re-learn the updated information, allowing them to stay accurate and up-to-date.

Request

Path Parameters

    document_id int64required

    The unique identifier of the document.

    line_item_id int64required

    The unique identifier of the line item.

Body

    category object

    The category is taken from the line item with the same SKU and/or description. Otherwise from the root category field.

    anyOf

    string

    country_of_origin object

    The country of manufacture, production, design, or brand origin where the product comes from.

    anyOf

    string

    date object

    The date found on the document and associated with the line item in ISO 8601 format.

    anyOf

    string

    description object

    The product or service's extracted name or description excluding date and price.

    anyOf

    string

    discount_price object

    The lower price after discount.

    anyOf

    number

    discount_rate object

    The discount percentage that was applied to the line item.

    anyOf

    number

    discount object

    The amount deducted from the total price for the line item.

    anyOf

    number

    end_date object

    A service end date identified for the line item in ISO 8601 format.

    anyOf

    string

    hsn object

    The Harmonized System Nomenclature (HSN) found for the line item.

    anyOf

    string

    order (integer | null)
    lot object

    The batch or lot number for the line item.

    anyOf

    string

    price object

    The unit price for the line item.

    anyOf

    number

    quantity object

    The amount or number of units for the line item.

    anyOf

    number

    reference object
    anyOf

    string

    section object

    A grouping indicated by formatted text on the receipt or invoice.

    anyOf

    string

    sku object

    The Stock Keeping Unit (SKU) is the unique code associated with the product for the line item.

    anyOf

    string

    start_date object

    A service start date identified for the line item in ISO 8601 format.

    anyOf

    string

    tags string[]

    Possible values: non-empty

    A user-defined list of identifiers that help to categorize or flag particular types of line items.

    tax_code object

    The classification of goods and services for tax purposes for the line item.

    anyOf

    string

    manufacturer object

    The name of the manufacturer of the product for the line item.

    anyOf

    string

    tax_rate object

    The percent at which the individual or corporation is taxed for the line item.

    anyOf

    number

    tax object

    The amount at which the individual or corporation is taxed for the product on this line item.

    anyOf

    number

    total object

    The total price for this line item.

    anyOf

    number

    subtotal object

    Total charges and credits before tip and tax, if applicable.

    anyOf

    number

    type object

    The classification of the product. The line type predicted by Veryfi, e.g. food.

    anyOf

    string

    unit_of_measure object

    The unit of measurement for this line item.

    anyOf

    string

    upc object

    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.

    anyOf

    string

    weight object

    The weight of the item for the line item. Usually found on logistic invoices.

    anyOf

    string

Responses

Document's Line Item

Schema
    id integerrequired

    The unique number created to identify the Line Item object.

    order integerrequired

    The value indicating the position of where the line item appears on the document.

    tags string[]

    Possible values: non-empty

    A user-defined list of identifiers that help to categorize or flag particular types of line items.

    text stringrequired

    Possible values: non-empty and <= 1000 characters

    The complete text returned for the line item, including prices, dates, etc.

    type stringrequired

    Possible values: [room, tax, parking, service, fee, delivery, product, food, alcohol, tobacco, transportation, fuel, refund, discount, payment, giftcard, donation, toll, lottery]

    The classification of the product. The line type predicted by Veryfi, e.g. food.

    product_info object

    Line item extra product info

    anyOf
    expanded_description stringrequired

    Possible values: non-empty

    brand (string | null)required

    Possible values: non-empty

    category string[]required

    Possible values: non-empty

    date date

    The date found on the document and associated with the line item in ISO 8601 format.

    description stringrequired

    Possible values: non-empty and <= 1000 characters

    The product or service's extracted name or description excluding date and price.

    full_description (string | null)

    Possible values: non-empty and <= 1000 characters

    The item text including dates, weight, etc.

    normalized_description (string | null)

    Possible values: non-empty

    The line item description with expanded words

    discount_price (number | null)

    The lower price after discount.

    discount_rate (number | null)

    The discount percentage that was applied to the line item.

    discount (number | null)

    The amount deducted from the total price for the line item.

    price (number | null)

    The unit price for the line item.

    quantity (number | null)

    The amount or number of units for the line item.

    reference (string | null)

    Possible values: non-empty

    section (string | null)

    Possible values: non-empty

    A grouping indicated by formatted text on the receipt or invoice.

    sku (string | null)

    Possible values: non-empty

    The Stock Keeping Unit (SKU) is the unique code associated with the product for the line item.

    tax_rate (number | null)

    The percent at which the individual or corporation is taxed for the line item.

    tax (number | null)

    The amount at which the individual or corporation is taxed for the product on this line item.

    total (number | null)

    The total price for this line item.

    subtotal (number | null)

    Total charges and credits before tip and tax, if applicable.

    unit_of_measure (string | null)

    Possible values: non-empty

    The unit of measurement for this line item.

    category (string | null)

    Possible values: non-empty

    The category is taken from the line item with the same SKU and/or description. Otherwise from the root category field.

    country_of_origin (string | null)

    Possible values: [IO, NA, PK, ZW, QA, RO, MT, ID, NF, MC, MW, PS, EC, SD, NG, AS, GF, GI, AE, HR, AU, SZ, CO, MO, VI, NE, RU, KR, YT, CL, ER, PA, DE, IS, TC, PG, AF, SE, VU, EE, CG, GR, CX, OM, MN, BH, DJ, GB, AN, KW, PW, CM, BF, PM, US, SO, TF, BZ, SL, LR, LT, SA, PY, GS, SY, GP, GG, CF, MG, PN, AZ, GD, JP, BL, CA, NO, CV, UY, BS, BN, GW, MX, MZ, KZ, HU, AO, LC, CU, GT, DM, PH, WS, KP, SR, AM, VC, LU, BY, VE, AI, VA, LY, PF, BD, BT, CR, FR, FM, TH, MF, CK, MY, PL, BM, ES, FO, IL, ST, TD, KN, NZ, BB, PR, SK, VN, ML, CD, NP, AX, PE, GL, IE, JE, AL, LV, LS, TT, BO, TZ, UA, AG, ET, NU, RW, AW, SM, NC, UM, AD, FI, EG, KE, MS, YE, GY, PT, VG, BG, GE, MR, NR, TR, AT, LI, RE, AQ, MH, MV, TN, SV, GH, HT, JO, MM, SI, SH, UZ, MP, KM, BE, HM, SG, SB, TL, FJ, MU, ME, BJ, CH, AR, TJ, KI, BW, CN, GQ, SJ, LB, TO, TV, GA, TG, HK, IM, BA, CI, MK, TM, KH, CY, ZA, LK, WF, MQ, SN, BI, DK, GN, NL, NI, FK, SC, IT, UG, CC, GM, BR, TW, CZ, KY, TK, RS, DZ, EH, DO, JM, MD, LA, KG, MA, IQ, ZM, IR, HN, BV, IN, GU]

    The country of manufacture, production, design, or brand origin where the product comes from.

    custom_fields CustomFields

    A user-defined dictionary that contains all the custom fields generated by applying specific rules and regular expressions to the extracted data.

    product_details object[]

    Product lookup details

  • Array [
  • avg_price (number | null)required

    The average price of the product

    brand (string | null)required

    Possible values: non-empty

    The brand name of the product

    ean (string | null)required

    Possible values: non-empty

    European Article Number (EAN) of the product

    extra_fields (object | null)required

    Additional fields for the product details

    gtin_14 (string | null)required

    Possible values: non-empty

    Global Trade Item Number (GTIN-14) of the product

    match_score (number | null)required

    Possible values: <= 1

    The match score of the product

    image (string | null)required

    Possible values: non-empty

    The image URL of the product

    image_url (string | null)required

    Possible values: non-empty

    Alternative field for the image URL of the product

    product_name stringrequired

    Possible values: non-empty

    The name of the product

    segment (string | null)required

    Possible values: non-empty

    The market segment of the product

    veryn stringrequired

    Possible values: non-empty

    The veryn identifier of the product

  • ]
  • end_date date

    A service end date identified for the line item in ISO 8601 format.

    gross_total (number | null)

    The line item total before deductions.

    hsn (string | null)

    Possible values: non-empty

    The Harmonized System Nomenclature (HSN) found for the line item.

    lot (string | null)

    Possible values: non-empty

    The batch or lot number for the line item.

    start_date date

    A service start date identified for the line item in ISO 8601 format.

    tax_code (string | null)

    Possible values: non-empty

    The classification of goods and services for tax purposes for the line item.

    manufacturer (string | null)

    Possible values: non-empty

    The name of the manufacturer of the product for the line item.

    net_total (number | null)

    The line item total after deductions.

    upc (string | null)

    Possible values: non-empty

    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.

    weight (string | null)

    Possible values: non-empty

    The weight of the item for the line item. Usually found on logistic invoices.

Loading...