Importing Supplier and Purchase Order Data into DocBits from CSV Files
Overview
This page describes how to prepare a CSV import of Supplier or Purchase Order data in DocBits.
Important: Before importing any data, it is crucial to review the .csv file thoroughly to ensure data accuracy and proper configuration. Importing incorrect data can lead to inconsistencies. Refer to the CSV Specifications for Purchase Order or CSV Specifications for Supplier sections for details on required and optional fields. Confirm the accepted columns and validation rules for your API version before using a production dataset.
Validation: Use the lists below as a preparation checklist. Confirm required fields, additional fields and representative rows for your deployment; these lists are not a guarantee that every invalid row rejects the entire file. Review the response and independently verify the intended records.
Generall Requirements:
Date Format:
All dates provided in the .csv sheet must adhere to the following format:
YYYY-MM-DD HH:MM:SS
Required Fields:
Prepare and validate the baseline identifiers listed below. Do not rely on an import request to validate the completeness or business correctness of your CSV for you.
CSV Specifications for Purchase Order
Baseline fields to prepare and validate
purchase_order_number
Fields which can be included
warehouse_idlocation_idsupplier_idsupplier_nameheader_total_amountorder_daterequested_shipment_datepromised_delivery_datepayment_terms_codetotal_amountbuyer_contact_idbuyer_contact_nameorder_last_modified_byorder_last_modified_onship_to_party_idship_to_party_nameship_to_address_iddisponent_iddisponent_nameextended_amountextended_base_amountextended_report_amountcanceled_amountcanceled_base_amountcanceled_reporting_amountgeo_codepreview_pathtype_codetype_descriptioncustom_field_1custom_field_2custom_field_3custom_field_4custom_field_5statusline_numbersub_line_numberitem_idsupplier_item_iddescriptionnotequantityopen_quantityconfirmed_quantityreceived_quantityreceived_base_mou_quantitypromised_delivery_daterequested_ship_dateunit_of_measureunit_code_priceunit_priceunit_price_perextended_amounttotal_amountcurrencystatusbuyer_idbuyer_namegeo_codedelivery_method
CSV Specifications for Supplier
Baseline fields to prepare and validate
customer_numbersupplier_numbersupplier_namecountry_code
Fields which can be included
address_idaddress_1address_2address_3address_4country_main_divisiontown_cityzip_codesupplier_phonesupplier_vatpayment_term_idpayment_method_codebuyer_person_reference_idbuyer_person_referencesupplier_categorysupplier_groupdiscount_termdiscount_term_descriptionbank_idcustom_field_1custom_field_2custom_field_3custom_field_4custom_field_5custom_field_6custom_field_7custom_field_8custom_field_9custom_field_10statusaccount_idfinancial_partner_idfinancial_partner_nameibancurrency
Access Endpoint
Choose the environment and organization
Open the API reference for the environment you intend to use. The production reference is https://api.docbits.com/; use your approved test environment for test data. Check the API version and Servers value before preparing a request.
For an authorized import, click Authorize and use the API key supplied for the intended organization and user. Never copy a key into a screenshot, a CSV file or a shared example. For credential setup, see Integration.
The four images below are genuine English views of the Dev API reference, version 12.83.550, with server /dev-api. No API key or CSV was supplied and Execute was not clicked. The visible string values are Swagger-generated examples, not valid organization IDs or prepared import data.

Open the import operation
Find POST /master_data_lookup/import_data and expand it.
Click Try it out to enable the local request form. This step alone does not execute an import. Use Cancel to leave edit mode without sending the import.

Prepare the request body
sub_org_id: Enter the intended, authorized sub-organization ID when the import belongs to a sub-organization. Otherwise remove the generated
stringexample and deliberately leave the field empty using the form's Send empty value control as appropriate. Empty does not identify a test organization or limit an organization-wide replacement.data_type: Enter
supplierorpurchase_orderfor the workflows described on this page. Replace the generatedstringexample; the field is required.file / csv_data: This guide uses a CSV file. Clear the generated example from csv_data before choosing the file: nonempty
csv_datais processed before the file in the reviewed importer. Select your checked CSV in file and confirm that its filename is displayed. Do not leave the screenshot's example values as your request.delimiter: Select the actual delimiter in your CSV explicitly: comma (
,) or semicolon (;). Inspect the first rows in a plain text editor. Do not assume the form's initial semicolon selection matches the file or the server fallback.

Review replacement and conflict options
These option descriptions reflect the reviewed importer. Confirm replacement scope and conflict behavior for the API version you will use; the reference views do not verify those effects.
replace_all: The declared default is
false. Withtrue, the selected data type's existing records are removed before loading the CSV. The replacement scope is the organization, with a sub-organization filter when one is supplied. Check that scope explicitly before using replacement; an empty sub_org_id can cover the selected data type across the organization. Withfalse, existing records are handled according to on_conflict.on_conflict: Choose
IGNOREto leave matching existing Supplier or Purchase Order records unchanged, orREPLACEto update them from the CSV. The declared default isREPLACE. This option does not protect records from the earlier replace_all removal step.auto_generate_id: Leave this
falseand provide the required business identifiers in your CSV. The optional auto-generation flag is not used by the reviewed Supplier and Purchase Order importers; do not rely on it to create missing supplier or purchase-order numbers.

Only after the target environment, organization, sub-organization scope, CSV and options have been checked and the import is authorized, click Execute. Review the response and verify the intended records before continuing with further imports. For purchase orders, see the Purchase Order Dashboard. These screenshots demonstrate the controls; they do not establish an executed import or complete CSV-data validation.
Last updated
Was this helpful?