API Documentation
Connect your applications to place orders and process payments. Generate an API key from your account dashboard (API Keys).
Base URL
https://www.jollyboxfr.com/api
Authentication
Endpoints that require authentication expect your API key in one of these ways:
- Header:
X-API-Key: your_api_key - Header:
Authorization: Bearer your_api_key
Replace your_api_key with the key you generated from your dashboard. Keep it secret.
Response format
All responses are JSON with status (success/error), message, and data when applicable. Errors return HTTP 4xx/5xx with message.error.
Endpoints
GET /api/products
List products. No API key required.
Query: per_page (default 15, max 50), search, category_id, brand_id
Example:
GET https://www.jollyboxfr.com/api/products?per_page=10
GET /api/products/{id}
Get a single product by ID. No API key required.
GET https://www.jollyboxfr.com/api/products/1
GET /api/payment-methods
List available payment methods. Requires API key.
GET https://www.jollyboxfr.com/api/payment-methods
X-API-Key: your_api_key
POST /api/orders
Create an order. Requires API key.
Body (JSON):
{
"items": [
{ "product_id": 1, "quantity": 2 },
{ "product_id": 2, "quantity": 1, "product_variant_id": 5 }
],
"shipping_address": {
"firstname": "John",
"lastname": "Doe",
"mobile": "1234567890",
"email": "john@example.com",
"country": "United States",
"city": "New York",
"state": "NY",
"zip": "10001",
"address": "123 Main St"
},
"shipping_method_id": 1,
"coupon_code": "SAVE10"
}
Response includes order_id, order_number, total_amount. Then call POST /api/payment/initiate to get the payment URL.
GET /api/orders
List your orders. Requires API key.
Query: per_page, status (pending, processing, dispatched, delivered, canceled)
GET https://www.jollyboxfr.com/api/orders?status=pending
X-API-Key: your_api_key
GET /api/orders/{order_id_or_number}
Get order details. Requires API key.
GET https://www.jollyboxfr.com/api/orders/OID-00001
X-API-Key: your_api_key
POST /api/payment/initiate
Get payment URL for an unpaid order. Requires API key.
Body (JSON):
{
"order_id": 123,
"gateway": "stripe",
"currency": "USD"
}
Or use gateway currency id from GET /api/payment-methods: "gateway": 5
Response includes payment_url. Redirect the customer to this URL to complete payment.
Rate limit: 60 requests per minute per IP. For more help, contact support.