This guide explains how to import bills with the Payabli API.

Example CSV file

Before you get started, copy the example CSV file and open it with the editor of your choice. Use it as an example to help you build your import file.

Bill Import
BillNumber,NetAmount,BillDate,DueDate,Comments,AccountingField1,AccountingField2,BillStatus,VendorNumber,LocationCode,Name1,Name2,EIN,Phone,Email,Address1,Address2,City,State,Zip,Country,remitAddress1,remitAddress2,remitCity,remitState,remitZip,remitCountry,payeeName1,payeeName2,LotNumber,Paypoint_Id,externalPaypointId,entryName
bill1,20,3/23/2022,4/5/2023,Testing Bill1,Accounting 12,Accounting 1,1,123,147,John,Doe,123456789,1234567890,jonhd@gmail.com,5127 Joy Street,,Dallas,TX,12345,US,,,,,,,,,,,,
bill4,40,3/23/2022,3/5/2023,Testing Bill4,Accounting 2,Accounting 22,1,456,258,Albert,Einstein,987654321,1230987654,einstein@gmail.com,5128 St Street,,Houston,TX,45678,US,,,,,,,,,,,,

Build the request

First, choose an endpoint. If you’re testing, use the Sandbox endpoint.. If you’re testing, use the Sandbox endpoint.

Authenticate

Path parameter

The import endpoints have one required path parameter.

entrypoint
string
required

The entrypoint identifier for the paypoint to import the data into.

Body parameter

The import endpoint has a required body parameter: a CSV file with the data you want to import.

Example request

This example imports BillImportFile.csv for the entrypoint e56ce00572.

Bills import example request
curl --request POST \
     --url https://api-sandbox.payabli.com/api/Import/billsForm/e56ce00572 \
     --header "content-type: multipart/form-data" \
     --header "requestToken: <API TOKEN>" \
     --form "file=@BillImportFile.csv"

Example response

A successful request returns a JSON response with the number of added and rejected records, and any errors. The imported data is now available for use, and you can confirm by checking PartnerHub or PayHub.

Success response example
{
  "isSuccess": true,
  "responseText": "Success",
  "responseCode": 1,
  "responseData": {
    "added": 98,
    "rejected": 0,
    "errors": []
  },
  "pageidentifier": null
}