Create Recipe
POST
{{ecommercev2_url}}/recipes
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location -g --request POST '{{ecommercev2_url}}/recipes' \
--header 'x-client: {{client}}' \
--header 'accept-language: {{acceptLanguage}}' \
--header 'Content-Type: application/json' \
--header 'x-access-token;' \
--data-raw '{
"name": {
"en": "Branch"
},
"type": "select",
"tag": "custom",
"isFiltrable": false,
"required": false,
"multi": true,
"isComparable": false,
"visibility": false,
"sortable": false,
"selectionStyle": "carousel",
"belongsTo": [
"product"
],
"groupId": "681882b677b0e2bdb405577f",
"vendorId": "674ed2adc7ab4354ff309b51",
"id": "68234a2a8172a05d5c672e10",
"createdAt": "2025-05-13T13:33:30.768Z",
"createdBy": "674ed2adc7ab4354ff309b51",
"updatedAt": "2025-05-13T13:33:30.768Z",
"updatedBy": "674ed2adc7ab4354ff309b51",
"group": {
"name": {
"defaultTranslation": "gnvngv",
"en": "gnvngv"
},
"code": "gnvngv_2",
"id": "681882b677b0e2bdb405577f",
"createdAt": "2025-05-05T09:19:50.084Z",
"createdBy": "6812196790745133183931c1",
"updatedAt": "2025-05-05T09:19:50.084Z",
"updatedBy": "6812196790745133183931c1"
},
"refField": "branch"
}'
Response Response Example
{
"id": "685bc0794c759193de48ae97",
"createdAt": "2025-06-25T09:25:13.187Z",
"createdBy": "667917cabd1516884a1af8fe",
"updatedAt": "2025-06-25T09:25:13.187Z",
"updatedBy": "667917cabd1516884a1af8fe",
"name": {
"ar": "دجاج مشوي مع الخضار",
"defaultTranslation": "Grilled Chicken with Vegetables",
"en": "Grilled Chicken with Vegetables"
},
"description": {
"ar": "وصفة دجاج مشوي صحية ولذيذة مع الخضار الطازجة",
"defaultTranslation": "A healthy and delicious grilled chicken recipe with fresh vegetables",
"en": "A healthy and delicious grilled chicken recipe with fresh vegetables"
},
"howToCook": {
"ar": "1. تتبيل الدجاج بالأعشاب\n2. الشوي لمدة 15 دقيقة\n3. إضافة الخضار والطبخ لمدة 10 دقائق إضافية",
"defaultTranslation": "1. Season chicken with herbs\n2. Grill for 15 minutes\n3. Add vegetables and cook for 10 more minutes",
"en": "1. Season chicken with herbs\n2. Grill for 15 minutes\n3. Add vegetables and cook for 10 more minutes"
},
"imagesHowToCook": [
{
"_id": "507f1f77bcf86cd799439020",
"path": "https://cdn.example.com/cooking-steps/step1-seasoning.jpg",
"variants": [
"thumbnail",
"medium",
"large"
],
"originalName": "chicken-seasoning-step.jpg"
},
{
"_id": "507f1f77bcf86cd799439021",
"path": "https://cdn.example.com/cooking-steps/step2-grilling.jpg"
}
],
"calories": 350,
"cookingTime": 30,
"difficultyLevel": "medium",
"recipeType": "dinner",
"ingredients": {
"ar": "2 قطعة صدر دجاج، 1 فلفل رومي، 1 كوسة، زيت زيتون، أعشاب",
"defaultTranslation": "2 chicken breasts, 1 bell pepper, 1 zucchini, olive oil, herbs",
"en": "2 chicken breasts, 1 bell pepper, 1 zucchini, olive oil, herbs"
},
"productIds": [
"6830cdcc2c67ec61cbbeab46"
],
"images": [
{
"_id": "507f1f77bcf86cd799439022",
"path": "https://cdn.example.com/recipes/grilled-chicken-main.jpg",
"variants": [
"thumbnail",
"medium",
"large",
"hero"
],
"originalName": "grilled-chicken-final-dish.jpg"
}
],
"isActive": false
}
Request
Header Params
x-access-token
string
required
Example:
{{admin-token}}
x-client
string
required
Example:
{{client}}
accept-language
string
required
Example:
{{acceptLanguage}}
Body Params application/json
Responses
Modified at 2025-06-25 09:25:39