Documentation Index
Fetch the complete documentation index at: https://docs.oneclickdz.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Create orders for gift cards and digital products. Cards are delivered digitally via the /checkOrder endpoint.
Before ordering: Verify stock via /checkProduct and check account
balance.
Request Body
Type ID from /checkProduct
Number of cards to order (minimum: 1)
Examples
curl https://api.oneclickdz.com/v3/gift-cards/placeOrder \
-X POST \
-H "Content-Type: application/json" \
-H "X-Access-Token: YOUR_API_KEY" \
-d '{
"productId": "507f1f77bcf86cd799439011",
"typeId": "type_001",
"quantity": 2
}'
Success Response
{
"success": true,
"data": {
"orderId": "6901616fe9e88196b4eb64b3"
},
"meta": {
"timestamp": "2025-10-29T01:00:00.000Z"
},
"requestId": "req_1730163600_abc123"
}
Pre-Order Checklist
Verify Stock
const product = await checkProduct(productId);
const type = product.types.find(t => t.id === typeId);
if (!type || type.quantity < quantity) {
throw new Error('Insufficient stock');
}
Check Balance
const balance = await getBalance();
const totalCost = type.price * quantity;
if (balance < totalCost) {
throw new Error('Insufficient balance');
}
Place Order
const order = await placeOrder({ productId, typeId, quantity });
Poll for Cards
const result = await pollOrder(order.orderId);
Error Responses
Invalid request parameters
Product out of stock
Not enough balance
Processing
Orders are final once placed. Save orderId immediately.
Most orders process within seconds. Poll /checkOrder/:orderId every 5-10 seconds until status is FULFILLED or REFUNDED.
Check Order
Get cards when fulfilled
Check Product
Verify stock first