Skip to main content

Manage suppliers

View, create, and update suppliers using Sync for Payables

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 SMB 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 Sync for Payables, you can use your customer's existing supplier or create a new one. We have highlighted this alternative sequence of steps in our detailed process diagram below.

Detailed process diagram

Retrieve supplier

Call our List suppliers endpoint to retrieve the full list of your customer's existing suppliers. You can also use query parameters to narrow down the list of results, for example:

  • status=Active returns only active suppliers.
  • defaultCurrency=USD returns suppliers that provide goods or services in dollars.
  • supplierName=Acme returns suppliers with a name that matches the query.
const suppliersResponse = await payablesClient.suppliers.list({
companyId: companyId,
query: 'status=Active&&defaultCurrency=USD'
});

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

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

Sync for Payables does not expose supplier balances on the supplier endpoints. Instead, you can:

Create supplier

When your customer's company 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.

const supplierUpdateResponse = await payablesClient.suppliers.update({
supplier: {
supplierName: "Kelly's Industrial Supplies",
contactName: "Kelly's Industrial Supplies",
emailAddress: "[email protected]",
phone: "(877) 492-8687"
status: SupplierStatus.Active,
},
companyId: companyId,
connectionId: connectionId,
supplierId: supplierCreateResponse.supplier.id
});
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?
👏
👍
🤔
👎
😭