Create Product (Alias)
Alias path for POST /api/v2/products (routes/api/product.php binds both to ProductController::create). Identical single-product body, response and behaviour — it does not create multiple products.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Header Parameters
API contract version to target. See the Changelog for what changed in each version.
"2.0.0""2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
Must match an existing stored value.
Must match an existing stored value.
Must not be greater than 350 characters.
Must not be greater than 350 characters.
Must not be greater than 2000 characters.
Must not be greater than 2000 characters.
Must be at least 0.
Must be a valid URL.
Must match an existing stored value.
Must be at least 0.
Must be at least 0.
Must have at least 0 items.
Must have at least 1 items.
Must have at least 0 items.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.flavours.sa/dev/api/v2/products/multi" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "market_id": "velit", "name_en": "kuvqgntqsqttzreuynvtbde", "images": [ "http://www.rutherford.info/et-doloribus-rerum-facilis-aut-nostrum" ], "options": [ [] ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Product created successfully."
},
"data": {
"id": "329e9404-7a4b-4390-9536-d816c69a2517",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"name_en": "Cheese Burger",
"name_ar": "برجر جبن",
"description_en": null,
"description_ar": null,
"stock": 100,
"order": 58,
"images": [
"https://cdn.example.com/img/uploads/products/sample.png"
],
"is_active": true,
"created_at": 1792593346647,
"updated_at": 1792593346647,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 0,
"sold_revenue": 0,
"qoyod_id": null,
"min_additionals": 0,
"max_additionals": 3,
"is_global": false,
"options_min_total": 25.5,
"options_max_total": 25.5,
"product_category_id": 16,
"preparation_time": 15,
"market": {
"id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"sector_id": 15,
"name_en": "Franecki Ltd",
"name_ar": "Wintheiser-Barrows",
"description_en": "Eaque distinctio fuga nihil vitae velit.",
"description_ar": null,
"logo_img": "https://via.placeholder.com/200x200.png/009955?text=business+logo+facilis",
"cover_img": "https://via.placeholder.com/200x200.png/009999?text=business+cover+amet",
"email": "[email protected]",
"phone_prefix": "967",
"phone_number": "7856586642",
"crn": "033-466-2828",
"tax_number": "66596607090",
"created_by": null,
"email_verified_at": 1792593329562,
"phone_verified_at": 1792593329562,
"created_at": 1792593329465,
"updated_at": 1792593340021,
"deleted_at": null,
"is_active": true,
"merchant_id": null,
"reseller_id": null,
"slug": "wisoky-feest",
"code": "ENT-0000000001",
"links": {
"website": null,
"instagram": null,
"youtube": null,
"x": null,
"call_center": null
},
"phone": "7856586642"
},
"branch": {
"id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"name_en": "Ritchie Group",
"name_ar": "Ritchie Group",
"address": "97804 Tyra Road Suite 960\nMacejkovicmouth, MA 80054",
"latitude": -71.349526,
"longitude": -85.755632,
"is_active": true,
"created_at": 1792593329466,
"updated_at": 1792593329466,
"deleted_at": null,
"expired_at": null,
"is_online": false,
"code": "BR-704037"
},
"category": {
"id": 16,
"icon": "🍔",
"name_en": "Burgers",
"name_ar": "برجر",
"deleted_at": null,
"created_at": 1792593346520,
"updated_at": 1792593346520,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"image_url": null
},
"exclusions": [],
"options": [
{
"id": 738792843869216,
"modifierable_id": "329e9404-7a4b-4390-9536-d816c69a2517",
"name_en": null,
"name_ar": null,
"type": "OPTION",
"calorie": null,
"price": 25.5,
"tax": 0,
"total": 25.5,
"cost": null,
"profit": null,
"is_tax_included": true,
"deleted_at": null,
"barcode": null,
"weight_amount": null,
"weight_unit": null,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"modifierable_type": "PRODUCT_MODIFIER_PRODUCT",
"stock": 100,
"product_id": "329e9404-7a4b-4390-9536-d816c69a2517",
"sku": null,
"updated_at": null,
"barcode_img": null,
"recipes": [],
"ingredients": [],
"prices": [],
"additionals": []
}
],
"additionals": [],
"addon_groups": []
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 422,
"status": "error",
"message": "The selected market id is invalid. (and 2 more errors)"
},
"data": [
{
"code": 0,
"message": "The selected market is invalid.",
"field": "market"
},
{
"code": 0,
"message": "The Name (English) field is required.",
"field": "name_en"
},
{
"code": 0,
"message": "The options field is required.",
"field": "options"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}