Banner
Update Banner
Update a specific banner by its ID.
Authorization
default AuthorizationBearer <token>
You can retrieve your token by logging in.
In: header
Path Parameters
bannerId*string
Header Parameters
X-API-Version*string
API contract version to target. See the Changelog for what changed in each version.
Default
"2.0.0"Value in
"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
title_en?|
English title of the banner.
title_ar?|
Arabic title of the banner.
description_en?|
English description of the banner.
description_ar?|
Arabic description of the banner.
cover_img?|
URL of the cover image. Must be a valid URL.
button_url?|
URL for the call-to-action button. Must be a valid URL.
button_label_en?|
English label for the button.
button_label_ar?|
Arabic label for the button.
features?array<|>
List of features associated with the banner. Must have at least 1 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/banners/voluptatibus" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{}'{
"meta": {
"code": 200,
"status": "success",
"message": "Update Success"
},
"data": {
"id": "2ed0d432-2f0e-434d-81ed-e23c5f16a0e0",
"title_en": "Quam voluptatem molestias nemo.",
"title_ar": "Exercitationem hic aut.",
"description_en": "Id enim pariatur earum omnis. Consequatur id nesciunt eum aut. Temporibus quod maiores voluptatem esse quis quam culpa adipisci.",
"description_ar": "Voluptas enim unde nemo iusto. Quo ut in esse eveniet qui et. Pariatur et nulla animi ut provident. Natus tempora atque odio dolor.",
"cover_img": "https://via.placeholder.com/640x480.png/001155?text=id",
"button_url": "https://www.ruecker.com/est-odio-rem-iure-vitae",
"button_label_en": "Learn More",
"button_label_ar": "اعرف المزيد",
"created_at": 1787446682424,
"updated_at": 1787446682557,
"features": [
{
"id": "9c739706-5987-47d5-8f4c-dbf108153a84",
"banner_id": "2ed0d432-2f0e-434d-81ed-e23c5f16a0e0",
"role": "USER_SUBSCRIBER",
"feature_key": "KITCHEN",
"feature": {
"key": "KITCHEN",
"name_en": "Kitchen",
"name_ar": "المطبخ",
"description_en": "Manage and track incoming orders.",
"description_ar": "إدارة وتتبع الطلبات الواردة.",
"roles": [
"USER_SUBSCRIBER"
]
}
},
{
"id": "fb88d525-2c23-462a-8ddd-6bbde9385e27",
"banner_id": "2ed0d432-2f0e-434d-81ed-e23c5f16a0e0",
"role": "USER_SUBSCRIBER",
"feature_key": "DISCOUNT",
"feature": {
"key": "DISCOUNT",
"name_en": "Discounts",
"name_ar": "الخصومات",
"description_en": "Manage all available discount types.",
"description_ar": "إدارة جميع أنواع الخصومات المتاحة.",
"roles": [
"USER_SUBSCRIBER"
]
}
},
{
"id": "42bc3c84-5375-4475-b7d7-ba5c499ee583",
"banner_id": "2ed0d432-2f0e-434d-81ed-e23c5f16a0e0",
"role": "USER_SUBSCRIBER",
"feature_key": "APPLICATION",
"feature": {
"key": "APPLICATION",
"name_en": "Applications",
"name_ar": "التطبيقات",
"description_en": "Manage and explore integrated applications.",
"description_ar": "إدارة واستكشاف التطبيقات المتكاملة.",
"roles": [
"USER_ADMIN",
"USER_SUBSCRIBER"
]
}
}
]
}
}{
"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 cover img must be a valid URL. (and 1 more error)"
},
"data": [
{
"code": 0,
"message": "The cover img must be a valid URL.",
"field": "cover_img"
},
{
"code": 0,
"message": "The button url must be a valid URL.",
"field": "button_url"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}