Retrieve Vendors of Specified IDs

Applies to: Vendors API

Learn how to retrieve vendors of specified IDs or search for vendors based on specified query conditions.

Link to section

Overview

If you know the ID of a Vendor object, you can call the RetrieveVendor or BulkRetrieveVendors endpoint to retrieve the vendor object. The BulkRetrieveVendors endpoint can take more than one vendor ID to retrieve multiple vendors at a time.

Link to section

Retrieve a single vendor at a time

To retrieve a single vendor, call RetrieveVendor while specifying the vendor's ID value as the vendor_id path parameter value.

Link to section

Request: Retrieve a single vendor at a time

The following example shows how to call RetrieveVendor to retrieve a vendor of a known vendor ID:

Retrieve vendor

Link to section

Response: Retrieve a single vendor

The successful response returns a payload similar to the following:

Link to section

Retrieve multiple vendors at a time

To retrieve multiple vendors at a time, call BulkRetrieveVendors while specify the IDs of the vendors in the vendors_ids list of the request payload.

Link to section

Request: Retrieve multiple vendors at a time

The following example retrieves two vendors with the CARJMAFUWDYBTPO2 and 5VPCRLENAFZXFZNA IDs:

Bulk retrieve vendors

Link to section

Response: Retrieve multiple vendors at once

When successful, the response returns a payload similar to the following, where the responses object is a map of vendors indexed by the vendor ID:

If you specify an invalid or non-existing vendor ID in the input parameter of vendor_ids in the BulkRetrieveVendors request call, as illustrated:

{ "vendor_ids": ["CARJMAFUWDYBTPO2", "5VPCRLENAFZXFZNA_"] }

The response returns a payload similar to the following, where the found vendor (CARJMAFUWDYBTPO2) is returned as expected, but for the invalid or non-existing vendor ID (5VPCRLENAFZXFZNA_) an error is returned: