YOCHDA

YOCHDA API Documentation

RESTful API v1 for marketing agents and integrations

Base URL: https://yongstore-k7tqzivf.manus.space/api/v1

Authentication

All API requests require an API key. Include it in one of these ways:

Header: X-API-Key: ycd_your_api_key_here
Query: /api/v1/products?api_key=ycd_your_api_key_here
readCan read data (GET requests)
writeCan create/update data (POST/PUT requests)
Quick Start
# List all products
curl -H "X-API-Key: ycd_your_key" \
  https://yongstore-k7tqzivf.manus.space/api/v1/products

# Get order statistics
curl -H "X-API-Key: ycd_your_key" \
  https://yongstore-k7tqzivf.manus.space/api/v1/analytics/overview

# Create a coupon (requires write permission)
curl -X POST -H "X-API-Key: ycd_your_key" \
  -H "Content-Type: application/json" \
  -d '{"code":"SUMMER20","discountType":"percentage","discountValue":20}' \
  https://yongstore-k7tqzivf.manus.space/api/v1/coupons

API Endpoints

Products
GET/api/v1/products
List all products
GET/api/v1/products/:idOrSlug
Get product by ID or slug (includes review stats)
PUT/api/v1/products/:id
Update product (name, price, stock, images, videoUrl, faqs, etc.)write
Orders
GET/api/v1/orders
List orders
GET/api/v1/orders/:orderNumber
Get order by order number
PUT/api/v1/orders/:orderNumber
Update order status/trackingwrite
GET/api/v1/orders/stats/summary
Order statistics and revenue summary
Reviews
GET/api/v1/reviews
List product reviews
Coupons
GET/api/v1/coupons
List all coupons
POST/api/v1/coupons
Create a new couponwrite
Blog
GET/api/v1/blog
List blog posts
POST/api/v1/blog
Create a blog postwrite
Subscribers
GET/api/v1/subscribers
List newsletter subscribers
B2B Quotes
GET/api/v1/quotes
List B2B quote requests
PUT/api/v1/quotes/:id
Update quote statuswrite
Inventory
GET/api/v1/inventory
Get all product stock levels (includes low stock alerts)
PUT/api/v1/inventory/:id
Update product stockwrite
Analytics
GET/api/v1/analytics/overview
Business overview (orders, revenue, reviews, subscribers, quotes)
Response Format
// Success response
{
  "success": true,
  "data": { ... },
  "pagination": {
    "total": 42,
    "limit": 50,
    "offset": 0,
    "hasMore": false
  }
}

// Error response
{
  "error": "Missing API key. Provide X-API-Key header or api_key query parameter."
}
Rate Limits & Best Practices

Each API key has a configurable rate limit (default: 1,000 requests/day). Contact admin to increase limits.

Use pagination parameters (limit, offset) for large datasets. Maximum limit per request is 100.

Cache product data locally and use the since parameter on orders to fetch only new data.

For marketing campaigns, create platform-specific coupon codes (e.g., TIKTOK10, FB20, YT15) to track conversion by channel.

Original text
Rate this translation
Your feedback will be used to help improve Google Translate