Verdmarket Supplier API
REST API for managing your products, stock, prices, and orders programmatically.
Base URL
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /products | List products |
| GET | /products/{id} | Get product detail |
| POST | /products | Create product |
| POST | /products/{id} | Update product |
| POST | /products/{id}/delete | Delete product |
| GET | /products/{id}/images | List product images |
| POST | /products/{id}/images | Add images via URL |
| POST | /products/{id}/images/{imageId}/delete | Delete image |
| POST | /products/{id}/images/{imageId}/primary | Set primary image |
| POST | /stock | Bulk stock update |
| POST | /prices | Bulk price update |
| GET | /orders | List orders |
| GET | /orders/{id} | Get order detail |
| POST | /orders/{id}/status | Update order status |
| GET | /categories | List categories |
Authentication
All API requests require a Bearer token in the Authorization header.
Generate your API key from Supplier Dashboard → Store Profile → API Keys.
Rate Limits
Default: 1,000 requests per hour per API key.
Rate limit info is returned in response headers:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests per hour |
| X-RateLimit-Remaining | Remaining requests in current window |
| X-RateLimit-Reset | Unix timestamp when the window resets |
| Retry-After | Seconds until you can retry (only on 429) |
Response Format
All responses are JSON. Successful responses:
{
"success": true,
"data": { ... }
}Error responses:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Name is required."
}
}Products
/products
List your products with pagination and filtering.
Query Parameters
| Param | Type | Description |
|---|---|---|
| page | int | Page number (default: 1) |
| per_page | int | Items per page (max: 100, default: 20) |
| status | string | Filter: active, inactive, pending |
| search | string | Search by name or SKU |
Example Response
{
"success": true,
"data": {
"products": [
{
"id": 42,
"name": "Red Roses Premium",
"sku": "ROSE-RED-001",
"type": "flower",
"base_price": 2.50,
"unit": "stem",
"stock_qty": 500,
"stock_status": "in_stock",
"is_active": true,
"is_approved": true,
"category": { "id": 3, "name": "Roses" },
"primary_image": "/uploads/products/rose-red.jpg"
}
],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_items": 94,
"per_page": 20
}
}
}/products/{id}
Get a single product with images and variants.
/products
Create a new product. New products require admin approval before appearing in the catalog.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | * | Product name |
| category_id | int | * | Category ID |
| base_price | float | * | Price in EUR |
| unit | string | * | stem, bunch, box, pack, piece, kilogram, meter, roll |
| type | string | flower (default) or supply | |
| description | string | Product description | |
| sku | string | Unique SKU (checked for duplicates) | |
| stock_qty | int | Stock quantity (default: 0) | |
| min_order_qty | int | Minimum order qty (default: 1) | |
| color | string | Product color | |
| stem_length | int | Stem length in cm | |
| country_of_origin | string | Country of origin | |
| vat_rate | float | VAT rate in % (default: 21) | |
| image_url | string | Image URL(s). Supports jpg, png, webp. Multiple URLs separated by semicolon (;). Max 10 images per product. |
/products/{id}
Update an existing product. Only send the fields you want to change (partial update).
/products/{id}/delete
Soft-delete a product. No request body required.
Product Images
/products/{id}/images
Get all images for a product. Returns URLs and primary flag.
Example Response
{
"success": true,
"data": {
"images": [
{
"id": 1,
"url": "/uploads/products/abc123.jpg",
"thumbnail_url": "/uploads/products/thumb_abc123.jpg",
"is_primary": true
},
{
"id": 2,
"url": "/uploads/products/def456.jpg",
"thumbnail_url": "/uploads/products/thumb_def456.jpg",
"is_primary": false
}
]
}
}/products/{id}/images
Add images by providing URLs. The server downloads, validates (jpg/png/webp, max 5MB), and creates thumbnails automatically. Use semicolons to separate multiple URLs.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | * | Image URL(s). Supports jpg, png, webp. Multiple URLs separated by semicolon (;). Max 10 images per product. |
Request Body
{
"image_url": "https://example.com/images/rose.jpg;https://example.com/images/rose-2.jpg"
}/products/{id}/images/{imageId}/delete
Delete a product image. Removes the file from storage. If the deleted image was primary, the next image becomes primary automatically.
/products/{id}/images/{imageId}/primary
Set an image as the primary (main) product image. The primary image is used in catalog listings and search results.
Bulk Stock Update
/stock
Update stock quantities for multiple products at once. Identify products by product_id or sku. Max 500 items per request.
Request Body
{
"items": [
{ "product_id": 42, "stock_qty": 500 },
{ "sku": "ROSE-RED-001", "stock_qty": 250 },
{ "sku": "LILY-WHT-003", "stock_qty": 0 }
]
}Response
{
"success": true,
"data": {
"updated": 2,
"failed": 1,
"errors": [
{ "index": 2, "sku": "LILY-WHT-003", "error": "Product not found" }
]
}
}Bulk Price Update
/prices
Update prices for multiple products. Same format as stock update but with base_price field. Max 500 items.
Request Body
{
"items": [
{ "product_id": 42, "base_price": 2.75 },
{ "sku": "ROSE-RED-001", "base_price": 3.10 }
]
}Orders
/orders
List your order groups (supplier-specific order portions).
Query Parameters
| Param | Type | Description |
|---|---|---|
| page | int | Page number |
| per_page | int | Items per page (max 100) |
| status | string | pending, confirmed, processing, shipped, delivered, completed, cancelled |
/orders/{id}
Get full order detail including items, customer info, and status history.
/orders/{id}/status
Update order status. Only valid transitions are allowed:
| From | Allowed Transitions |
|---|---|
| pending | confirmed, cancelled |
| confirmed | processing, cancelled |
| processing | shipped, cancelled |
| shipped | delivered |
Request Body
{
"status": "confirmed",
"comment": "Order confirmed, preparing for shipment"
}Categories
/categories
List all active categories. Returns a flat list with parent references.
Example Response
{
"success": true,
"data": {
"categories": [
{ "id": 1, "name": "Flowers", "slug": "flowers", "parent_id": null, "type": "flower" },
{ "id": 3, "name": "Roses", "slug": "roses", "parent_id": 1, "type": "flower" }
]
}
}Error Codes
| HTTP | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Key revoked or supplier not verified |
| 404 | NOT_FOUND | Resource not found |
| 422 | VALIDATION_ERROR | Invalid input data |
| 429 | RATE_LIMITED | Rate limit exceeded |
| 500 | SERVER_ERROR | Internal server error |
Code Examples
List Products
curl -X GET "https://www.verdmarket.com.mature-black-wombat.65-108-70-81.cpanel.site/api/v1/supplier/products?page=1&per_page=10" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
Create Product
curl -X POST "https://www.verdmarket.com.mature-black-wombat.65-108-70-81.cpanel.site/api/v1/supplier/products" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Red Roses Premium",
"category_id": 3,
"base_price": 2.50,
"unit": "stem",
"stock_qty": 500,
"sku": "ROSE-RED-001",
"color": "Red",
"stem_length": 60,
"country_of_origin": "Netherlands",
"image_url": "https://example.com/images/rose-red.jpg"
}'Add Product Images
curl -X POST "https://www.verdmarket.com.mature-black-wombat.65-108-70-81.cpanel.site/api/v1/supplier/products/42/images" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/img/photo1.jpg;https://example.com/img/photo2.jpg"
}'Bulk Stock Update
curl -X POST "https://www.verdmarket.com.mature-black-wombat.65-108-70-81.cpanel.site/api/v1/supplier/stock" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"sku": "ROSE-RED-001", "stock_qty": 500},
{"sku": "LILY-WHT-003", "stock_qty": 200}
]
}'PHP Example
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://www.verdmarket.com.mature-black-wombat.65-108-70-81.cpanel.site/api/v1/supplier';
// List products
$ch = curl_init("$baseUrl/products?page=1&per_page=10");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $apiKey",
"Accept: application/json",
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
// Bulk stock update
$ch = curl_init("$baseUrl/stock");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
'items' => [
['sku' => 'ROSE-RED-001', 'stock_qty' => 500],
['sku' => 'LILY-WHT-003', 'stock_qty' => 200],
],
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $apiKey",
"Content-Type: application/json",
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);Python Example
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://www.verdmarket.com.mature-black-wombat.65-108-70-81.cpanel.site/api/v1/supplier"
headers = {"Authorization": f"Bearer {API_KEY}"}
# List products
resp = requests.get(f"{BASE_URL}/products", headers=headers,
params={"page": 1, "per_page": 10})
products = resp.json()
# Bulk stock update
resp = requests.post(f"{BASE_URL}/stock", headers=headers,
json={"items": [
{"sku": "ROSE-RED-001", "stock_qty": 500},
{"sku": "LILY-WHT-003", "stock_qty": 200},
]})
result = resp.json()
# Update order status
resp = requests.post(f"{BASE_URL}/orders/15/status", headers=headers,
json={"status": "confirmed",
"comment": "Ready for shipment"})
print(resp.json())