توثيق API GeniNetwork - الحصول

الوصف

إنشاء طلب جديد في النظام

POST /api/v1/products

معاملات الرأس

المعامل النوع مطلوب الوصف
client_id نص نعم المعرف الفريد للعميل
store_id نص نعم معرف المتجر
products مصفوفة نعم قائمة المنتجات المطلوبة
total_amount رقم نعم المبلغ الإجمالي للطلب

طلب الرأس


                    {"client_id":"CLI_12345","store_id":"STR_001","products":[{"product_id":"PRD_789","quantity":2,"price":29.99}],"total_amount":59.98,"status":"pending"}
                

معاملات الاستجابة

المعامل النوع مطلوب الوصف
client_id نص نعم المعرف الفريد للعميل
store_id نص نعم معرف المتجر
products مصفوفة نعم قائمة المنتجات المطلوبة
total_amount رقم نعم المبلغ الإجمالي للطلب
200 Success

تفاصيل الاستجابة:

الحالة : 200 OK

الوصف : The request has succeeded. The order was created successfully.


                                {"order_id":"ORD_98765","client_id":"CLI_12345","store_id":"STR_001","status":"pending","total_amount":59.98,"created_at":"2025-11-14T10:30:00Z"}
                            
400 Bad Request

تفاصيل الاستجابة:

الحالة : 400 Bad Request

الوصف : The server cannot process the request due to invalid syntax or missing required parameters.


                                {"error":"Bad Request","message":"Missing required field: client_id","timestamp":"2025-11-14T10:30:00Z"}
                            
401 Unauthorized

تفاصيل الاستجابة:

الحالة : 401 Unauthorized

الوصف : Authentication is required and has failed or has not been provided.


                                {"error":"Unauthorized","message":"Invalid or missing authentication token","timestamp":"2025-11-14T10:30:00Z"}
                            
403 Forbidden

تفاصيل الاستجابة:

الحالة : 403 Forbidden

الوصف : The server understood the request but refuses to authorize it.


                                {"error":"Forbidden","message":"You do not have permission to access this resource","timestamp":"2025-11-14T10:30:00Z"}