Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sorgm/data-architecture-docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Get Plants endpoint returns a list of all plants in the store that the authenticated user has permission to access. You can optionally limit the number of results returned.

Endpoint

GET /plants

Authentication

This endpoint requires Bearer token authentication. Include your token in the Authorization header:
Authorization: Bearer YOUR_TOKEN

Query Parameters

limit
integer
The maximum number of results to return. Use this parameter to implement pagination or limit the response size.Example values:
  • 10 - Return up to 10 plants
  • 50 - Return up to 50 plants
  • 100 - Return up to 100 plants

Request Example

curl -X GET \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "http://sandbox.mintlify.com/plants?limit=10"

Response

plants
array
An array of plant objects that the user has access to.

Success Response (200)

Returns an array of plant objects.
[
  {
    "id": 1,
    "name": "Monstera Deliciosa",
    "tag": "tropical"
  },
  {
    "id": 2,
    "name": "Snake Plant",
    "tag": "succulent"
  },
  {
    "id": 3,
    "name": "Fiddle Leaf Fig",
    "tag": "tropical"
  }
]

Error Response (400)

Returned when there’s an unexpected error processing the request.
error
integer
required
The error code indicating the type of error that occurred
message
string
required
A human-readable message describing the error and potential solutions
{
  "error": 400,
  "message": "Invalid limit parameter. Must be a positive integer."
}

Usage Examples

Get All Plants

Retrieve all available plants without limiting the results:
curl -X GET \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "http://sandbox.mintlify.com/plants"

Get Limited Results

Retrieve only the first 5 plants:
curl -X GET \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "http://sandbox.mintlify.com/plants?limit=5"

Implementing Pagination

While this endpoint doesn’t support offset-based pagination, you can use the limit parameter to control batch sizes:
// Fetch plants in batches of 25
const limit = 25;
const response = await fetch(
  `http://sandbox.mintlify.com/plants?limit=${limit}`,
  {
    headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
  }
);
The plants returned are filtered based on the user’s access permissions. Different users may see different results when calling this endpoint.

Best Practices

  • Use the limit parameter to avoid retrieving large datasets unnecessarily
  • Cache responses when the data doesn’t change frequently
  • Handle errors gracefully by checking the response status code
  • Implement retry logic with exponential backoff for transient failures

Build docs developers (and LLMs) love