Using the Vendor Management API

For organizations that have cumbersome processes for vendor onboarding, ERPs with stale information, or multiple systems with vendor information, Vendorful offers a cure to what ails them. Vendors can self onboard, prompts for data refresh are automated, and any information that has become stale is clearly marked. By connecting with Vendorful's Vendor Management module programmatically, organizations can leverage these capabilities across their portfolio of software applications that house vendor data. The following will explain how to synchronize data between Vendorful and these applications.

Authentication

In order to access Vendorful programmatically, authentication is required. This can happen at the user level provided there is an associated user account that has relevant permissions. However, as the integration typically involves multiple systems exchanging information, it is more common to do authenticate with the system, e.g. NetSuite, SAP, Dynamix, etc. (Note: a username can be passed into the API in the latter scenario, allowing Vendorful to construct a rich audit history that references the calling application as well as the relevant user.) In either case, before calling a Vendor Management API, the authentication step must be completed.

Both of these authentication approaches are documented and include sample code.

Reading Vendor Data

If a new vendor has been onboarded in Vendorful or an existing vendor has updated key information, you may well want to update this information in your other systems. Now that you've authenticated, the next step is to call the Vendor Management API. Rather than using callback hooks, which can be problematic if there is unexpected downtime or a network hiccup associated with the listener, Vendorful is designed so that other systems can query if for changes.

To best leverage this, you'll likely want to set up a recurring job. Maybe once per hour, the calling system should do something like this, "Hey Vendorful, can you tell me if there are any changes since last time I asked?" If there are none, no data is sync'd, and the scheduled job exits. At the next interval, it will try again. (An hour is used in the preceding example because it's a reasonable amount of time. If you would like synchronization to occur more or less frequently, you can tweak the scheduled interval to your liking." If data was updated in the interval between jobs, Vendorful will -- during the next job -- provide a list of the changes. Your code should loop through these and apply the updates.

If you would like to see sample code for this, we have published Javascript sample code that can be modified or translated as you see fit. In addition, we have published Vendor Management API documentation using Swagger.

Filtering by Attribute

Unfortunately, Swagger -- the API documentation platform we use -- is a bit rigid, which poses challenges for documenting the filtering capabilities in their format. That said, there's not much to it. For example, imagine you want to filter on a certain attribute. Imagine that attribute has a UUID of 4564654-5465-4546-45464647654 and that the value you're looking for is "Hawaii."
In this case, you would append the following query parameters to the URL you constructed: ?4564654-5465-4546- 45464647654=Hawaii.

Updating Attributes in Vendorful

On some occasions, there might be a need to update vendor data in Vendorful programmatically. Perhaps someone has updated a value in an ERP system and you want to make sure that this is reflected in the vendor record in Vendorful as well. 
An update of this sort is quite straightforward: you  authenticate and then issue a PUT request. You need to specify the vendor's organization ID, the entity ID, the attribute, and the attribute value. Bear in mind that even in the case where there is a single entity for a vendor, the entity ID is required. Of course, if a vendor has multiple entity IDs, you can update specific attributes for specific entities.
Once again, we encourage you to refer to our  sample code for updating vendor attributes.

Still need help? Contact Us Contact Us