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 Create Plant endpoint allows you to add a new plant to the store. Each plant must have a unique name and can optionally include a tag for categorization.Endpoint
Authentication
This endpoint requires Bearer token authentication. Include your token in the Authorization header:Request Body
The request body must be sent as JSON with theContent-Type: application/json header.
The name of the plant. This is a required field and should contain the common or scientific name of the plant.Requirements:
- Must be a non-empty string
- Should be unique within your plant collection
- “Monstera Deliciosa”
- “Sansevieria Trifasciata”
- “Pothos”
Optional tag to categorize or classify the plant. Use tags to organize your plant collection by type, location, care requirements, or any other classification system.Suggested tags:
- “tropical” - Tropical plants requiring warm, humid conditions
- “succulent” - Water-storing plants requiring minimal watering
- “flowering” - Plants that produce flowers
- “indoor” - Plants suitable for indoor growing
- “outdoor” - Plants suitable for outdoor growing
- “low-light” - Plants that thrive in low-light conditions
- “pet-safe” - Plants that are non-toxic to pets
Request Example
Response
Success Response (200)
Returns the created plant object with the assigned ID.Unique identification number automatically assigned to the plant when it’s created. Use this ID for subsequent operations like deletion.
The name of the plant as provided in the request
The tag assigned to the plant, if provided in the request
Error Response (400)
Returned when the request is invalid or cannot be processed.The error code indicating the type of error that occurred
A descriptive error message explaining what went wrong and how to fix it
Usage Examples
Create a Simple Plant
Create a plant with just a name:Create a Tagged Plant
Create a plant with both name and tag:Batch Create Plants
Create multiple plants sequentially:Common Error Scenarios
Missing Required Field
Invalid Content Type
Forgetting to set theContent-Type header to application/json will result in an error:
Unauthorized Request
After creating a plant, save the returned ID if you need to reference or delete the plant later. The ID is auto-generated and cannot be specified in the request.
Best Practices
- Validate input before sending the request to reduce errors
- Use meaningful tags to organize your plant collection effectively
- Store the returned ID for future operations on the plant
- Handle duplicate names in your application logic
- Implement error handling for network failures and validation errors
Related Endpoints
- Get Plants - Retrieve all plants from the store
- Delete Plant - Remove a plant by ID
- Plant Webhook - Receive notifications when plants are created