Sheetfetch API — Parameters

Written By Richard

Last updated About 1 month ago

📌 What Are API Parameters?

In Sheetfetch, API Parameters are options you include with your API request to modify or filter the returned data. Parameters help you:

  • Retrieve specific data you need

  • Reduce unnecessary data

  • Control how the API processes and returns data

API parameters usually appear in:

  • URL query strings (after ?)

  • Request body (for POST/PATCH requests)

  • Request headers (often for authentication)

Example:

https://api.sheetfetch.com/v1/data?limit=50&sort=asc

Here, limit and sort are API parameters.

📚 Types of Parameters

Sheetfetch supports common API parameter types:

1. 🧭 Query Parameters

  • Placed after ? in the URL

  • Used for filtering, pagination, searching, limiting, sorting

  • Format: key=value

Example:

GET https://api.sheetfetch.com/v1/data?limit=100&filter=active

Here:

  • limit=100 → fetch up to 100 records

  • filter=active → only fetch records with active status

Query parameters are the most common and easy to use.

2. 📍 Path Parameters

  • Part of the URL path

  • Specify a specific resource

Example:

GET https://api.sheetfetch.com/v1/users/{userId}/sheets
  • {userId} is a path parameter

  • Sheetfetch replaces it with the actual user ID when calling the API

Path parameters are used for working with specific resources.

3. 🧾 Request Body Parameters

  • Used when sending data to the API (POST / PATCH)

  • Parameters are sent in the request body

Example POST:

POST https://api.sheetfetch.com/v1/sheets
Content-Type: application/json

{
 "title": "Sales Data",
 "columns": ["date", "amount"]
}
  • title and columns are body parameters

Body parameters are mainly used to create or update data.

4. 🛡️ Header Parameters

  • Sent in the HTTP request headers

  • Commonly used for:

    • API keys / tokens

    • Authentication

    • Metadata

Example:

Authorization: Bearer your_api_token_here

Header parameters do not appear in the URL but are essential for secure API requests.

📊 Sheetfetch Parameters — Practical Examples

🔍 1. Fetch filtered and limited data

GET https://api.sheetfetch.com/v1/data?status=active&limit=50
  • status=active → fetch only active data

  • limit=50 → limit to 50 rows

🧑‍💻 2. Fetch a user’s sheets by ID

GET https://api.sheetfetch.com/v1/users/12345/sheets
  • 12345 is a path parameter → user ID

🆕 3. Create a new sheet

POST https://api.sheetfetch.com/v1/sheets
Content-Type: application/json

{
 "title": "Monthly Report",
 "rows": 120
}
  • title and rows are body parameters

🔧 Combining Multiple Parameters

Multiple query parameters can be combined in a single URL:

?key1=value1&key2=value2&key3=value3

Example:

GET https://api.sheetfetch.com/v1/data?status=active&sort=desc&limit=20

Here:

  • status=active

  • sort=desc

  • limit=20

This allows the API to apply multiple conditions simultaneously.

✅ Tips for Using API Parameters

  • Use the correct key and value

  • Place important parameters first for readability

  • Ensure JSON is valid for body parameters

  • Keep authentication parameters in headers, not query strings