API Getting Started

Learn how to use the ShadowGrow API to integrate with the platform and build custom applications.

Frequently Asked Questions

What is the API base URL?

All API requests should be made to https://your-domain.com/api/v1. Replace your-domain.com with your actual domain where you've installed the script. The API is RESTful and supports standard HTTP methods (GET, POST, PUT, DELETE).

How do I get an API key?

Log in to the admin panel of your installation, navigate to "API Manager", create a new API key, set permissions for the API key (read access, write access, specific resource permissions), set expiration date (optional), click "Create" and securely copy your API key. API keys are only shown once, so store them securely.

How do I authenticate API requests?

Include your API key in the Authorization header as: Authorization: Bearer YOUR_API_KEY. Also include Content-Type: application/json header. Example: curl -X GET https://your-domain.com/api/v1/user/products -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json".

What is the API response format?

All API responses follow this format: status: "success", message: "Operation completed successfully", data: response data, pagination: current_page, total_pages, total_items. Error responses include status: "error", message: "Error description", and errors: field with error messages.

What are the API rate limits?

Standard API keys allow 100 requests per minute, premium API keys allow 1000 requests per minute. Rate limit headers are included in responses. Exceeding limits returns a 429 status code. To ensure fair usage, implement proper rate limiting and caching in your applications.

What can I do with the API?

The API allows you to retrieve products, files, and services, manage orders and transactions, handle user authentication, access user data and profiles, create custom integrations, and build third-party applications. You can integrate product catalogs, order processing, user authentication, file downloads, payment processing, inventory management, and custom dashboards.

API Overview

What is the ShadowGrow API?

The ShadowGrow API is a RESTful API that allows you to programmatically access and manage your platform data. You can use it to:

  • Retrieve products, files, and services
  • Manage orders and transactions
  • Handle user authentication
  • Access user data and profiles
  • Create custom integrations
  • Build third-party applications

Base URL

All API requests should be made to:

https://your-domain.com/api/v1

Replace your-domain.com with your actual domain.

Authentication

API Keys

To use the API, you need to:

  1. Log in to the admin panel
  2. Navigate to "API Manager"
  3. Create a new API key
  4. Set permissions for the API key
  5. Copy and securely store your API key

Using API Keys

Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Making Your First Request

Example: Get Products

Using cURL:

curl -X GET \
  https://your-domain.com/api/v1/user/products \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Example: Using JavaScript (Fetch)

const response = await fetch(
  'https://your-domain.com/api/v1/user/products',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  }
);

const products = await response.json();
console.log(products);

Response Format

Standard Response Structure

All API responses follow this format:

{
  "status": "success",
  "message": "Operation completed successfully",
  "data": {
    // Response data here
  },
  "pagination": {
    "current_page": 1,
    "total_pages": 10,
    "total_items": 100
  }
}

Error Response

{
  "status": "error",
  "message": "Error description",
  "errors": {
    "field": ["Error message"]
  }
}

Rate Limiting

API Rate Limits

To ensure fair usage, API requests are rate-limited:

  • Standard API keys: 100 requests per minute
  • Premium API keys: 1000 requests per minute
  • Rate limit headers are included in responses
  • Exceeding limits returns a 429 status code

Next Steps