The Create Hero Banners API allows a vendor to upload new hero banners for both web and mobile platforms on Ejoyshop. This API ensures that a vendor can only have one set of banners; it prevents duplicates by checking for existing entries.Endpoint
Request Body
Name
Type
Required
Description
webBanners
string
Yes
web hero banner image URLs (strings).
mobileBanners
string
Yes
mobile hero banner image URLs (strings).
vendorId
string
Yes
The vendor's unique MongoDB ObjectId.
Response
Status Code
Description
201
Hero banners created successfully.
400
Hero banners already exist or validation failed.
403
Forbidden - user does not have permission to perform this action.
404
Not Found - endpoint or vendor not found.
500
Internal Server Error.
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
{"statusCode":201,"status":true,"message":"Hero banners created successfully","response":{"banner":{"heroBanners":["https://uIqCNVNd.boqhsfrR6lLUwUerb8LhbTEh41ur4qVVzBUzRk4z3bsA","https://bOkaSCY.xcpORH1WRCk0SNm1agzi.xEuuoCC4JE3ZQTYF-orxSv+lYOJozR5RxO+suIi2qEt4F6k86kN6","http://RySWJZxYedvWsElKiDHOXRFO.qge.eHtDlp,SxBO27qxndvcX9"],"mobileHeroBanners":["https://uIqCNVNd.boqhsfrR6lLUwUerb8LhbTEh41ur4qVVzBUzRk4z3bsA","https://bOkaSCY.xcpORH1WRCk0SNm1agzi.xEuuoCC4JE3ZQTYF-orxSv+lYOJozR5RxO+suIi2qEt4F6k86kN6","http://RySWJZxYedvWsElKiDHOXRFO.qge.eHtDlp,SxBO27qxndvcX9"],"vendorId":"cf23aaa1ef931dfe387f8261","_id":"687b6c655e075bbf6f875924","createdAt":"2025-07-19T09:59:01.355Z","updatedAt":"2025-07-19T09:59:01.355Z","__v":0}}}