💼

vendors

Supplier or vendor company that provides goods or services. Contains vendor contact information, location, category, performance rating, and active status for procurement and supply chain management.

🎯 Request Builder

https://api.mockly.codes/vendors?page=1&limit=10&count=10
📡

Configure your request and click Send Request to see the response here.

Endpoints

GET/vendors

Get a collection of vendors

Alternative: /business/vendors
GET/vendors/:id

Get a single vendor by ID

Alternative: /business/vendors/:id
GET/vendors/meta

Get resource metadata and schema

Alternative: /business/vendors/meta
🔍

How to Use Search

The search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.

1. Basic Search

Search across all text fields:

Basic Search
GET https://api.mockly.codes/vendors?q=laptop

2. Search Specific Fields

Field-Specific Search
GET https://api.mockly.codes/vendors?q=laptop&search_fields=name,description

💡 Pro Tips

  • Search is case-insensitive and performs partial matching
  • Without search_fields, all text fields are searched
  • Combine with pagination to handle large result sets efficiently

Code Examples

JavaScript

Fetch Collection
// Get 10 vendors
fetch('https://api.mockly.codes/vendors?count=10')
  .then(res => res.json())
  .then(data => console.log(data));

Python

Fetch with Requests
import requests

response = requests.get(
    'https://api.mockly.codes/vendors?count=10'
)
data = response.json()

cURL

Command Line
curl "https://api.mockly.codes/vendors?count=10"

Bypass Cache

Get Fresh Data
fetch('https://api.mockly.codes/vendors?nocache=true')

Schema Properties

idinteger

Unique identifier for the vendor record

Gen:random_int
namestring

Official company name of the vendor or supplier

Gen:company
contact_personstring

Full name of the primary contact person at the vendor company

Gen:name
emailstring

Primary business email address for vendor communications

Gen:emailemail
phonestring

Primary business phone number for vendor inquiries

Gen:phone
addressstring

Street address of the vendor's primary business location

Gen:address
citystring

City where the vendor's business is located

Gen:city
countrystring

Country where the vendor operates

Gen:country
categorystring

Category or type of products/services the vendor provides (e.g., IT Services, Office Supplies, Manufacturing)

Gen:category
ratingnumber

Performance or quality rating of the vendor, typically on a scale of 1-5

Gen:float
activeboolean

Whether the vendor relationship is currently active and orders can be placed

Gen:boolean

Query Parameters

countinteger

Number of items to return (default: 10, max: 100)

seedinteger

Seed for reproducible data generation

nocacheboolean

Bypass cache and generate fresh data on every request