Ejoyshop
  1. Offers
Ejoyshop
  • Customer
    • Shops
      • Fetch Shops
      • Fetch Specific Shop
      • Book Appointment
    • Auth
      • Signup-email-password
      • Signup-google auth
      • Get user Role and Info
      • New Request
      • Update Profile
      • Reset Password Send OTP
      • Reset Password OTP Verification
      • Reset Password Update new password
    • Meetings
      • Fetch meeting slots
      • book meet
      • Fetch Invited Meets
      • Fetch Meetings for specific users
      • Join Meet
      • Fetch Meetings
    • Categories|sub-categories|languages|occasions|genders
      • Fetch categories
      • Fetch Sub-categories
      • Fetch Languages
      • Fetch Occassions
    • Offers
      • Fetch offers
    • Credits
      • Fetch credits plans
      • Create Pg order
      • Fetch user credit transactions
    • Order
      • Fetch order by id
      • Fetch order by id Copy
      • Fetch Orders
      • Updated Order status
      • Update order delivery address
      • Track Order
    • Address
      • Add address
      • Delete address
      • Mark Address as default
      • Fetch addresses
      • Fetch specific address
    • Favourite Shops
      • Add favourite shop
      • Fetch Favourite shops
      • Delete Favourite Shop
    • Support
      • Add support
      • Update support
      • Fetch supports
      • Fetch Specific Support
    • Fetch Customers list
      GET
  • Admin
    • Shipment
      • shipment track
    • Auth
      • Fetch admin details
      • Update account status
    • vendors
      • Fetch all vendor without pagination
  • Product
    • Create Product
      POST
    • Update the product
      PUT
    • Patch Product
      PATCH
    • Fetch Product by id
      GET
    • fetch products
      GET
    • Delete Product
      DELETE
    • fetch premium products
      GET
    • fetch products by vendor id
      GET
  • SubscriptionPlans
    • Create Subscription Plan
    • Update Subscription Plan
    • Patch Subscription
    • get subscription by id
    • get subscriptions
    • Delete subscription id
    • Subscription Plan Purchase
  • general
    • Generate presigned url
    • Payment webhook test
  • Stitching Service
    • Create Stitching Service
    • Update Stitching Service
    • Patch stitching service invoice
    • Fetch the invoices
    • Fetch the invoices by id
  • settings
    • Update hero banners
    • Fetch hero banners
    • create hero banners
    • Fetch specific hero banner
    • Delete hero banner
  • reviews
    • Add order review
    • Update order review
    • Fetch all order feedbacks
    • Fetch order review by id
    • Delete order review
    • Add order review reply
    • Update order review reply
    • Delete order review reply
    • Fetch order review by order id
    • Add Customer review
    • Update Customer review
    • Fetch all customers feedbacks
    • Fetch customer review by customer id
    • Delete customer review
    • Add customer review reply
    • Update customer review reply
    • Delete customer review reply
    • Fetch customer review metrics
    • Add meet review
    • Update order review
    • Fetch all meet feedbacks
    • Fetch meet review by id
    • Add meet review reply
    • Update meet review reply
    • Fetch meet review by meet id
    • Fetch meet review metrics
    • Delete meet review
    • Delete meet review reply
    • Fetch order review metrics
    • Top 10 platform review
    • get top 10 review of meet & order
  • Referral
  • WalletTxn
    • get all customer wallet transaction
    • get-all-referral
    • get single user referral
    • get single Transaction
  • verification
    • send mobile verification otp
    • verify mobile verification otp
    • resend mobile verification otp
    • send email verification otp
    • verify otp for mail
  • GEO Location
    • fetch all country
    • fetch all state
    • fetch all cities
    • fetch all postal code
  • Order
  • chat-service
    • Fetch user
    • Fetch chat rooms for user
    • Fetch unseen counts for user
    • Fetch messages by chat id
    • Fetch read-receipt for msg
    • Fetch chat id info
  • Offers
    • get all feature offers
      GET
    • update premium offers
      PATCH
    • Update offer
      PUT
    • delete offer
      DELETE
  1. Offers

Update offer

Developing
PUT
/offers/update/{id}

Edit Offer#

The Edit Offer API allows authorized users (admins, vendors, employees) to update specific fields of an offer based on their role and the origin of the offer. Admins can update approval status and remarks for vendor offers, while vendors and employees can update their own offers' content and reset the approval status to pending.
Endpoint
Path Parameters
NameTypeRequiredDescription
idstringYesThe ID of the offer to be updated (MongoDB ObjectId).
Authentication
User must be authenticated and authorized based on their role (admin, subAdmin, vendor, or employee).
Request Body
Fields are dynamic based on role and existing offer type. The body may include any of the following:
NameTypeRequiredDescription
titlestringOptionalOffer title.
descriptionstringOptionalDescription of the offer.
startDatestringOptionalISO date string for the offer's start.
endDatestringOptionalISO date string for the offer's end.
statusstringOptionalOffer status (e.g., active, inactive).
offerTypestringOptionalType of the offer (if editable by the user).
imagefileOptionalNew image file (handled via multipart upload).
approvalStatusstringOptionalAdmins can update status (Approved, Rejected, etc.).
remarksstringOptionalOptional remarks (admin-only update).
🔒 Field-Level Permissions by Role
FieldAdmin/SubAdmin (Vendor Offers)Vendor / Employee (Vendor Offers)Admin (Admin Offers)
title❌✅✅
description❌✅✅
startDate❌✅✅
endDate❌✅✅
status❌✅✅
image (file)❌✅✅
offerType❌❌✅
approvalStatus✅⚠️ (automatically set to "Pending")✅
remarks✅❌✅
Response
Status CodeDescription
200Offer updated successfully.
400Invalid offer ID, validation error, or bad input.
401Unauthorized - authentication required.
403Forbidden - user does not have permission to update this offer.
404Not Found - offer not found.
500Internal Server Error.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Body Params multipart/form-data

Responses

🟢200OK
application/json
Body

Example
{
    "statusCode": 200,
    "status": true,
    "message": "Offer updated successfully.",
    "response": {
        "offer": {
            "_id": "687a15c983fc71f8e97c2f5b",
            "approvalStatus": "Pending",
            "vendor": "647587fc52f887dacdeb76b3",
            "title": "offer-lalaland2",
            "description": "jingala-hur hur-jinga2",
            "offerType": "Seasonal Sales",
            "startDate": "2025-07-28T07:54:22.000Z",
            "endDate": "2026-06-27T16:35:44.000Z",
            "image": "https://ejoyshopdevbucket.s3.ap-south-1.amazonaws.com/images/hnrPlAbyc5Qp.jpg",
            "status": "active",
            "offeror": "VENDOR",
            "creatorEntity": "VendorOffer",
            "createdAt": "2024-09-19T07:17:13.168Z",
            "updatedAt": "2025-07-28T08:36:25.104Z",
            "__v": 0,
            "premium": true
        }
    }
}
🟠403Forbidden Response
🔴500Server Error
🟠404Not found response
🟠401Unauthorized Response
🟠400Bad Request Response
Modified at 2025-07-28 11:43:56
Previous
update premium offers
Next
delete offer
Built with