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 "http://localhost:8000/api/v2/banners/tenetur" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{}'{
"meta": {
"code": 200,
"status": "success",
"message": "Update Success"
},
"data": {
"id": "ba9fd444-2c9f-440c-b017-b12e4733ad86",
"title_en": "Voluptas numquam aut beatae magnam.",
"title_ar": "Voluptatibus hic enim.",
"description_en": "Tempore delectus eos repudiandae. Est quis ipsa omnis nostrum qui. Culpa et quo qui qui est ab consequatur et. Esse voluptatum et quae autem sint enim.",
"description_ar": "Assumenda quod quia sed velit rerum. Magnam ratione non odio cumque esse ipsam. Non ea dicta totam nostrum.",
"cover_img": "https://via.placeholder.com/640x480.png/000088?text=excepturi",
"button_url": "http://www.collins.net/omnis-velit-sunt-voluptate",
"button_label_en": "Learn More",
"button_label_ar": "اعرف المزيد",
"created_at": 1782824832797,
"updated_at": 1782824833056,
"features": [
{
"id": "bd469916-8dda-45ae-a20b-6570d3e483cf",
"banner_id": "ba9fd444-2c9f-440c-b017-b12e4733ad86",
"role": "USER_SUBSCRIBER",
"feature_key": "SCHEDULE",
"feature": {
"key": "SCHEDULE",
"name_en": "Schedules",
"name_ar": "الجداول الزمنية",
"description_en": "Organize and monitor work schedules.",
"description_ar": "تنظيم ومراقبة جداول العمل.",
"roles": [
"USER_SUBSCRIBER"
]
}
},
{
"id": "b57417b8-fe39-4f47-8b86-38e4f0ae0dfb",
"banner_id": "ba9fd444-2c9f-440c-b017-b12e4733ad86",
"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"
]
}
},
{
"id": "7f160908-d194-4d6b-b34e-f4b8dc17eb99",
"banner_id": "ba9fd444-2c9f-440c-b017-b12e4733ad86",
"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"
]
}
}
]
}
}{
"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
}