Importing Supplier and Purchase Order Data into DocBits from CSV Files
Overview
This Page describes how to import Supplier and Purchase Order data into DocBits using a Comma Separated Values (.csv) file.
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. If required fields are missing, the import process will fail.
Validation: Always verify that your .csv file contains all the necessary columns as outlined in the respective specifications section before attempting the import.
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:
For both Supplier and Purchase Order imports, all columns marked as "Required" in their respective specifications must exist in the .csv file and must contain a value in each row. If any required field is missing or empty for a row, the import process will fail.
CSV Specifications for Purchase Order
Fields which are Required - (column with name must exist & must contain data)
purchase_order_number
Fields which can be included
warehouse_idlocation_idsupplier_idsupplier_nameorder_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_codeunit_code_priceunit_priceunit_price_perextended_amounttotal_amountcurrencystatusbuyer_idbuyer_namegeo_codedelivery_method
CSV Specifications for Supplier
Fields which are Required - (column with name must exist & must contain data)
customer_numbersupplier_numbersupplier_namecountry_code
Fields which can be included
address_1address_2address_3address_4town_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_numberfinancial_partner_idfinancial_partner_nameibancurrency
Access Endpoint
To import data, follow these steps:
Visit: https://api.docbits.com/
Click the "Authorize" button.

Enter the API-Key and click "Authorize"
The API-Key can be found in DocBits in Settings -> Global Settings -> Integration
Note: The API key provided in your request determines the target organization and the user context under which the data will be imported.


Press CTRL + F (or CMD + F on Mac) to open the search function, and search for
/master_data_lookup/import_data.Click on the request to view its details, then click on "Try it out" to proceed.


You can now enter the required parameters in the Request Body.\
Request Parameters:
When making the import request, the following parameters need to be specified:
sub_org_id: Remove any text from the text field to ensure the "Send empty value" option is enabled.
data_type: This parameter specifies the type of data being imported. It can be either
supplierorpurchase_orderdepending on the content of your .csv file.replace_all: This boolean parameter determines whether all existing data in the respective database table (
supplierorpurchase_order) for the specified organization should be deleted before inserting the new data from the .csv file. Set this totrueto replace all existing data orfalseto append or update with the new data.delimiter: This parameter specifies the character used to separate the individual values within each row of your data file. It is essential to identify the correct delimiter used in your file. Common delimiters are the comma (
,) and the semicolon (;).How to check the delimiter:
Open your data file (e.g., the
.csvfile) with a plain text editor (like Notepad on Windows, TextEdit on Mac, or similar).Examine the first few rows of data. Look for the character that consistently appears between the different pieces of information in each row. This character is your delimiter.
Set the
delimiterparameter in your import request to this identified character (either,or;). Using the wrong delimiter will prevent the data from being parsed correctly and will result in a failed import.
on_conflict & auto_generate_id: The functionality for handling data conflicts (
on_conflict) and automatically generating IDs (auto_generate_id) is currently not implemented for these data types.

If you have verified that all the information is correct, you can initiate the import process by clicking the "Execute" button.

Last updated
Was this helpful?