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, Oracle NetSuite, QuickBooks Online, Sage Intacct, Xero, and Zoho Books.

Software-specific behavior

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

LimitationDescription
Supplier nameIf supplierName is null in the request, FreeAgent uses the value in contactName instead (the value must contain a space). Codat rejects a request where both fields are null with a 400 response, because FreeAgent requires a name.
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?
👏
👍
🤔
👎
😭