infile
Local File
or URL
Or Data
string
This is the input file: raw data, or URL. Choose one of the options of "Local File", "URL", or "Data"
curl -X POST "https://www.convertcsv.io/api/v1/csv2json/" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
disable_borders
boolean
PDF setting - disable borders
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?disable_borders=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
encoding
string
File encoding - if not passed, the converter will attempt to determine the encoding by looking at the first few thousand bytes of the file. Typical values are: utf-8, utf-16.
You can see a list of all supported types here: https://docs.python.org/3/library/codecs.html
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?encoding=ascii" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
exclude
string
Exclude these fields in conversion. Use this if you want to convert all fields except these.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?exclude=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
exnulls
string
Do not output NULL for NULL in these fields. Many CSV files have NULL for NULL fields in a database table. The default is to convert those to NULL in SQL for instance, or null in JSON, however, NULL can be a legitimate value. Use this option to exclude fields from the default conversion.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?exnulls=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
fields
string
Include these fields in conversion. You specify fields by their position, starting at 1. If you wanted the first 5 fields, you can type 1,2,3,4,5 or 1-5. The default is to include all fields.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?fields=1,2,3" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
fontsize
string
Specify PDF font size. Default is 10.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?fontsize=12" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
headover
string
List of header columns - Use this to override the headers on the CSV file. If the input has no headers (as specified by parameter noheader), then this parameter is a way to specify the headers.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?headover=pk,fullname,amount,comment" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
html
boolean
For CSV to PDF - create an HTML like table
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?html=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
limit
integer
Limit number of output records to N, i.e. 100. If you have a large output file, use this option to limit your output.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?limit=10" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
lower
string
Output lower case for these fields
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?lower=6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
noheader
boolean
Input CSV file has no column headings
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?noheader=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
nulls
string
Convert 'NULL' to a NULL SQL value or null JSON value. Many popular tools export the string NULL in place of NULL values in tables. By default, the converter will convert ALL NULL values to a NULL SQL value or null JSON value. If you use this option, only the fields specified will be converted. See also exnulls.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?nulls=1,5,6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
pagefont
string
PDF page font - choices are: arial, SegoeWP, segoepr. and segoeui. The default is arial.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?pagefont=SegoeWP" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
pagesize
string
Specify PDF page size. Choose: A3, A4, A5, Letter, Legal, WxH (like 300x400, please don`t forget to specify pageunit)
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?pagesize=Legal" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
pageunit
string
PDF page unit - choose: cm, mm, pt, or in. Default is pt.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?pageunit=cm" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
password
string
Password for URL data source
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?password=bob&username=bee" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
suppress
boolean
Supress line break in data
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?suppress=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
trim
string
Trim leading and trailing spaces for these fields. Use column positions to identify the fields. For instance if you always want fields 4 and 5 without leading and trailing spaces, then use this option.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?trim=4,5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
upper
string
Output upper case for these fields
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf=4,5" -F "infile=@[YOUR FILE]" -F "upper=1-4" -H "Authorization: Token [YOUR TOKEN]"
username
string
Username for URL data source. This is only used when URLs are the data source. See password also.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?username=johnny&password=xyz" -F "infile=https://www.xyz.com/myinputfile.csv" -H "Authorization: Token [YOUR TOKEN]"
widths
string
For CSV to PDF, this is a comma separated list of integers specifying the percentages of each field width. For instance, if you had 4 fields with the last value using half the page, then you might specify 10,20,20,50. The numbers should add up to 100.
curl -X POST "https://www.convertcsv.io/api/v1/csv2pdf?widths=10%25,20%25,20%25,50%25" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"