Skip to main content

Manage suppliers

View, create, and update suppliers using Bill Pay

Overview

In accounts payable, each bill is associated with a supplier. The supplier represents a business or a sole trader that provides goods or services to your SMBSMB The primary customer segment that Codat helps businesses serve, typically companies with annual revenues under $500 million. customer.

Their records also contain key information, such as contact details, that can be used to notify the supplier once a payment is made.

To pay a bill in Bill Pay, you can use your customer's existing suppliers or create a new one. We have highlighted this alternative sequence of steps in our detailed process diagram below.

Detailed process diagram
Narrow down the supplier list

Supplier endpoints of the Bill Pay solution return only active suppliers from the accounting platform. You can use query parameters to narrow down the list of results further.

Retrieve supplier

Call our List suppliers endpoint to retrieve the full list of your customer's existing suppliers.

const suppliersResponse = await payablesClient.suppliers.list({
companyId: companyId,
});

if (suppliersResponse.statusCode != 200) {
throw new Error("Could not get current suppliers");
}

console.log(suppliersResponse.suppliers[0].supplierName);
Supplier balances

Bill Pay does not expose supplier balances on the supplier endpoints. Instead, you can aggregate bills by supplier.

Create supplier

When your customer's companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources. does business with a new supplier for the first time, you will need to create a supplier before creating a bill against that supplier. Use the Create supplier endpoint to do that.

const supplierCreateResponse = await payablesClient.suppliers.create({
supplier: {
supplierName: "Kelly's Industrial Supplies",
contactName: "Kelly's Industrial Supplies",
emailAddress: "[email protected]",
status: SupplierStatus.Active,
},
companyId: companyId,
connectionId: connectionId,
});

Update supplier

If your customer's existing supplier changes address or business name, you can reflect this change in their accounting software using the Update supplier endpoint.

Include all fields in the request, even if their values haven't changed. If you leave a field out, its value will be deleted from the supplier record.

Software coverage

This action is currently only supported for FreeAgent, QuickBooks Online, and Xero.

Software-specific behavior

Each accounting software has some limitations when updating suppliers. We've summarized them below.

Xero

LimitationDescription
Supplier nameIt's not possible to clear the supplier name. Sending a null or "" value for supplierName, or null value for both supplierName and contactName keeps the existing supplier name.
Duplicate namesSupplier names must be unique. Updating a name to match an existing supplier returns a 400 response.
Archived suppliersIt's not possible to update archived suppliers via the Xero APIAPI A set of rules and protocols that allows different software applications to communicate with each other. Codat provides APIs for accessing financial data from accounting, banking, and commerce platforms.. To unarchive, do it manually in Xero.

QuickBooks Online

LimitationDescription
Supplier nameIf supplierName is null in the request, QBO uses the value in contactName instead. If both fields are null, QBO returns a 400 response.
Default currencyIt's not possible to update the supplier's currency. Sending a defaultCurrency in the request that differs from the current value results in a 400 response. Send a null value to leave it unchanged.
Archived suppliersAll changes to archived suppliers are ignored. Include "status": "Active" in the update request to reactivate an archived supplier and apply the changes.

FreeAgent

LimitationDescription
Supplier nameIf supplierName is null in the request, FreeAgent uses the value in contactName instead (the value must contain a space). If both fields are null, FreeAgent returns a 400 response.
CountryIt's not possible to clear the supplier's country. Sending a null value or excluding the field from the request sets the value to the companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources.'s default country.
Default currencyFreeAgent doesn't support currency at supplier level. Any value sent in the request is ignored, and the response returns the companyCompany In Codat, a company represents your customer's business entity. Companies can have multiple connections to different data sources.'s base currency.
Recap

You have learnt how to view, create, and update your customer's suppliers who provide them with goods and services.

Next, you can choose to manage your supplier's bills or payment methods prior to paying those bills.



Was this page useful?
👏
👍
🤔
👎
😭